Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. { "type": "Feature", "properties": { "PCON13CD": "E14000532", "PCON13CDO": "A03", "PCON13NM": "Altrincham and Sale West" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -2.313999519326579, 53.357408280545918 ], [ -2.313941776174758, 53.358341455420039 ], [ -2.31519699483377, 53.359035664493433 ], [ -2.317953152796459, 53.359102954309151 ], [ -2.319855973429864, 53.358581917200119 ],... ] ] ] } },...
  2.  
  3. constituency count
  4. 0 Burton 667
  5. 1 Cannock Chase 595
  6. 2 Cheltenham 22
  7. 3 Cheshire East 2
  8. 4 Congleton 1
  9. 5 Derbyshire Dales 1
  10. 6 East Staffordshire 4
  11.  
  12. import folium
  13. mapf = folium.Map(width=700, height=370, tiles = "Stamen Toner", zoom_start=8, location= ["53.0219392","-2.1597434"])
  14.  
  15.  
  16. mapf.geo_json(geo_path="geo_json_shape2.json",
  17. data_out="data.json",
  18. data=dty,
  19. columns=["constituency","count"],
  20. key_on="feature.properties.PCON13NM.geometry.type.Polygon",
  21. fill_color='PuRd',
  22. fill_opacity=0.7,
  23. line_opacity=0.2,
  24. reset="True")
  25.  
  26. {'../../Crime_data/staffs_data92.json': [{'Burton': 667,
  27. 'Cannock Chase': 595,
  28. 'Cheltenham': 22,
  29. 'Cheshire East': 2,
  30. 'Congleton': 1,
  31. 'Derbyshire Dales': 1,
  32. 'East Staffordshire': 4,
  33. 'Lichfield': 438,
  34. 'Newcastle-under-Lyme': 543,
  35. 'North Warwickshire': 1,
  36. 'Shropshire': 17,
  37. 'South Staffordshire': 358,
  38. 'Stafford': 623,
  39. 'Staffordshire Moorlands': 359,
  40. 'Stoke-on-Trent Central': 1053,
  41. 'Stoke-on-Trent North': 921,
  42. 'Stoke-on-Trent South': 766,
  43. 'Stone': 270,
  44. 'Tamworth': 600,
  45. 'Walsall': 1}]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement