Guest User

Untitled

a guest
Oct 22nd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. constituency count
  2. 0 Burton 667
  3. 1 Cannock Chase 595
  4. 2 Cheltenham 22
  5. 3 Cheshire East 2
  6. 4 Congleton 1
  7. 5 Derbyshire Dales 1
  8. 6 East Staffordshire 4
  9.  
  10. import folium
  11. mapf = folium.Map(width=700, height=370, tiles = "Stamen Toner", zoom_start=8, location= ["53.0219392","-2.1597434"])
  12.  
  13.  
  14. mapf.geo_json(geo_path="geo_json_shape2.json",
  15. data_out="data.json",
  16. data=dty,
  17. columns=["constituency","count"],
  18. key_on="feature.properties.PCON13NM.geometry.type.Polygon",
  19. fill_color='PuRd',
  20. fill_opacity=0.7,
  21. line_opacity=0.2,
  22. reset="True")
  23.  
  24. {'../../Crime_data/staffs_data92.json': [{'Burton': 667,
  25. 'Cannock Chase': 595,
  26. 'Cheltenham': 22,
  27. 'Cheshire East': 2,
  28. 'Congleton': 1,
  29. 'Derbyshire Dales': 1,
  30. 'East Staffordshire': 4,
  31. 'Lichfield': 438,
  32. 'Newcastle-under-Lyme': 543,
  33. 'North Warwickshire': 1,
  34. 'Shropshire': 17,
  35. 'South Staffordshire': 358,
  36. 'Stafford': 623,
  37. 'Staffordshire Moorlands': 359,
  38. 'Stoke-on-Trent Central': 1053,
  39. 'Stoke-on-Trent North': 921,
  40. 'Stoke-on-Trent South': 766,
  41. 'Stone': 270,
  42. 'Tamworth': 600,
  43. 'Walsall': 1}]}
  44.  
  45. 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