Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create banner on web app to show "latest available data" #17

Open
sidetrackedmind opened this issue Mar 19, 2022 · 4 comments
Open

Create banner on web app to show "latest available data" #17

sidetrackedmind opened this issue Mar 19, 2022 · 4 comments
Assignees
Labels
frontend Issues related to the opentransit-metrics frontend. good first issue Good for newcomers

Comments

@sidetrackedmind
Copy link
Collaborator

sidetrackedmind commented Mar 19, 2022

Issue

Currently, it's impossible to tell the extent of historical data in S3 from the web app. A user may select dates outside the available range without knowing.

Goal

Create an indicator on the web app showing what data range is available. Something as simple as "Data available from 2022-03-01 to 2022-03-17" on the app somewhere. I think this could be by querying S3 and seeing the min/max available dates that have "observed-stats".

@sidetrackedmind sidetrackedmind added good first issue Good for newcomers frontend Issues related to the opentransit-metrics frontend. labels Mar 19, 2022
@sidetrackedmind
Copy link
Collaborator Author

There's a last_complete_date key in a json object in S3 - s3://opentransit-pdx/metrics-state/v1/metrics-state_v1_trimet.json.
We need to create a first_complete_date key and store in the same json. Then the banner would grab these dates and display them.

@sidetrackedmind
Copy link
Collaborator Author

dependent on - #24

@erikjasso erikjasso changed the title Create banner on web app to show "latest avaiable data" Create banner on web app to show "latest available data" May 13, 2022
@erikjasso
Copy link
Contributor

Status for Issue 17

Done:

  • write function that fetches data from a URL (fetchDataRange)
  • add fetchDataRange() to props
  • call fetchDataRange() from screens that use date picker (Dashboard and RouteScreen)

To do:

  • use real data
  • add tooltip to date picker indicating range of data
  • disable dates outside valid range

@erikjasso
Copy link
Contributor

Updated status for Issue 17

Done:

  • fetch data from S3

To do:

  • add tooltip to date picker indicating range of data
  • disable dates outside valid range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues related to the opentransit-metrics frontend. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants