NYCPlanning / labs-waterfront-access

Other
3 stars 0 forks source link

182: Update carto SQL queries to match updated wam_wpaas view #184

Closed bfreeds closed 4 years ago

bfreeds commented 4 years ago

This PR addresses #182 by updating the SQL queries that calculate project statistics (on the about page), and pulls in profile data from Carto.

Note

In app/routes/about.js, where we calculate the stats for "publiclyowned":

-- app/routes/about.js
  WITH
  publiclyowned AS (
    SELECT
      count(*)
    FROM planninglabs.publiclyownedwaterfront -- <== old view
    WHERE status LIKE 'Constructed%25'
  ),

The new view, wam_publiclyownedwaterfront does not have a status or construci field to query on: image.png.

This PR does not change the publiclyowned view, since there was nothing to query on with the new view.

Check that updates are successful: