I'm trying to build a choropleth map, I cannot figure out why I get this error:

AttributeError: 'NoneType' object has no attribute 'get'

Here is my code:

station_nb is a dataframe with values grouped by c_ar

geop = r'arrondissements.geojson'    
    geo_data =geop,
    data = station_nb,
    columns = ['c_ar','count'],

When I check the contents of GeoJSON file key looks ok and I get the 20 expected values:


geop is as follows:

{'type': 'FeatureCollection',
 'features': [{'type': 'Feature',
   'geometry': {'type': 'Polygon',
    'coordinates': [[[2.351518483670821, 48.8644258050741],
  'l_aroff': 'Bourse',
    'c_arinsee': 75102,
    'c_ar': 2}},

Could you help me to understand this issue?

  • It doesn't seem like the code that generates that error is in the question. – Vince Jun 29 '19 at 12:37
  • 1. Please include the entire error, not just the last line. 2. Your GeoJSON looks wrong, where is the "properties": { key?, please include an entire valid GeoJSON FeatureCollection with a single feature so we can test. – user2856 Jul 1 '19 at 3:03
  • Thank yo for your answer, here the entire geojson file:github.com/sbenoist/Examples/blob/master/… – srmel Jul 2 '19 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.