NYCPlanning/labs-layers-api

Update CD profiles aliased db views to use July 2020 data

Closed this issue · 1 comments

NOTE: Data will be provided end of day Thursday

In order to populate the new July 2020 data into Community Profiles, one PSQL database view on Carto need to be recreated so that they are based on the new data tables:

  • community_district_profiles

Steps involved:

  • Obtain the updated tables from Planning Coordination
  • Upload them to Carto and add a vYYMM suffix if it isn't already included in the file name https://nycplanning-web.carto.com/
  • In the layer-api repo, navigate inside the scripts/aliased-views folder.
  • Read the README. (add links to README in playbook)
  • Update the CSV file to include the new data tables names.
  • Run the Python script which recreates the aliased views on Carto
  • Push the CSV file changes to GitHub

Notes for July 2020 data update:

  • We decided to no longer calculate the lot areas by land use type, so the the "lot_area" fields are blank (these are only used for user downloads)

  • There are four new fields at the end of the file to document the data versions: v_pluto, v_acs, v_facdb, and v_crime

  • The "cd_son_fy2018" field is now empty to avoid confusion year over year (this can be addressed in a future update)