Trying to learn to use Python to map some geographic data by following some tutorial and I can't seem to get them to work. I'm hoping this is just a simple error on my part.
First, the link(s) to the tutorials:
I am unable to get past the steps using code for the importing of the files.
My code is
import numpy as np import pandas as pd import shapefile as shp import matplotlib.pyplot as plt import seaborn as sns sns.set(style="whitegrid", palette="pastel", color_codes=True) sns.mpl.rc("figure", figsize=(10,6)) #opening the vector map shp_path = "C:\\Users\\Jack\\.spyder-py3\\District_Boundary.shp" #reading the shape file by using reader function of the shape lib sf = shp.Reader(shp_path) len(sf.shapes())
My error output is:
File "C:\Users\Jack\Anaconda3\lib\site-packages\shapefile.py", line 646, in load raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName)) ShapefileException: Unable to open C:\Users\Jack\.spyder-py3\District_Boundary.dbf or C:\Users\Jack\.spyder-py3\District_Boundary.shp.