2

I am trying to read to geopandas what looks like a legitimate shapefile:

gpd.read_file('https://github.com/altcoder/philippines-psgc-shapefiles/blob/master/source/2015/Municities.zip')

However, I am getting a driver error:

DriverError: '/vsimem/dff0663a4e584987848e40266f6b73e8' not recognized as a supported file format.

Searching unfortunately did not produce useful clues. I hope someone who knows geopandas or fiona could help.

1 Answer 1

5

When loading from GitHub, you need to pass a link to raw version of zip file. Otherwise, it links to GitHub page, not the file.

gpd.read_file('https://github.com/altcoder/philippines-psgc-shapefiles/raw/master/source/2015/Municities.zip')
1
  • Thanks for helping a beginner like me. Learning everyday!
    – gio888
    Commented Dec 11, 2020 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.