Parsing online corona virus data into a map with Processing


I was inspired by a fellow South African developer who made an online map using data from the Pretoria University Data Science department. You can check it out here:

The actual data is from this GitHub repo here: – full credit to authors here:

They make data available in csv format, so the Processing code needed to parse that. Here is my code on Github:

You can use Desktop or Android mode to run it.

How it works:

Although it is possible to use a real map for the background, I opted for an image since that saves time and bandwidth. The case information is parsed from the csv source and added up in an Array, sorted by province. *Update: there are now too many cases to track each one, the researchers are collating up to date provincial results here, I changed the source code to use that.

The numbers are inserted into the correct place, using a formula to account for resizing of the image (on Android, there are many different screen sizes and I wanted to have a full-screen image)

What’s next?

Processing code is basically Java, and it is not difficult to add to a “real” Android app, using Android Studio. I have included this map sketch as well as my virus spread simulator to a full Android Corvid-19 tracking app here:

Coming soon: source code and how to add your own Processing sketches to a proper Android Studio App, with a menu. Also: global data! I found a reliable source here for global data, lets use the data to track global results in Processing!

Affiliate links are included on this website. Please support my future projects! Another way to support my work, and help yourself to free stuff at the same time, is to check out DigitalOcean with their promotional 2 months free hosting. If you haven’t yet heard of them, they are the best and cheapest virtual server on the market right now, the link is in the banner at the top of my site.