Building maps with COVID-19 data in WordPress

Recently a lot of users have started using Interactive Geo Maps plugin to create interactive maps with data from the new coronavirus (covid-19).

Here are some screenshots of maps created using the plugin:

US map divided by states with COVID-19 data
US Map
Australia Map
World map with clusters of covid-19 confirmed cases
World Map

Portugal Map

These images have data updated on March 25th 2020. You can click the images to open the interactive version of each map.

Sometimes it might be tricky to get the data you need correctly formatted, unless you plan to add the data manually. So in each article there are some tips on how to get the data, sometimes automatically, to populate your maps. Since the plugin allows you to write custom javascript to manipulate the data used by the map, we can use this to fetch external content and format it to be compatible with the map. There’s some reliable data sources out there, which are made available for research and educational purposes, so if your project fits, you can use those data sources.

The data repository by Johns Hopkins CSSE is one of those examples. They have been doing amazing work collecting the data and making it available in this public repository. They provide data for all the world and some more detailed data for specific countries like the US, which allows us to create a US specific map. They mention they might also do this at county level, which would allow us to even create maps for individual states with county information.

The example maps linked above, contain some javascript code to exemplify how you can get that data. Remember to credit the source and help if possible.

The maps are able to have markers with different sizes and colours, heatmaps created automatically based on available data, click actions and custom tooltip content, automatically populated with the available data.

The plugin also has a free version, but it’s limited in what you can do. It’s not possible to have markers with different sizes, read from external data or colour regions in different colours, but you can create a simple map with the information about the affected areas for any country.

Feel free to contact me if you plan to make a similar map and have any particular question.

Interactive Geo Maps

Try it for 7 Days

Posted by Carlos Moreira

Web developer based in Porto, Portugal, working mostly with WordPress. Disclosure: Some of the links in this blog are 'affiliate links.' This means if you click on a link to a commercial product and purchase the item, I will receive an affiliate commission.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.