Covid-19

No one on the planet has done any kind of research into the spread and/or consequences of Covid-19. Here’s my first post on it. Since there MIGHT be additional things I can make later, I’ll just add them to the bottom of this post.

I downloaded the global Covid-19 dataset from the European Center Centre for Disease Prevention and Control.*

import = SemanticImport["yourfilepath"];

You can’t have my filepath.

Custom color gradient:

colors = Table[Blend[{RGBColor[0, 1, 0, 1], RGBColor[1, 1, 0, 1],RGBColor[1, 0, 0, 1]}, i/11], {i,1,11}];

There are some gaps in the dataset. Or maybe Alaska isn’t part of a country. It’s impossible to know these kinds of things. Anyway, here’s the map code.

Legended[GeoRegionValuePlot[Table[centitylist[[i]] -> (Total[import[Select[#geoId == clist[[i]] &]][[All, "deaths"]] //Normal])/(import[Select[#geoId == clist[[i]] &]][[1,"popData2018"]] // Normal)*1000000., {i, 1, Length@clist}],GeoRange -> "World", GeoProjection -> "Robinson",GeoBackground -> {"CountryBorders", "Land" -> White,"Ocean" -> LightBlue, "Border" -> {Gray, Thickness[0.0001]}},ImageSize -> 1200, ColorFunction -> (First@Pick[colors,IntervalMemberQ[{Interval[{0, 10}], Interval[{11, 20}],Interval[{21, 30}], Interval[{31, 40}], Interval[{41, 50}],Interval[{51, 60}], Interval[{61, 70}], Interval[{71, 80}],
Interval[{81, 90}], Interval[{91, 100}],Interval[{-Infinity, Infinity}]}, #]] &),ColorFunctionScaling -> False, PlotRange -> {0, 500},PlotLabel ->Style["Covid-19 Deaths per Million People", FontSize -> 20],PlotLegends -> False], BarLegend[{colors, {0, 100}},LegendLayout->"Row",LegendMarkerSize->{1000,100},LabelStyle->Directive[FontSize->20]]]

Now you have 100% of the code required to make this, except for my filepath. Get your own.

That’s it for now. I’ll update the map periodically and add some nice charts to examine the pandemic in other ways.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: