-
Notifications
You must be signed in to change notification settings - Fork 11
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
Track technology and upgrade tallies over time. Expose on website. #265
Comments
Yeah this would be a very interesting statistic to watch over time, we could also partially backfill using the git history. |
I'm experimenting with running this code on old checkouts of /results to generate historical data. Roughly: while co_date > datetime(2021, 7, 1):
co_date -= timedelta(days=7)
cmd = f"git checkout `git rev-list -n 1 --before=\"{co_date.strftime('%Y-%m-%d %H:%M')}\" main`"
get_tech_and_upgrade_breakdown()
os.rename("results/breakdown.json", f"results/breakdown-{co_date.strftime('%Y-%m-%d')}.json") |
That's being somewhat stymied by the API changes a couple of months back (combined-suburbs.json etc). Will change to a pure geojson verison... |
Running against git history - takes about 2 minutes per cycle (currently running every 7 days, starting now moving backwards) |
FWIW project got to 100% address coverage on 31 July |
Oh woah this looks great, might be a good idea to have an option to only include data from July 31st onwards. Also maybe fixing the date so it will always be one week apart and new data can be added by just generating the missing weeks and appending to the file. |
Changed the processing to go old-to-new, starting on 23/5/23, and using 00:00 timestamp. |
In terms of getting it onto the site, I might just quickly make a new page /stats or something and generate a few charts using Chart.js |
Mockup I made with ChatGPT: https://lukeprior.github.io/nbn-upgrade-map/stats |
I'll fix the code to make it update the same file, so it's rerunnable, without lots of little files. Give me 30 mins |
The |
Yup, I think I broke it while reformatting/merging it. I'll just nuke it and rebuild it. |
Merged, |
I don't know if the git commands (in particular the checkout) will work within GHA. We may need a different version of the code which just appends progress.json with the current checkout values. |
Maybe a table on the stats page, for easier reading without lots of mouseover? |
There's already a function to generate this - get_tech_and_upgrade_breakdown() - but it just emits output to the console. It does take several minutes to run though, so shouldn't be included in every cycle.
The text was updated successfully, but these errors were encountered: