In [ ]:
#Import the us package
import us
#Get a dictionary of the URLs for NC
shpURL = us.states.NC.shapefile_urls()
#Get the county URL
shpURL['county']
In [ ]:
import geopandas as gpd
import pandas as pd
%matplotlib inline
In [ ]:
import urllib
urllib.urlretrieve(shpURL['county'],filename='foo.zip')
In [ ]:
import zipfile
zf = zipfile.ZipFile(file='foo.zip')
zf.extractall()
In [ ]:
gdf = gpd.read_file('tl_2010_37_county10.shp')
In [ ]:
gdf.dtypes
In [ ]:
gdf.loc[0]
In [ ]:
Durm = gdf[gdf['GEOID10'] == '37063']
In [ ]:
gdf.plot();