NYCPlanning/labs-community-profiles

Update ACS tooltip for floodplain chart

Closed this issue · 1 comments

The info circle next to the indicators, the source should be updated to the American Community Survey 2013-2017 5-Year Estimates (it’s currently 2012-2016) for the following indicators:

  • Median Household Income
  • Total Units Owner Occupied
  • Owner Occupied Units with Mortgages
  • Renter Occupied Units Cost Burdened
  • Owner Occupied Units Cost Burdened

The existing 2012-2016 ACS tooltips come from the community_district_profiles dataset on Carto. Each one is custom to the CD because it references the specific PUMA used. In order to reference more than 1 version of ACS data in the app, I'm implementing a temporary workaround of adding a new column to the database with a 2013-2017 ACS reference. This way specific sections of the CD profile can correctly cite 2013-2017 while the rest remain 2012-2016.

alter table community_district_profiles_v201903
add column acs_tooltip_2 text;

update community_district_profiles_v201903
set acs_tooltip_2 = REPLACE(acs_tooltip, '2012-2016', '2013-2017');