focusconsulting / housing-insights

Bringing open data to affordable housing decision makers in Washington DC. A D3/Javascript based website to visualize data related to affordable housing in Washington DC. Data processing with Python.
http://housinginsights.org
MIT License
58 stars 110 forks source link

Persist missing address id in create_project_subsidy_csv() when returned from mar api call #592

Open jkwening opened 7 years ago

jkwening commented 7 years ago

As part of the logic for deduping projects from our multiple sources we sometimes make a call to mar api to get the missing mar id. Currently, that information is used to identify any duplicate project but not persisted in the output csv files (_project.csv & _addre.csv). We then make another mar api call in the cleaner code where we attempt to clean up any missing geocode for a given project.

To minimize unnecessary calls to mar api during the loading process, especially since we have a mar table, we should update the code to persist the resulting mar id during create_project_subsidy_csv() method.