zachwinter / COVID-USA

An interactive timeseries built with Vue, D3 and the HTML5 <canvas>
https://covid-usa.app
41 stars 3 forks source link

Automate updates? #4

Open johnurbanik opened 4 years ago

johnurbanik commented 4 years ago

Hey, awesome visualization!

Out of curiosity, are you happy doing daily manual updates or would you like to move toward automating them? This could probably be done with heroku scheduler, github actions (assuming that you have heroku deploy on github push), or by modifying the server to fetch and store the assets on the local filesystem (and then update the data directory on a schedule via something like node-cron).

zachwinter commented 4 years ago

Thank you! I don't have much experience with automation. Is there an event I can hook onto when another repository has been updated? That feels "purer" than a cron job solution to me.

Either way, I need to stop putting this off. It's been easy to do so when it only takes 3 minutes to do manually.

p.s. How'd you find this project? Saw a pretty solid bump in traffic a few hours ago.

johnurbanik commented 4 years ago

RE event-driven updates, I don't believe you can do this without access to the repository's actions or hooks. You could ask JHU CSSE, but I wouldn't expect to hear back. Another option that might make it feel like a hook would be to use https://github.com/wei/pull and GitHub hooks, but that's just using a scheduler behind the scenes.

As far as traffic increase: https://twitter.com/CT_Bergstrom/status/1285416096070119425

zachwinter commented 4 years ago

Hey John – I attempted to implement a cron job the other day but it doesn't seem to be working. Would you be willing to take a look and help diagnose why?