Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import numpy as np
  2. import pandas as pd
  3. import shapefile as shp
  4. import matplotlib.pyplot as plt
  5. import seaborn as sns
  6.  
  7. sns.set(style="whitegrid", palette="pastel", color_codes=True)
  8. sns.mpl.rc("figure", figsize=(10,6))
  9.  
  10. #opening the vector map
  11. shp_path = "C:\Users\Jack\.spyder-py3\District_Boundary.shp"
  12. #reading the shape file by using reader function of the shape lib
  13. sf = shp.Reader(shp_path)
  14.  
  15. len(sf.shapes())
  16.  
  17. File "C:UsersJackAnaconda3libsite-packagesshapefile.py", line 646, in load
  18. raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName))
  19.  
  20. ShapefileException: Unable to open C:UsersJack.spyder-py3District_Boundary.dbf or C:UsersJack.spyder-py3District_Boundary.shp.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement