{"id":329,"date":"2020-12-02T08:34:00","date_gmt":"2020-12-02T08:34:00","guid":{"rendered":"http:\/\/burmistrov-srv.xyz\/blog\/?p=329"},"modified":"2020-12-02T08:34:00","modified_gmt":"2020-12-02T08:34:00","slug":"covid-19-in-russia","status":"publish","type":"post","link":"https:\/\/burmistrov.xyz\/blog\/?p=329","title":{"rendered":"COVID-19 in Russia"},"content":{"rendered":"\n<p>When I see statistics of COVID-19 spreading in Russia it&#8217;s really hard to say what&#8217;s going on. So, I decided to look at things differently and show infected people rate instead of absolute number. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>I took the data actuan on Dec 1st 2020, added official population for each region based on <a href=\"http:\/\/www.statdata.ru\/largest_regions_russia\">Rosstat<\/a> data compute rate of infected people for one thousand. As a result I came up with the following code<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">library(jsonlite)\nlibrary(readxl)\nlibrary(tidyverse)\njson_file=\"https:\/\/api.apify.com\/v2\/key-value-stores\/1brJ0NLbQaJKPTWMO\/records\/LATEST?disableRedirect=true\"\njsonData&lt;-fromJSON(json_file)\ndf &lt;- read_excel(\"regions.xlsx\")\n\n\ndf_plot&lt;-data.frame(region=jsonData$infectedByRegion$region,infected=jsonData$infectedByRegion$infected, population=df$Population)\n\n\ndf_plot &lt;- mutate(df_plot, rate = infected \/ population * 1000)\n\n\ndf_plot  %>%mutate(region = reorder(region, rate)) %>% ggplot(aes(region, rate)) +\ngeom_bar(stat=\"identity\")+\ncoord_flip() + \ntheme(axis.text.y = element_text(size = 6)) +\nxlab(\"\")<\/pre>\n\n\n\n<p>As a result I got an interesting plot<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/burmistrov.xyz\/blog\/wp-content\/uploads\/2020\/12\/Rplot05.jpeg\" alt=\"\" class=\"wp-image-356\" width=\"663\" height=\"971\"\/><\/figure>\n\n\n\n<p>It turned out, that Moscow is not the worst place to live now, In Altai region you chances to caught an infection is slightly higher. And Tatarstan with Chechnya looks like a safe heaven among other regions. But I have serious doubts in their data, of course<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I see statistics of COVID-19 spreading in Russia it&#8217;s really hard to say what&#8217;s going on. So, I decided to look at things differently and show infected people rate instead of absolute number.<\/p>\n","protected":false},"author":2,"featured_media":331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,23],"tags":[56,58,142],"class_list":["post-329","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science","category-russia","tag-covid","tag-data-science","tag-russia"],"_links":{"self":[{"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329"}],"version-history":[{"count":0,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/329\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=\/wp\/v2\/media\/331"}],"wp:attachment":[{"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burmistrov.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}