morpc 0.2.5__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: morpc
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Data managment tools used by MORPC
5
5
  Author-email: MORPC data team <dataandmaps@morpc.org>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- __version__ = "0.2.5"
1
+ __version__ = "0.2.7"
2
2
 
3
3
  from .morpc import *
4
4
  from .frictionless import *
@@ -978,6 +978,8 @@ def assign_geo_identifiers(points, geographies):
978
978
  TODO: add docstring
979
979
  """
980
980
  import geopandas as gpd
981
+ import requests
982
+ from io import BytesIO
981
983
 
982
984
 
983
985
  # Create a copy of the input data so Python doesn't manipulate the original object.
@@ -1036,7 +1038,9 @@ def assign_geo_identifiers(points, geographies):
1036
1038
  raise RuntimeError
1037
1039
 
1038
1040
  # Read the polygon data
1039
- polys = gpd.read_file(filePath, layer=layerName, driver=driverName)
1041
+ r = requests.get(filePath, header = {"User-Agent": "Firefox"})
1042
+ polys = pyogrio.read_dataframe(BytesIO(r.content))
1043
+ # polys = gpd.read_file(filePath, layer=layerName, driver=driverName) # Return 403 due to changes in Census website
1040
1044
 
1041
1045
  # Extract only the fields containing the polygon geometries and the unique IDs. Rename the unique ID field
1042
1046
  # using the following format "id_{}".format(geography), for example "id_county" for the "county" geography level
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: morpc
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Data managment tools used by MORPC
5
5
  Author-email: MORPC data team <dataandmaps@morpc.org>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes