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.
- {morpc-0.2.5/morpc.egg-info → morpc-0.2.7}/PKG-INFO +1 -1
- {morpc-0.2.5 → morpc-0.2.7}/morpc/__init__.py +1 -1
- {morpc-0.2.5 → morpc-0.2.7}/morpc/morpc.py +5 -1
- {morpc-0.2.5 → morpc-0.2.7/morpc.egg-info}/PKG-INFO +1 -1
- {morpc-0.2.5 → morpc-0.2.7}/.gitattributes +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/.github/workflows/python-publish.yml +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/.gitignore +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/README.md +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/demo/morpc-py-demos.ipynb +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc/census/__init__.py +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc/census/census.py +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc/frictionless/__init__.py +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc/frictionless/frictionless.py +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc.egg-info/SOURCES.txt +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc.egg-info/dependency_links.txt +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc.egg-info/requires.txt +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/morpc.egg-info/top_level.txt +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/pyproject.toml +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/release_new_package.md +0 -0
- {morpc-0.2.5 → morpc-0.2.7}/setup.cfg +0 -0
|
@@ -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
|
-
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|