This weekend, Zach Latta & I built the first Redwood app in production: Predict COVID-19. It’s an interactive visualization of the global COVID-19 pandemic, allowing you to see the case trajectories of each country. The main takeaway: the U.S. outbreak is 10 days behind Italy, & tracking it exactly. (see pink line vs green below)
- We used a SQLite database in development, then Heroku Postgres for early deployments, but switched to MySQL on AWS RDS for the final deployment
- We used 3 tables: Country (for grouping/storing country info), Day, & DailyCount (each of the statistics for a day for a country)
- We used a lambda function for the data scraper (does standard web scraping & saves to the database)
- Deployment is hosted on Netlify, with Pingdom analytics
We used 3 cells for the homepage, which dictated the general technical structure of the frontend.
Countriesis the left sidebar, where you can pick which countries to plot & which is the default. I used basic React Hooks for state management here, nothing crazy.
DailyCountsis the main graph, rendered with Recharts.
Statsis the sparklines + stats at the bottom. We auto-detect what country you’re in & show stats for that country if it’s represented on the site.
It’s entirely open source, here: https://github.com/lachlanjc/covid19
Shoutout to the entire Redwood team for their incredible assistance in deploying the project, including setting up the database <3
Check out the site, & ask us anything about the development experience!