Tag: geospatial data

COVID-19 Canada Data Explorer

[pinned post – scroll down for recent content]
Click picture to open the app

Update: the COVID-19 Canada Data Explorer was endorsed by the Macdonald-Laurier Institute – one of Canada’s leading public policy think tanks!

Update 2: My public policy brief Designing COVID-19 Data Tools, co-authored with Ken Coates and Carin Holroyd, was published by the Johnson Shoyama Graduate School of Public Policy, University of Saskatchewan. The brief uses COVID-19 Canada Data Explorer as an example, and makes a comparative overview of COVID-19 data analysis and visualization tools available from Canada’s federal and provincial governments.

Update 3: eRum2020::CovidR
This is a more or less final version, so here is the source code for the app. And here is the code used to retrieve and pre-process geospatial data.

* * *

In the times of the pandemic, the data community can help in many ways, including by developing instruments to track and break down the data on the spread of the dreaded coronavirus disease. The COVID-19 Canada Data Explorer app was built with R, including Shiny and Leaflet, to process the official dataset available from the Government of Canada. They do have their own data visualization tool, but it is very basic. You can do so much more with the available data!

I hope that my app will help public health professionals, policymakers, and really anyone to stay informed about the course of SARS-CoV-2 epidemic in Canada.

Some Things to Keep in Mind (Technical Stuff Here)

The app runs on a free version of Shiny Server, which doesn’t allow to serve Shiny applications using SSL/TLS encryption. Hence HTTP connection instead of HTTPS – your browser may say that “connection is not secure”. I am aware that there may be a way to force connection through HTTPS using reverse proxy as described here. However, these instructions are well over 4 years old, and the required library libapache2-mod-proxy-html is no longer available; no replacement for Ubuntu 18.04 either. If you know how to do this on Apache (not Nginx), I’d very much appreciate your advice (please use this contact form to reach me).

The data is downloaded from Canada.ca at 6-hour intervals to minimize the load on the data repository – there is likely a high demand due to the pandemic. This means that there may be a delay of up to six hours from the time Canada.ca update their data to the moment it is updated on my server.

GIS Day!

Yesterday was a GIS Day! Congratulations to everyone who loves maps, GIS, and working with spatial data! And as you may have guessed from my choice of this blog’s header image, I am one of those people. So, to mark the day, here are some links to great sources of geospatial data and other GIS-related stuff that you may find useful:

OpenStreetMap (OSM) data: a list of sources of geospatial data from OpenStreetMap project.

GADM: Global Administrative Areas Database. GADM goal is to map the administrative areas of all countries, at all levels of sub-division at high spatial resolution. Very R-friendly: stores data as .rds files formatted for sf and sp packages, in Geopackage (.gpkg) format, as shapefiles (.shp), and as KMZ files.

Canadian GIS: a collection of Canadian GIS and geospatial resources.

Statistics Canada 2016 Census Boundary Files: Statistics Canada official geospatial data repository.

CensusMapper: an API and an online tool to create interactive custom maps based on Statistics Canada census data. CensusMapper API is used in the cancensus R package.

Bounding Box Tool: what it says on the tin. Can be very handy when you are making maps and need coordinates for a bounding box.

Geocomputation with R: an excellent (and very up-to-date) textbook on using R to work with geospatial data. Has a freely available online version and a print version.

r-spatial.org: a website and blog about using R to analyze spatial and spatio-temporal data.

GeoPackage: open source, free, cross-platform, easy to use, and compact format for geospatial information – a newer, better alternative to shapefiles.

( ! ) My choice of, and my opinions on these sources/products, are entirely unsolicited and are based exclusively on my own experience of using them.