Shapefiles

Functions for loading and downloading shapefiles

point to a default location (Users/Documents/GEOG_FILES) if its empty, create it and download a simple geography file e.g. california

Do we want to create a registry?


source

download_and_unzip

 download_and_unzip (url, filename,
                     download_path=Path('/home/runner/Documents/SHP_FILES'
                     ))

source

check_shapefiles_path

 check_shapefiles_path (shp_path=Path('/home/runner/Documents/SHP_FILES'))

Looks for a Path User/Documents/SHP_FILES. Does it contain Shapefiles


source

load_gdf

 load_gdf (foldername=None, plot=False,
           shp_path=Path('/home/runner/Documents/SHP_FILES'))

Load shapefiles into gdf

Type Default Details
foldername NoneType None If no argument is entered, function will print out the list of shp files in the shape files directory
plot bool False
shp_path PosixPath /home/runner/Documents/SHP_FILES
ca = load_gdf('ca_counties', plot=True)

load_gdf()
Available shapefiles are:  atlanta_hom atlanta_hom LSOA_2021_BOUNDARIES_V4 ca_state ca_counties ca_places