Web application to display nice charts for COVID case data.
GPL-3.0 License
This application presents data on the incidence of COVID-19. Currently, the data comes from The COVID Tracking Project, and the primary focus is on presenting time series charts of U.S. data by state, but we are trying to expand the scope as the project grows.
The application is hosted at http://covid-tracking-charts.herokuapp.com, and the code is available under GPL 3.
BTW, this is a labor of love developed for the purpose of public service. Currently we're getting by with a free Heroku account, but if any hosting provider wants to donate additional resources, get in touch—we could use a little more infrastructure capacity!
This is a Rails 6 application, but since all the data comes from the COVID Tracking Project API, we're not using ActiveRecord at the moment (though we could always add it if it became necessary to implement some particular feature). Instead, we're pulling all the data with Typhoeus, and caching it with Redis (currently for 6 hours), then feeding it to the svg-graph gem to draw nice charts.
Note that instead of partials and helpers, we're mostly using the Cells gem to break up views and controllers. The short summary, for those unfamiliar with this gem, is that a cell is sort of like a partial with its own controller context.
The easiest way to run a development instance of this application is probably to use Docker. The project already contains Docker configuration files, so docker-compose up
should start both a Rails server for the Web application and a Redis server to run the cache. Modify the paths in docker-compose.yml as necessary for your local filesystem bindings.
Currently, this application is hosted on the free tier of Heroku, with a free-tier RedisCloud add-on for caching. The application automatically deploys from the deploy
branch in this repo, as long as tests pass.
We develop test-first and story-first. Our normal workflow is to write a Cucumber scenario to document a new feature, and then develop each component necessary to make it pass test-first with RSpec. We run tests locally with Guard, and every branch and pull request is tested automatically on Travis.
We use WebMock and VCR to record interactions with remote services for testing. If you've never used these gems, this overview might be helpful.
Contributions are welcome! Please follow the following general guidelines if possible:
[#123]
is sufficient). When in doubt, follow existing entries._
or other translation helpers, and run rake gettext:find
if you've changed any translatable strings in your pull request.