{"id":6768,"date":"2023-12-23T18:44:58","date_gmt":"2023-12-23T18:44:58","guid":{"rendered":"https:\/\/www.garysieling.com\/blog\/?p=6768"},"modified":"2023-12-23T18:46:43","modified_gmt":"2023-12-23T18:46:43","slug":"shapefile-of-599-police-districts-in-pa","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/shapefile-of-599-police-districts-in-pa\/","title":{"rendered":"Shapefile of 599 police districts in PA"},"content":{"rendered":"\n<p>Shape file showing 599 police districts in PA <\/p>\n\n\n\n<p>Combines all of Pittsburgh, Harrisburg, Montgomery County, Bucks County, Chester County, Delaware  County &#8211; includes population #s and standardized naming for all attributes &#8211; compiled from disparate data sources and combined using a Node.js script.<\/p>\n\n\n\n<p>Download here:<\/p>\n\n\n\n<p><a href=\" https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2023\/12\/Police.geojson\"> https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2023\/12\/Police.geojson<\/a> and contact gary.sieling@gmail.com with questions.<\/p>\n\n\n<p><div class=\"leaflet-map WPLeafletMap\" style=\"height:250px; width:100%;\"><\/div><script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletMapShortcode() {\/*<script>*\/\nvar baseUrl = atob('aHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmc=');\nvar base = (!baseUrl && window.MQ) ?\n    window.MQ.mapLayer() : L.tileLayer(baseUrl,\n        L.Util.extend({}, {\n            detectRetina: 0,\n        },\n        {\"subdomains\":\"abc\",\"noWrap\":false,\"maxZoom\":19}        )\n    );\n    var options = L.Util.extend({}, {\n        layers: [base],\n        attributionControl: false\n    },\n    {\"zoomControl\":false,\"scrollWheelZoom\":false,\"doubleClickZoom\":false,\"fitBounds\":false,\"minZoom\":0,\"maxZoom\":19,\"maxBounds\":null,\"attribution\":\"<a href=\\\"http:\\\/\\\/leafletjs.com\\\" title=\\\"A JS library for interactive maps\\\">Leaflet<\\\/a>; \\u00a9 <a href=\\\"http:\\\/\\\/www.openstreetmap.org\\\/copyright\\\">OpenStreetMap<\\\/a> contributors\"},\n    {});\nwindow.WPLeafletMapPlugin.createMap(options).setView([40.2663107,-76.8861122],7);});<\/script><br \/>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletjsonShortcode() {\/*<script>*\/\nvar src = 'https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2023\/12\/Police.geojson';\nvar default_style = {};\nvar rewrite_keys = {\n    stroke : 'color',\n    'stroke-width' : 'weight',\n    'stroke-opacity' : 'opacity',\n    fill : 'fillColor',\n    'fill-opacity' : 'fillOpacity',\n};\n\/\/ htmlspecialchars converts & to \"&amp;\"; maybe unnecessarily, and maybe 3x\nvar ampersandRegex = \/&(?:amp;){1,3}\/g\nvar layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), {\n    type: 'json',\n    style : layerStyle,\n    onEachFeature : onEachFeature,\n    pointToLayer: pointToLayer\n});\nvar fitbounds = 0;\nvar circleMarker = 0;\nvar popup_text = window.WPLeafletMapPlugin.unescape(\"\");\nvar popup_property = \"\";\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar markerOptions = window.WPLeafletMapPlugin.getIconOptions({});\nlayer.addTo( group );\nwindow.WPLeafletMapPlugin.geojsons.push( layer );\nif (fitbounds) {\n    layer.on('ready', function () {\n        this.map.fitBounds( this.getBounds() );\n    });\n}\nfunction layerStyle (feature) {\n    var props = feature.properties || {};\n    var style = {};\n    function camelFun (_, first_letter) {\n        return first_letter.toUpperCase();\n    };\n    for (var key in props) {\n        if (key.match('-')) {\n            var camelcase = key.replace(\/-(\\w)\/, camelFun);\n            style[ camelcase ] = props[ key ];\n        }\n        \/\/ rewrite style keys from geojson.io\n        if (rewrite_keys[ key ]) {\n            style[ rewrite_keys[ key ] ] = props[ key ];\n        }\n    }\n    return L.Util.extend(style, default_style);\n}\nfunction onEachFeature (feature, layer) {\n    var props = feature.properties || {};\n    var text;\n    if (0) {\n        text = window.WPLeafletMapPlugin.propsToTable(props);\n    } else {\n        text = popup_property\n            ? props[ popup_property ]\n            : window.WPLeafletMapPlugin.template(\n                popup_text, \n                feature.properties\n            );\n    }\n    if (text) {\n        layer.bindPopup( text );\n    }\n}\nfunction pointToLayer (feature, latlng) {\n    if (circleMarker) {\n        return L.circleMarker(latlng);\n    }\n    return L.marker(latlng, markerOptions);\n}});<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shape file showing 599 police districts in PA Combines all of Pittsburgh, Harrisburg, Montgomery County, Bucks County, Chester County, Delaware County &#8211; includes population #s and standardized naming for all attributes &#8211; compiled from disparate data sources and combined using a Node.js script. Download here: https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2023\/12\/Police.geojson and contact gary.sieling@gmail.com with questions.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6768"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=6768"}],"version-history":[{"count":12,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6768\/revisions"}],"predecessor-version":[{"id":6784,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6768\/revisions\/6784"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=6768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=6768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=6768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}