Make your selection

If data for the chosen indicator is not available for the selected date, the date will revert to the last day, for which there is data.

to

If data for the chosen indicator is not available for the selected date range, the date range will revert to the range, for which there is data.

© Petr Baranovskiy @ dataenthusiast.ca

How to use:

Click region names in the plot legend to add/drop regions.

Pointing mouse cursor at the lines in the plot will bring up pop-ups with more information. It will also open a pop-up menu in the top right corner:

Use it to adjust the plot to your liking. Particularly, check out these two options:

  • show closest data on hover, and
  • compare data on hover.

Click and drag mouse to select parts of the plot for closer inspection. Double-click to return back to the entire plot.

© Petr Baranovskiy @ dataenthusiast.ca

Select and download data

to
Download your selection

© Petr Baranovskiy @ dataenthusiast.ca

eRum2020::CovidR

What some indicators mean

Total cases are all cases since the start of the epidemic, i.e. cumulative cases. For the number of people currently ill, see “Active cases”.

Cases per 100,000 indicator shows the overall prevalence per 100,000 population since the pandemic started. For the share of people who are currently ill, see “Active cases per 100,000”.

Tests per 1,000: Due to the lack of clarification of what the “numtested” variable stands for in the original dataset, it is not clear whether it means the number of tests performed, or the number of people tested per 1,000 population (keep in mind that one person can be tested multiple times). If you are interpreting this data, I would recommend a more conservative assumption - i.e. the number of tests.

Case fatality rate shows a percent of those who have died among the diagnosed cases. Case fatality rate should not be confused with mortality rate. For mortality rate, see “Mortality per 100,000”.

Data

The data is downloaded from the Government of Canada official COVID-19 page at 6-hour intervals to minimize the load on the repository. Thus there may be a delay of up to 6 hours from the time canada.ca update their data to the moment it gets updated on my server.

To calculate “Cases per 100,000”, “Active cases per 100,000”, “Mortality per 100,000”, and “Tests done per 1,000”, I used Statistics Canada population estimates for the first quarter of 2020. Source: Statistics Canada Data table 17-10-0009.

Geospatial data used to render the map was retrieved from Statistics Canada. The polygons were then simplified to ensure quick rendering of the map.

Data issues

The data prior to March 21, 2020 was truncated due to being, for most indicators, highly incomplete or missing entirely, which resulted in various issues when computing and visualizing epidemiological indicators.

The dataset at some point contained very few negative numbers, which don't make sense in this context. These are/were almost certainly data entry errors on the part of the government, so I fixed this issue by converting all numbers in the dataset to their absolute values.

The map color palette may look different depending on the indicator and/or the date you have selected. This is due to some of the data being highly skewed, which causes leaflet::colorQuantile to fail. I had to program around this issue by creating a function that switches to leaflet::colorNumeric in such cases. colorNumeric doesn't use quantiles to break down the data, so the resulting color scheme doesn't look as good.

About the author

My name is Petr Baranovskiy, I am an R language enthusiast, and until recently I worked as a researcher with the University of Saskatchewan, where I specialized in economic policy analysis, economic and statistical modeling, energy policy, and the use of geospatial data for policy analysis. If you liked this app, please visit my blog at dataenthusiast.ca and follow me on Twitter.

Source code

You can find the app's source code here. And here is the code used to retrieve and pre-process population data and geospatial data.

License and Disclaimer

Click here to read the license.

THE USE OF THE GOVERNMENT OF CANADA AND/OR STATISTICS CANADA DATA IN THIS PRODUCT DOES NOT CONSTITUTE AN ENDORSEMENT BY THE GOVERNMENT OF CANADA AND/OR STATISTICS CANADA OF THIS PRODUCT.

THE APPLICATION IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OR CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE APPLICATION OR THE USE OR OTHER DEALINGS IN THE APPLICATION.