Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

cherryblossom000/vic-covid-stats-api

Repository files navigation

vic-covid-stats-api

A GraphQL API for COVID-19 stats in Victoria, Australia.

Why?

This was created for my own personal use, so that I can do things like this with Plash:

Screenshot of a macOS desktop, with COVID-19 statistics are overlaid on top of the desktop wallpaper

Random notes for myself

Stuff in notes/nuxt is obtained by going to the relevant site:

and then running this in the browser console:

console.log(JSON.stringify(__NUXT__, null, '\t'))

Click the ‘Copy’ button and paste it in the file.

For notes/{statistic_block,statistics_grid}.json:

use math
peach {|x|
	fn fetch {|i| xhs -I content.vic.gov.au/api/v1/paragraph/$x Accept:application/vnd.api_json 'page[offset]=='$i | from-json }
	var p1 = (fetch 0)
	to-json [[(all $p1[data]) (range (math:ceil (/ $p1[meta][count] 50)) | each {|i| all (fetch (* (+ $i 1) 50))[data] })]] > notes/$x.json
} [statistic_block statistics_grid]

License

MIT

About

A GraphQL API for COVID-19 stats in Victoria, Australia

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published