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

Organize indicators in an object oriented way #6

Closed crisjf closed 4 years ago

crisjf commented 4 years ago

Indicators are developed each in its own file. They are then imported and instantiated in listen.py script, together with a Handler object for the table.

Every indicator subclass should be self-contained, meaning that if it relies on "fitted" data (or some aggregate of data), the function that does the fitting should be defined inside the subclass. No outside functions or scripts should be needed to run the indicator. Good practice is to add a statement in the load_module function such that it calculates the indicator parameters when it does not find them.

setup function in Indicator class should be able to take newly defined parameters. load_module function should not, as all parameters needed to load the module should be defined or passed to the setup function.

crisjf commented 4 years ago

Can we now delete innovators_module.py @doorleyr ?

crisjf commented 4 years ago

Commit 2864a8bd0de46656260602eb95b1ff653668b8a6 finishes implementing this.