sfbrigade / datasci-sba

Solving problems with the Small Business Administration
10 stars 18 forks source link

Improved Data Model for final table to use for visualizations #45

Closed VincentLa closed 7 years ago

VincentLa commented 7 years ago

1. Brief Summary of what this PR accomplishes (140 characters or less. If you find trouble describing what you are doing in this length, consider breaking the PR into multiple ones.)

Improving the data model for trg_analytics.sba_region_level to conform to API for front end work.

2. Link to Trello Ticket

https://trello.com/c/AfLJ6K2q/32-change-data-model-of-trganalyticssbaziplevel-to-be-region-instead-of-specifically-zips

3. More detailed description and other questions to address in code review

  1. Cleaned up sba_district_office field which had special characters that I trimmed off the ends
  2. Changed data model of trg_analytics.sba_region_level to instead of just zip code level, have it more general to region_type and region
  3. Correspondingly, changed the name of the table from trg_analytics.sba_zip_level to trg_analytics.sba_region_level.
  4. Note that our pipeline is OK, but this will break other changes such as analysis code and the django models. We could potentially think about integration tests, but I think that might be a lot of work (@avdonovan)

4. Remember to tag reviewers!