How to open geo-data in geo-pandas

by vgoklani   Last Updated May 15, 2019 21:22 PM

I've downloaded some geodata but I'm unable to import it into geopandas.

This is a sample of the geodata (I've trimmed the JSON object):

{'displayFieldName': 'NAME',
 'fieldAliases': {},
 'geometryType': 'esriGeometryPolygon',
 'spatialReference': {'wkid': 102100, 'latestWkid': 3857},
 'fields': [],
 'features': [{'attributes': {'OBJECTID': 2050,
    'PRECINCTID': '01029B',
    'NAME': 'COLUMBUS 29-B',
    'COUNTY': None,
    'ESS_PRECINCT_NO': None,
    'ESS_PRECINCT': None,
    'CITY_OR_VILLAGE': None,
    'SCHOOL_DISTRICT': None,
    'TOWNSHIP': None,
    'HOUSE_DISTRICT': None,
    'SENATE_DISTRICT': None,
    'CONGRESS_DISTRICT': None,
    'POLICE_DISTRICT': None,
    'ROAD_DISTRICT': None,
    'FIRE_DISTRICT': None,
    'PARK_DISTRICT': None,
    'COURT_APPEALS_NAME': None,
    'BOARD_OF_ED_NAME': None,
    'LIBRARY': None,
    'EDUCATIONAL_SERVICE_CENTERS': None,
    'CAREER_CENTERS': None,
    'WINNINGPARTY': None,
    'TOTALBALLOTS': None,
    'SHAPE_Length': 26636.15475759097,
    'SHAPE_Area': 30443700.474467456,
    'POLLINGID': None,
    'POLLINGLOCATION': None,
    'LID': 'N/A',
    'Symbol': 'A'},
   'geometry': {'rings': [[[-9235687, 4854329],
      [-9235918, 4851467],
      [-9239010, 4854564],
      [-9235687, 4854329]]]}},
]}

I've tried the following:

import geopandas as gpd

df = gpd.read_file(filename)
df.head()

but it doesn't return any rows...

Is this standard geojson or a different format? What does "rings" mean here? My assumption was that there would be additional keys in the JSON schema for both latitude and longitude, but instead I see a list/array.

Thanks



Related Questions


Updated May 23, 2019 21:22 PM

Updated October 23, 2017 04:22 AM

Updated September 07, 2018 16:22 PM

Updated February 23, 2017 04:22 AM

Updated July 24, 2018 04:22 AM