Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # The folder where we will be saving our maps, used later on
  2. foldername = 'Maps'
  3.  
  4. # the name we'll be giving to our maps, also used later on
  5. filename = '2020Results'
  6.  
  7. # Open the 2020 precinct shape files with results, from the Harvard website, found in the Shapefiles/results folder.
  8. # Because the NAME column is sometimes letters, sometimes numbers, specifying the dtype of the column is important.
  9. Precincts20 = gpd.read_file('Shapefiles/results/pa_2020/pa_2020.shp', dtype={'NAME': str})
  10.  
  11. # PA district shapefiles found on the PA redistricting site: https://www.redistricting.state.pa.us/maps/
  12. CDDists = gpd.read_file('Shapefiles/districts/pa_cong/carter_boundaries.shp')
  13. HDDists = gpd.read_file('Shapefiles/districts/pa_shouse/2022 LRC-House-Final.shp')
  14. SDDists = gpd.read_file('Shapefiles/districts/pa_ssen/2022 LRC-Senate-Final.shp')