Giter Site home page Giter Site logo

johanley / covid-19-canada Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 196.86 MB

COVID-19 stats reported by Canadian governments. Supporting screenshots. CSV, JSON. Three months of data, from 2020-03-31 to 2020-06-30 inclusive.

HTML 15.53% Java 52.93% CSS 2.62% JavaScript 28.91%
covid-19-canada covid-19 screenshots json stats charts dataset provinces federal canada

covid-19-canada's Introduction

COVID-19 stats reported by Canadian governments

These 4 data sets, all starting as of 2020-03-31, ending 2020-06-30:

  • deaths (cumulative)
  • known cases, both confirmed and probable/presumptive (cumulative)
  • tests completed (cumulative)
  • hospitalized patients (not cumulative, current day only)

For QC, NL, and NU the number of tests completed is not available. Instead, those jurisdictions report the number of people tested. That's a lower number, since people can get tested more than once.

Details about the source data are here.

Recommended tables and charts

Most people would prefer to view the data in this project using this github-pages site.

(The main tool used to generate the above charts is an excellent tool called plotly.js.)

Basic tables and charts

In these basic tables and charts for the various jurisdictions, the nominal values always link directly to the screenshot from which the data-point originates. In a few cases the link is missing.

Warning: the bar charts presented here don't render well (they max out) when the screen width is small. If you see a problem, try using landscape instead of portrait.

Other info

The source of these stats are screenshots of various government web pages. The screenshots are taken at about 21:00 ADT each day (after the update from BC).

If a jurisdiction hasn't updated that day, then it's recorded here as "N" (not updated).

Recording the actual screenshots is in imitation of this project in the US. Screenshots are more robust than relying on archive.org's Way Back Machine.

The raw data is stored in simple csv files. The data is also available in the json format. These basic tables are charts are generated by scripts using the .csv files as the sole data source. (They are simply generated as markdown, and posted to this github repository.)

Daily tasks

The daily tasks needed to maintain the data are done at the end of the day, after all jurisdictions have updated:

  • create a new directory in the data/screenshots directory
  • follow the naming convention for the dir name: for example 2020-04-26_21h15mADT (the underscore is needed!)
  • save screenshots of the various government web pages in that directory
  • manually edit the .csv files in the data/csv directory to reflect the day's numbers; these .csv files form the database
  • if a jurisdiction has not had an update for that day, then an 'N' is recorded for that day (no update)
  • run the script named MarkdownScript to generate markdown files from the new data
  • push the files onto the github repo
  • verify the data, usually using the links on this page to browse the new data
  • if any errors, apply corrections
  • run the script named HtmlScript to generate content for the github pages associated with this project
  • push the files onto the github repo

This process takes about 30-45 minutes.

covid-19-canada's People

Contributors

johanley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

covid-19-canada's Issues

CA time series - daily change - reporting artifacts

Daily-change time series for CA on the home page is very spiky. This is very likely an artifact of the timing of reporting. ON and QC are two large jurisdictions. If the timing of reporting is not uniform, then this is exactly the kind of wild variation in the daily values for CA you would expect.

These large swings are reporting-artifacts. They should be removed because they are pretty meaningless, and downright misleading.

Instead, for the daily changes for CA, show a running average value. This will give a much more realistic picture of what's really going on.

Suppress the link if there's no supporting screenshot.

Most data has a supporting screenshot, but there are exceptions.
If the screenshot doesn't support the data, then no link to the screenshot should be generated.

The following should not have a link to a screenshot.

Tests-performed :

  • NB from 2020-03-31 to 2020-04-16 (inclusive). This exception occurred because of my error in collecting the data.

Hospitalizations (all date ranges are inclusive; all of these occurred because I started collecting this statistic late, about mid-April):

  • ON 2020-03-31 to 2020-04-01
  • QC 2020-03-31 to 2020-04-06
  • NB 2020-03-31 to 2020-04-05
  • NS 2020-03-31 to 2020-04-06
  • NL 2020-03-31 to 2020-04-03

Markdown only: bar charts render poorly when screen-width is small.

In markdown world, the bar charts are truncated/maxed out when the screen-width is small.

(This issue applies only to the simplistic charts implemented in markdown; it doesn't apply to the better charts implemented with plotly.js)

This is a result of the implementation in github's markdown. That tool has no fine control over the CSS, as far as I can see. I have no means of changing the style of the table.

Mitigate: hold the device in landscape mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.