Uncaught TypeError: undefined does not have a method named "concat"(…)
Looking at any timeperiod in January will cause Adelaide to disappear from the table and then the frontend tries to fire a callback on an object (Adelaide's row) which doesn't exist anymore.
2. "Most recent data" for Adelaide is erroneously displayed on the table
In selected_data(), if the user is selecting "Last Day", the function filters data for which date_filter = data['most_recent'] == 1. The most_recent column is generated by the SQL query using a window:
rank() OVER (PARTITION BY street, direction, day_type, period ORDER BY dt DESC) AS most_recent,
This is not aware of "most recent" dates for other streets.
Two fixes:
[x] Change how the most_recent column is generated in SQL to reflect recentness of all data in that day type, time period, etc.
[x] Make row generation in the database resilient to missing data
A sensor on Adelaide has been down for a few weeks resulting in 2 problems:
1. App partially freezes when switching to a timeperiod where data is fully missing
Error message described here
Looking at any timeperiod in January will cause Adelaide to disappear from the table and then the frontend tries to fire a callback on an object (Adelaide's row) which doesn't exist anymore.
2. "Most recent data" for Adelaide is erroneously displayed on the table
In
selected_data()
, if the user is selecting "Last Day", the function filters data for whichdate_filter = data['most_recent'] == 1
. Themost_recent
column is generated by the SQL query using a window:This is not aware of "most recent" dates for other streets.
Two fixes:
most_recent
column is generated in SQL to reflect recentness of all data in that day type, time period, etc.