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

parse stav hall mealtime report data #730

Merged
merged 11 commits into from
May 20, 2024
Merged

Conversation

drewvolz
Copy link
Member

@drewvolz drewvolz commented May 12, 2024

Parses Stav Mealtime data into a json API

Usage

 ➜ curl http://localhost:3000/v1/reports/stav | jq
 
 # abridged array for demo, expect up to 7 charts
[{
  "title": "Saturday, May 11",
  "times": ["07:45:00","08:00:00","08:15:00","08:30:00","08:45:00","09:00:00","09:15:00","10:45:00","11:00:00","11:15:00","11:30:00","11:45:00","12:00:00","12:15:00","12:30:00","12:45:00","01:00:00","01:15:00","01:30:00","04:15:00","04:30:00","04:45:00","05:00:00","05:15:00","05:30:00","05:45:00","06:00:00","06:15:00","06:30:00","06:45:00","07:00:00","07:15:00","07:30:00"],
  "data": [9,18,15,38,51,41,24,124,142,122,77,98,105,122,112,103,108,78,1,17,44,86,93,110,120,108,128,99,123,84,128,93,1]
  },
  ...
]

Potential applications

  • Busyness charts/data in stav menu
  • Busyness charts/data in stav hours
  • Historical data collection (if we start saving it)

Todo

  • return the data in a promise because the window dom event isn’t fast enough
  • return a correctly typed error message object if an error occurs
  • assertion tests

* wrap and resolve promise and return parsed data
* add custom report type in error
* exclude chart error from console
@drewvolz drewvolz changed the title parse bonapp mealtime data parse stav hall mealtime report data May 19, 2024
@drewvolz
Copy link
Member Author

I'm thinking about creating groupings of this data on the server such that the default we return is hourly instead of every 15 minutes

@hawkrives hawkrives merged commit 49832b9 into master May 20, 2024
8 checks passed
@hawkrives hawkrives deleted the drew/mealtime-data-bonapp branch May 20, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants