Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 742 Bytes
"""Example using the Cow API to generate a shapefile."""
from io import BytesIO
import json
import requests
import geopandas as gpd
def main():
"""Our main method."""
url = (
reg = requests.get(url)
jsobj = reg.json()
for name in ['events', 'stormreports']:
# This feels hacky, but I did not find another means yet to do it
buf = BytesIO()
events = gpd.read_file(buf)
events.to_file(name + ".shp")
if __name__ == '__main__':
You can’t perform that action at this time.