CityScope / CS_Urban_Indicators

Scripts for getting urban data and building urban indicators. A module for computing urban indicators in response to real-time CityScope inputs.
GNU General Public License v3.0
7 stars 4 forks source link

Package the `toolbox.py` as a separate API for python developers #19

Closed crisjf closed 4 years ago

crisjf commented 4 years ago

We talked about packaging the toolbox we are developing as separate API for python developers to work on CityScope modules. I'm creating this issue to keep track of ideas along these lines.

crisjf commented 4 years ago

I think we should restructure the classes such that Indicator.assign_geogrid_props is moved to the Handler class. As it is, the Handler is creating multiple copies of Handler.geogrid_props, one for each indicator. This is not an issue right now, but it might be if geogrid_props starts getting more complex.

An alternative behavior is to follow the Indicator.requires_geometry logic and create a property for each indicator that is Indicator.use_geogrid_props, such that the Handler passes geogrid_props to the Indicator.return_indicator function at each call. This might also improve integration with sklearn (#13) as people could just develop a Pipeline that works with the numbers from geogrid_props. In our use case, where each EconomicIndicator uses geogrid_props to convert geogrid_data to the model input, the Handler could just take care of that.

crisjf commented 4 years ago

See https://github.com/CityScope/CS_Brix