{"id":6077,"date":"2020-03-27T12:15:15","date_gmt":"2020-03-27T12:15:15","guid":{"rendered":"https:\/\/max-drake.cc\/?p=6077"},"modified":"2020-03-27T12:15:19","modified_gmt":"2020-03-27T12:15:19","slug":"covid-by-region-globally-data-visualisation-part-3","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=6077","title":{"rendered":"Covid by region Globally -Data visualisation- Part 3"},"content":{"rendered":"\n<p>At the end of the last post I&#8217;d found that the original NZ regional dataset had changed. I was also finding it slow working in Google Sheets as the interwongle seems to be slow with so much demand. So I decided that I&#8217;d start working locally. <\/p>\n\n\n\n<p>My current process is to get the data, manipulate it in spreadsheet, export to HTML file initially then to a  CSV that I uploaded to Datawrapper to show on their maps, then I embedded link into website. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">MS SQL database<\/h4>\n\n\n\n<p>Instead of just going to Excel, which I&#8217;ll do anyway, I&#8217;m initially going to upload into a MS SQL database and start writing queries on the data to export.  Its taking me a while to set up the table and relearn SQL queries and exporting to .RPT files and then converting to TXT or CSV files for further information. <\/p>\n\n\n\n<p>On relearning the MS SQL bits I&#8217;m starting to get other data file. The John Hopkins sources referenced at bottom of dashboard go to GITHUB and have daily data and time series <strong><a rel=\"noreferrer noopener\" aria-label=\"HERE (opens in a new tab)\" href=\"https:\/\/github.com\/CSSEGISandData\/COVID-19\" target=\"_blank\">HERE<\/a><\/strong>. So I&#8217;ve downloaded them and am going to upload to some DB tables. <\/p>\n\n\n\n<p>I spent quite a lot of yesterday afternoon trying to import  information into MS SQL database, not that successfully as I had issues  with putting a primary key on the tables and date headers were going  wrong.&nbsp; I&#8217;m going to park that for a time. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Excel<\/h4>\n\n\n\n<p>I&#8217;ve imported into Google Sheets, now I&#8217;ll try importing into Excel. Excel has a <strong>Data&gt; from Web<\/strong> button, where you put in a URL and then select a table, but that didn&#8217;t work on the wiki page so it brought in all the page. I tried deleting text above and below the table but on refresh it just came back, so I linked the table to another sheet to work with the data.<\/p>\n\n\n\n<p>The link I&#8217;m using is Current cases from <strong><a rel=\"noreferrer noopener\" aria-label=\"Wikipedia (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/2019%E2%80%9320_coronavirus_pandemic\" target=\"_blank\">Wikipedia<\/a><\/strong> which uses the same source as <strong><a href=\"https:\/\/bing.com\/covid\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Bing Tracker. (opens in a new tab)\">Bing Tracker.<\/a><\/strong><\/p>\n\n\n\n<p>I&#8217;ve then put some percentage figures on the numbers, pulled in country populations from <strong><a rel=\"noreferrer noopener\" aria-label=\"Wikipedia here (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_countries_and_dependencies_by_population\" target=\"_blank\">Wikipedia here<\/a><\/strong>. I&#8217;ve then done some basic conditional formatting on the columns, with World as reference at top (<em>no conditional formatting for that otherwise it overwhelms the data<\/em>) and the following info comes out, <strong><span style=\"color:#cf2e2e\" class=\"color\">AS OF 26th March 2020<\/span><\/strong>. This is static data, just comparing highs\/lows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"977\" height=\"355\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel.jpg\" alt=\"\" class=\"wp-image-6078 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel.jpg 977w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-300x109.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-768x279.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-50x18.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-138x50.jpg 138w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-100x36.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-275x100.jpg 275w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-11_59_55-WikiGlobalData20200326.xlsx-Excel-640x233.jpg 640w\" data-sizes=\"(max-width: 977px) 100vw, 977px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 977px; --smush-placeholder-aspect-ratio: 977\/355;\" \/><figcaption>Highest number of cases in countrt- total count. US at top of list<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"962\" height=\"341\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel.jpg\" alt=\"\" class=\"wp-image-6079 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel.jpg 962w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-300x106.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-768x272.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-50x18.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-141x50.jpg 141w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-100x35.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-282x100.jpg 282w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_07_53-WikiGlobalData20200326.xlsx-Excel-640x227.jpg 640w\" data-sizes=\"(max-width: 962px) 100vw, 962px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 962px; --smush-placeholder-aspect-ratio: 962\/341;\" \/><figcaption>Highest Active Cases- US again, followed by Italy &amp; Spain, then Germany &amp; France<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"945\" height=\"423\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel.jpg\" alt=\"\" class=\"wp-image-6080 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel.jpg 945w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-300x134.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-768x344.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-50x22.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-112x50.jpg 112w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-100x45.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-223x100.jpg 223w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel-640x286.jpg 640w\" data-sizes=\"(max-width: 945px) 100vw, 945px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 945px; --smush-placeholder-aspect-ratio: 945\/423;\" \/><figcaption>Highest nuber of Deaths to date- Italy, Spain, China Iran, France &amp; US all above 1000<\/figcaption><\/figure>\n\n\n\n<p><strong><a href=\"https:\/\/ourworldindata.org\/coronavirus#the-growth-rate-of-covid-19-deaths\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Use this chart (opens in a new tab)\">Use this chart<\/a><\/strong> to add countries for deaths and rates of change. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"379\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-1024x379.jpg\" alt=\"\" class=\"wp-image-6081 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-1024x379.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-300x111.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-768x284.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-50x18.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-135x50.jpg 135w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-100x37.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-270x100.jpg 270w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel-640x237.jpg 640w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_33_55-WikiGlobalData20200326.xlsx-Excel.jpg 1060w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/379;\" \/><figcaption>Number &amp; % recoveries- China up to 91% recovered, S.Korea at 44% and Bahrain at 44% of a small number o total cases of 457 in a pop of  1.5 M.<\/figcaption><\/figure>\n\n\n\n<p>Percentage pop over 70 by country Data from <strong><a rel=\"noreferrer noopener\" aria-label=\"here (opens in a new tab)\" href=\"https:\/\/ourworldindata.org\/grapher\/share-of-the-population-that-is-70-years-and-older\" target=\"_blank\">here<\/a><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"674\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-1024x674.png\" alt=\"\" class=\"wp-image-6082 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-1024x674.png 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-300x197.png 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-768x505.png 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-50x33.png 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-76x50.png 76w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-100x66.png 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-152x100.png 152w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-973x640.png 973w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-640x421.png 640w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1-1168x768.png 1168w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/Coronavirus-CFR-by-age-in-China-1.png 1309w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/674;\" \/><\/figure>\n\n\n\n<p>so, from above chart I&#8217;ll use 8% as likely death rate for over 70&#8217;s. A bit of a cock up linking data between sheets, on one page I had filters on, so it pulled data into the wrong Rows. OOPS!! (<span style=\"color:#cf2e2e\" class=\"color\"><em>bring heater across to find link cell, then copy adjacent column across and use Find\/Replace on Column code<\/em> <em>seems to be best way of doing this, you don&#8217;t have to mess around with aligning data on both sheets<\/em>)<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"495\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-1024x495.jpg\" alt=\"\" class=\"wp-image-6085 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-1024x495.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-300x145.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-768x371.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-50x24.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-103x50.jpg 103w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-100x48.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-207x100.jpg 207w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel-640x309.jpg 640w, https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-15_56_43-WikiGlobalData20200326.xlsx-Excel.jpg 1124w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/495;\" \/><figcaption>European countries (&amp; Japan) have largest % &gt;70 population. Calculating Affected cases by %&gt;70 and then 8% of those dying (based on chart above this one) There is a misalignment with those figures, Italy\/Spain have far higher deaths, and % &gt;70 expected is far exceeded, whereas Germany expected cases is 552 and only 262 deaths. Finland also low, but numbers are low there at present.<\/figcaption><\/figure>\n\n\n\n<p>I want to get historic data now and see what I can do with that. There are rates of change over time to be explored.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">End comment<\/h3>\n\n\n\n<p>I just refreshed the page and brought in the data for today, there were a few errors that I had to clean up, but it went pretty well. I am pulling from 3 different tables off web pages, so not too bad. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>At the end of the last post I&#8217;d found that the original NZ regional dataset had changed. I was also finding it slow working in Google Sheets as the interwongle seems to be slow with so much demand. So I decided that I&#8217;d start working locally. My current process is to get the data, manipulate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6080,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,3,36,32,5,12,29],"tags":[],"class_list":["post-6077","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-analysis","category-data-extraction","category-databases","category-power-bi","category-graphs","category-visualisation","category-web"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2020\/03\/2020-03-27-12_10_23-WikiGlobalData20200326.xlsx-Excel.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6077"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6077\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/6080"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}