Option supports 'point' and 'polygon' keywords. Default is 'None' which would exclude the geometry from the response.
How to Test It
Run tests python -m pytest
Test with example in notebooks/space2stats_api_demo.ipynb or your variation
Other notes
I tried generating an object that we could directly read into a GeoDataframe, but I ran into serialization issues when returning a shapely.Point object in the response. The other alternative would be to build a valid feature collection for a geojson that could be read directly, but that would match our expected Dataframe response. Right now, the solution is to convert the geometry column to a shapely.Point or shapely.Polygon with something like the following:
What I Changed
Option supports 'point' and 'polygon' keywords. Default is 'None' which would exclude the geometry from the response.
How to Test It
python -m pytest
notebooks/space2stats_api_demo.ipynb
or your variationOther notes
GeoDataframe
, but I ran into serialization issues when returning ashapely.Point
object in the response. The other alternative would be to build a valid feature collection for a geojson that could be read directly, but that would match our expectedDataframe
response. Right now, the solution is to convert thegeometry
column to ashapely.Point
orshapely.Polygon
with something like the following: