diff --git a/cenpy/__init__.py b/cenpy/__init__.py index 1ef6671..860f0aa 100644 --- a/cenpy/__init__.py +++ b/cenpy/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.0.0post3" +__version__ = "1.0.1" __author__ = "Levi John Wolf levi.john.wolf@gmail.com" from . import explorer diff --git a/cenpy/products.py b/cenpy/products.py index c879e68..dc928b0 100644 --- a/cenpy/products.py +++ b/cenpy/products.py @@ -191,12 +191,12 @@ def from_place( env_layer = self._api.mapservice.layers[env_name.name] if place_type == "County Subdivision": - placer = "STATE={} AND COUSUB={}".format( + placer = "STATE='{}' AND COUSUB='{}'".format( placerow.STATEFP, placerow.TARGETFP ) else: - placer = "STATE={} AND PLACE={}".format(placerow.STATEFP, placerow.TARGETFP) + placer = "STATE='{}' AND PLACE='{}'".format(placerow.STATEFP, placerow.TARGETFP) env = env_layer.query(where=placer) print( @@ -219,7 +219,7 @@ def from_place( replace_missing=replace_missing, ) if strict_within: - geoms = geopandas.sjoin(geoms, env[["geometry"]], how="inner", op="within") + geoms = geopandas.sjoin(geoms, env[["geometry"]], how="inner", predicate="within") if return_bounds: return (geoms, data, env) return geoms, data @@ -258,7 +258,7 @@ def _from_bbox( # filter the records by a strict "within" query if needed if strict_within: involved = geopandas.sjoin( - involved, env[["geometry"]], how="inner", op="within" + involved, env[["geometry"]], how="inner", predicate="within" ) # Construct a "query" translator between the GeoAPI and the Census API @@ -348,7 +348,7 @@ def _environment_from_layer( cache_name = layername_match.target.lstrip("(ESRILayer) ") row = self._cache[cache_name].loc[item_name.name] return layer.query( - where="GEOID={}".format(row.GEOID), geometryPrecision=geometry_precision + where="GEOID='{}'".format(row.GEOID), geometryPrecision=geometry_precision ) def _from_name( @@ -386,7 +386,7 @@ def _from_name( replace_missing=replace_missing, ) if strict_within: - geoms = geopandas.sjoin(geoms, env[["geometry"]], how="inner", op="within") + geoms = geopandas.sjoin(geoms, env[["geometry"]], how="inner", predicate="within") if return_bounds: return geoms, data, env return geoms, data diff --git a/setup.py b/setup.py index d2b8d78..0e3be0d 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with open(init, "r") as initfile: firstline = initfile.readline() init_version = firstline.split("=")[-1].strip() -init_version = init_version.replace("'", "") +init_version = init_version.replace('"', '') with open(os.path.join(basepath, "README.rst"), "r") as readme: long_description = readme.readlines()