Skip to content

Releases: City-of-Cleveland/cledatatoolkit

v1.0.2

29 May 20:20
0077253
Compare
Choose a tag to compare

Notes

This is a micro release with a couple new spatial tools, accessible in the spatial module.

New Dependencies

  • libpysal - Provides spatial helpers for determining neighboring polygons
  • requests - Now pinned to 2.31.0 due to ongoing bug with arcgis
  • arcgis - Now pinned to 2.2.0 to avoid query bugs in 2.3
  • dask[dataframe] - To accompany arcgis and avoid error message about dask queries.

New Functions

optimal_single_location - This function identifies the geography from a GeoDataFrrame that will be the optimum location to add some kind of point of interest. It does this by:

  1. Iterating through the polygons that don't have access to that thing. There is a method built in that will make sure polygons are contiguous, which could be helpful in some contexts where you want to look for a solid cluster of newly served locations.
  2. Buffering out a specified distance from that point as the crow flies
  3. Checking which previously "unserved" areas gain access
  4. Summing a target column from them.
  5. Identifying the geography with the greatest sum growth in access.
  6. Return the results as indexes of the original dataframe

arcgisquery_to_geodataframe - This function converts an arcgis FeatureSet object (the result of a query on a service) to a geopandas GeoDataFrame.

We have a lot of ways to do this already. I am finding issues with how arcgis formats geometries which ends up with maps with holes in them. To be fail-safe, this will validate the geometries with shapely and replace them before returning a geopandas GeoDataFrame

v1.0.0

26 Mar 14:32
Compare
Choose a tag to compare

The first official release of the cledatatoolkit!