Pablo-source/Shiny-app-using-COVID-data

Download WDI population figures from World Bank to compute metric rates

Closed this issue · 1 comments

We want to include 10,000 population rates calculation for each of the Confirmed, Recovered and Deceased COVID indicators downloaded from CSSEGITandData repo.
Using {WDI} package we will load World Bank Total population by country
https://github.com/vincentarelbundock/WDI
The WDI package allows users to search and download data from over 40 datasets hosted by the World Bank, including the World Development Indicators ('WDI'), International Debt Statistics, Doing Business, Human Capital Index, and Sub-national Poverty indicators.

  • 1 Load required libraries
    library(tidyverse)
    library(WDI)
    We will download Total Population from WDI library using indicator SP.POP.TOTL for each country in our COVID data set.
    https://data.worldbank.org/indicator/SP.POP.TOTL
    Using the WDI function as shown below:
    WDIinputdata <- WDI(indicator=c("SP.POP.TOTL"),extra=TRUE)

WDI country population figures added to the project by script "WDI_world_countries_population.R" saved in \Countries_population project sub-folder.
Our next step will be to compute the metrics population figures with this country population newly added data and METRICS_FOR_POP_RATES file .