Skip to content

Instantly share code, notes, and snippets.

@KerryHalupka
Created July 27, 2020 11:08
Show Gist options
  • Save KerryHalupka/8186877e2bc117b93e5cda170a5828b0 to your computer and use it in GitHub Desktop.
Save KerryHalupka/8186877e2bc117b93e5cda170a5828b0 to your computer and use it in GitHub Desktop.
Load shapefile at LGA granularity.
lga_gdf = gpd.read_file('./data/1270055003_lga_2020_aust_shp/LGA_2020_AUST.shp') #load the data using Geopandas
lga_gdf = lga_gdf[lga_gdf['STE_NAME16']=='Victoria'] #Select the data for the state of Victoria
lga_gdf['LGA_CODE20'] = lga_gdf['LGA_CODE20'].astype('str') # we will join on this axis, so both dataframes need this to be the same type
lga_gdf.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment