Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constituency count
- 0 Burton 667
- 1 Cannock Chase 595
- 2 Cheltenham 22
- 3 Cheshire East 2
- 4 Congleton 1
- 5 Derbyshire Dales 1
- 6 East Staffordshire 4
- import folium
- mapf = folium.Map(width=700, height=370, tiles = "Stamen Toner", zoom_start=8, location= ["53.0219392","-2.1597434"])
- mapf.geo_json(geo_path="geo_json_shape2.json",
- data_out="data.json",
- data=dty,
- columns=["constituency","count"],
- key_on="feature.properties.PCON13NM.geometry.type.Polygon",
- fill_color='PuRd',
- fill_opacity=0.7,
- line_opacity=0.2,
- reset="True")
- {'../../Crime_data/staffs_data92.json': [{'Burton': 667,
- 'Cannock Chase': 595,
- 'Cheltenham': 22,
- 'Cheshire East': 2,
- 'Congleton': 1,
- 'Derbyshire Dales': 1,
- 'East Staffordshire': 4,
- 'Lichfield': 438,
- 'Newcastle-under-Lyme': 543,
- 'North Warwickshire': 1,
- 'Shropshire': 17,
- 'South Staffordshire': 358,
- 'Stafford': 623,
- 'Staffordshire Moorlands': 359,
- 'Stoke-on-Trent Central': 1053,
- 'Stoke-on-Trent North': 921,
- 'Stoke-on-Trent South': 766,
- 'Stone': 270,
- 'Tamworth': 600,
- 'Walsall': 1}]}
- ogr2ogr -f "GeoJSON" filtered.geojson -dialect SQLITE -sql "SELECT * FROM OGRGeoJSON WHERE PCON13NM IN ('Derbyshire Dales', 'Cheltenham', 'Cannock Chase', 'Congleton', 'Cheshire East', 'Burton', 'East Staffordshire')" geo_json_shape2.json
Add Comment
Please, Sign In to add comment