catch-up commit + csv with 2024 data
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
poi.keywords,
|
||||
poi.default_image,
|
||||
poi.location,
|
||||
poi.location[0] as lattitude,
|
||||
poi.location[1] as longitude,
|
||||
poi.featured,
|
||||
poi.wayfinding_enabled,
|
||||
poi.visible_on_map,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--Using CTE to remove rows where nothing changed
|
||||
WITH livedata as (
|
||||
SELECT _id,
|
||||
is_operational,
|
||||
queue_time,
|
||||
queue_status_message,
|
||||
is_open,
|
||||
open_time,
|
||||
close_time,
|
||||
MIN(time_stamp) as time_stamp
|
||||
FROM knoebels."LZ_attractions_io" as livedata
|
||||
GROUP BY _id, is_operational, queue_time, queue_status_message, is_open, open_time, close_time
|
||||
)
|
||||
--WITH livedata as (
|
||||
--SELECT _id,
|
||||
-- is_operational,
|
||||
-- queue_time,
|
||||
-- queue_status_message,
|
||||
-- is_open,
|
||||
-- open_time,
|
||||
-- close_time,
|
||||
-- MIN(time_stamp) as time_stamp
|
||||
--FROM knoebels."LZ_attractions_io" as livedata
|
||||
--GROUP BY _id, is_operational, queue_time, queue_status_message, is_open, open_time, close_time
|
||||
--)
|
||||
SELECT livedata.time_stamp
|
||||
,livedata._id
|
||||
,poi.name
|
||||
@@ -29,6 +29,8 @@ SELECT livedata.time_stamp
|
||||
,keywords
|
||||
,default_image
|
||||
,location
|
||||
,location[0] as lattitude
|
||||
,location[1] as longitude
|
||||
,featured
|
||||
,wayfinding_enabled
|
||||
,visible_on_map
|
||||
@@ -40,13 +42,13 @@ SELECT livedata.time_stamp
|
||||
,minimum_unaccompanied_age_requirement
|
||||
,maximum_age_requirement
|
||||
,restriction_summary
|
||||
--FROM knoebels."LZ_attractions_io" AS livedata
|
||||
FROM livedata
|
||||
FROM knoebels."LZ_attractions_io" AS livedata
|
||||
--FROM livedata
|
||||
--This POI data comes from a massive JSON file hosted by attractions.io the app downloads it on first launch. Not sure how often it's updated or only as-needed
|
||||
JOIN knoebels."LZ_attractions_io_poi" AS poi ON livedata._id = poi._id
|
||||
-- This is my own "master" file for ride data, for data points not served by the attractions.io API. Handstamp inclusions/exclusions, capacity, duration, etc.
|
||||
JOIN knoebels.ride_master rm ON livedata._id = rm.attractions_dot_io_id
|
||||
-- fetch most recent price data, scraped from webpage, this can differ from the POI data used by the app
|
||||
LEFT JOIN (SELECT row_number() OVER (PARTITION BY ride ORDER BY time_stamp DESC) AS row_number, * FROM knoebels.ride_data_in) prices ON prices.ride = rm.ride and prices.row_number = 1
|
||||
--ORDER BY name, time_stamp
|
||||
--where name = 'Sklooosh'
|
||||
--ORDER BY name, time_stamp
|
||||
|
||||
Reference in New Issue
Block a user