HW3

Identifying data for Final Project

Ari Markowitz
2022-02-16

Overview:

This analysis will combine country level data to see how cultural indicators drive COVID-19 vaccination rates around the world, and how different health systems, and strength of those impact that relationship. I will combine three different datasets at the country level:

1: Cultural indicators from Geert Hofstede’s Cultural Dimensions Theory Data

2: National Vaccination Rates from Open-Source Github Repo: https://github.com/owid/covid-19-data

3: National Health System Classification Data - TBD

4: Global Country Indicators (Income, Income Per Capita, Government Type (indexes?), Population etc…) - TBD

Read In Geert Hofstede’s Cultural Dimensions Theory Data From Data.World

culture_indices <- read.csv2("https://query.data.world/s/c4dbzx65xq3bnkf65gnutajtb2566a", header=TRUE, stringsAsFactors=FALSE) %>%
      na_if("#NULL!")
head(df)
                                              
1 function (x, df1, df2, ncp, log = FALSE)    
2 {                                           
3     if (missing(ncp))                       
4         .Call(C_df, x, df1, df2, log)       
5     else .Call(C_dnf, x, df1, df2, ncp, log)
6 }                                           

Read in National Vaccination Rates from Open Source Github Repo

"https://github.com/owid/covid-19-data/tree/master/public/data/vaccinations/country_data" %>%
            read_html() %>%
            html_nodes(xpath = '//*[@role="rowheader"]') %>%
            html_nodes('span a') %>%
            html_attr('href') %>%
            sub('blob/', '', .) %>%
            paste0('https://raw.githubusercontent.com', .) %>%
            purrr::map_df(read.csv) ->  vaccine_data

head(vaccine_data)
     location       date
1 Afghanistan 2021-02-22
2 Afghanistan 2021-02-28
3 Afghanistan 2021-03-16
4 Afghanistan 2021-04-07
5 Afghanistan 2021-04-22
6 Afghanistan 2021-05-11
                                                 vaccine
1                                     Oxford/AstraZeneca
2                                     Oxford/AstraZeneca
3                                     Oxford/AstraZeneca
4                                     Oxford/AstraZeneca
5                                     Oxford/AstraZeneca
6 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing
                                                                                                    source_url
1                                                                 https://tolonews.com/index.php/health-170225
2                                                                 https://tolonews.com/index.php/health-170355
3                                      http://www.xinhuanet.com/english/asiapacific/2021-03/16/c_139814668.htm
4                                      http://www.xinhuanet.com/english/asiapacific/2021-04/07/c_139864755.htm
5 https://reliefweb.int/report/afghanistan/afghanistan-strategic-situation-report-covid-19-no-95-22-april-2021
6                                                                                     https://covid19.who.int/
  total_vaccinations people_vaccinated people_fully_vaccinated
1                  0                 0                      NA
2               8200              8200                      NA
3              54000             54000                      NA
4             120000            120000                      NA
5             240000            240000                      NA
6             504502            448878                   55624
  total_boosters people_partly_vaccinated
1             NA                       NA
2             NA                       NA
3             NA                       NA
4             NA                       NA
5             NA                       NA
6             NA                       NA

Join Datasets

Keep only the most up to date vaccination data

df <- vaccine_data %>% 
            arrange(desc(date)) %>%
            distinct(location, .keep_all= TRUE) %>%
            full_join(culture_indices,by=c("location"="country"))
          
print(head(df))
    location       date
1  Argentina 2022-02-15
2      Aruba 2022-02-15
3  Australia 2022-02-15
4 Azerbaijan 2022-02-15
5     Brazil 2022-02-15
6   Bulgaria 2022-02-15
                                                                              vaccine
1 CanSino, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V
2                                                                     Pfizer/BioNTech
3                                        Moderna, Oxford/AstraZeneca, Pfizer/BioNTech
4                             Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik V
5                       Johnson&Johnson, Pfizer/BioNTech, Oxford/AstraZeneca, Sinovac
6                       Johnson&Johnson, Oxford/AstraZeneca, Moderna, Pfizer/BioNTech
                                                                           source_url
1                           https://www.argentina.gob.ar/coronavirus/vacuna/aplicadas
2                                                           https://www.government.aw
3                                                            https://covidbaseau.com/
4 https://koronavirusinfo.az/storage/app/MvN7udDQpfRpye6gH9GF7aIwLueGHk0PTRK18Rvg.pdf
5                                                   https://coronavirusbra1.github.io
6                                                https://coronavirus.bg/bg/statistika
  total_vaccinations people_vaccinated people_fully_vaccinated
1           91223956          40072715                35528853
2             167315             87115                   80200
3           52635184          21933086                20384601
4           12549963           5270596                 4766430
5          379776348         174665423               152576040
6            4254776                NA                 2030626
  total_boosters people_partly_vaccinated  ctr  pdi  idv  mas  uai
1       15346048                       NA  ARG   49   46   56   86
2             NA                       NA <NA> <NA> <NA> <NA> <NA>
3       10317497                       NA  AUL   38   90   61   51
4        2512937                       NA  AZE <NA> <NA> <NA> <NA>
5       57563050                       NA  BRA   69   38   49   76
6         659963                       NA  BUL   70   30   40   85
  ltowvs  ivr
1     20   62
2   <NA> <NA>
3     21   71
4     61   22
5     44   59
6     69   16

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Markowitz (2022, Feb. 20). Data Analytics and Computational Social Science: HW3. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomamarkowitzhw3/

BibTeX citation

@misc{markowitz2022hw3,
  author = {Markowitz, Ari},
  title = {Data Analytics and Computational Social Science: HW3},
  url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomamarkowitzhw3/},
  year = {2022}
}