NYCPlanning / labs-cp-platform

http://capitalplanning.nyc.gov
2 stars 2 forks source link

11261 Capital Planning Explorer - Update to devdb release 22q2 and fix column references #84

Closed dhochbaum-dcp closed 2 years ago

dhochbaum-dcp commented 2 years ago

We need to update the Capital Planning Explorer to use the newest version of DevDB. The new version has already been uploaded to the planninglabs Carto account at a table called devdb_housing_pts_22q2.

Changing the code to point to the new table should be as simple as updating a line. I (@Tyler John Matteo ) tried to do this but noticed some inconsistencies between the property keys in our code and the column names. For example our code is looking for a column called "classa_init" when the column in Carto is actually "classainit". Note that the column is also "classainit" in the table we're currently using in production so some of this functionality has been broken for a while. We want to fix these bugs as best we can as a part of this task so that the switch over actually passes QA. Fixing these inconsistencies is tricky because we don't know what the column names used to be but here is what the engineer working on this task should do:

switch "db_tables.js" over to use the new table.
Go through files in the app that reference housing developments in their name ("HousingDevelopmentListItem.jsx", "HousingDetailPage.jsx", etc) and make sure the property keys we're using on geojson features actually match what they are in Carto. So for example if you see something like "feature.properties.classa_init" in our code, look for that column in the table. If you don't see it, look for a column with a similar name, like "classainit" and change the code to match. If you think you see our app looking for a property that doesn't seem to exist under any name in Carto, reach out to [@Tyler John Matteo](https://dev.azure.com/NYCPlanning/ITD/_sprints/taskboard/Open%20Source%20Engineering/ITD/2022/Q4/Sprint%20W?workitem=11261#) 

Once this is ready to test in staging, we should reach out to the Housing team via Sam Levy to QA. (@James Piacentini ).

In the course of working on this, I discovered other issues with the Housing Development map, which have been corrected:

netlify[bot] commented 2 years ago

Deploy Preview for cp-platform ready!

Name Link
Latest commit 11746c018151250aa1bb1a0cd5b96f1bfca77fe4
Latest deploy log https://app.netlify.com/sites/cp-platform/deploys/6377aa34055392000b6676fd
Deploy Preview https://deploy-preview-84--cp-platform.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.