Open TracyLinder opened 2 months ago
This is important to filter out 'LA' permits
Start/End Date logic for TURPS TURPS have 2 sets of activity dates. Original dates, and extension dates.
@Charlie-Henry I added helpful things for the AMANDA query. I'm not sure I remembered it all, but it should be good to go.
Updates to the query:
Here's the query, we can review if you're interested @TracyLinder?
SELECT
f.FOLDERRSN,
f.FOLDERNAME,
f.INDATE,
f.ISSUEDATE,
f.FOLDERDESCRIPTION,
f.FOLDERCONDITION,
f.CUSTOMFOLDERNUMBER,
TO_CHAR(fi.START_DATE, 'YYYY-MM-DD HH24:MI') AS START_DATE,
TO_CHAR(fi.END_DATE, 'YYYY-MM-DD HH24:MI') AS END_DATE,
TO_CHAR(fi.EXTENSION_START_DATE, 'YYYY-MM-DD HH24:MI') AS EXTENSION_START_DATE,
TO_CHAR(fi.EXTENSION_END_DATE, 'YYYY-MM-DD HH24:MI') AS EXTENSION_END_DATE,
ff.LOCATION_NAME,
ff.CLOSURE_TYPE,
ff.SEGMENT_ID,
ff.LENGTH,
ff.WIDTH,
ff.NUM_LANES
FROM
folder f
LEFT OUTER JOIN (
SELECT
FOLDERRSN,
MAX(
CASE WHEN INFOCODE = 75980 THEN
INFOVALUEDATETIME
END) AS START_DATE,
MAX(
CASE WHEN INFOCODE = 75985 THEN
INFOVALUEDATETIME
END) AS end_date,
MAX(
CASE WHEN INFOCODE = 75993 THEN
INFOVALUEDATETIME
END) AS extension_start_date,
MAX(
CASE WHEN INFOCODE = 75994 THEN
INFOVALUEDATETIME
END) AS extension_end_date
FROM
FOLDERINFO
GROUP BY
FOLDERRSN) fi ON f.FOLDERRSN = fi.FOLDERRSN
LEFT OUTER JOIN (
SELECT
FOLDERRSN,
C01 AS location_name,
C02 AS closure_type,
N01 AS segment_id,
N02 AS length,
N03 AS width,
N04 AS num_lanes
FROM
FOLDERFREEFORM
WHERE
FREEFORMCODE = 1010
AND C02 in('Traffic Lane : Dimensions', 'Closure : Full Road', 'Closure : Alley', 'Closure : Sidewalk', 'Parking Lane : Dimensions')) ff ON ff.FOLDERRSN = f.FOLDERRSN
WHERE
f.FOLDERTYPE = 'RW'
AND f.SUBCODE = 50500 -- Temporary use of ROW permits (TURPs)
AND f.STATUSCODE = 50010 -- active permits
AND f.INDATE > TO_DATE('2017-12-31', 'yyyy-mm-dd') -- this filters out old 'LA' permits
AND ff.segment_id IS NOT NULL
@TracyLinder I think we can set up some time to review my first attempt of setting this this feed up. I passed the JSON schema validator with this ✅.
Map: https://austin.maps.arcgis.com/apps/mapviewer/index.html?webmap=4ca960105b34455ebea0bbede29bfdec
Things to talk about:
@TracyLinder, I've updated the AGOL map to include the folderrsn and I also filtered out those secondary permits
https://austin.maps.arcgis.com/apps/mapviewer/index.html?webmap=4ca960105b34455ebea0bbede29bfdec
Tracy will do a quick spot check of the map data, then schedule a meeting with stakeholders to review further.
Next Steps: