Introduction


Downloading CSV’s from Github is simple, copy the web address from the csv raw file extension and read it in R. The Github repo and data selected is the COVID-19 data from John Hopkins University’s Center for Systems Sciences and Engineering. The data can be found here: covid_19_daily_reports/11-24-2020.


Github


Navigate to the the csv page of the repo and select the Raw option. Once selected this will take you to a text version of the csv.


Github CSV Raw File

Copy the address.


Download CSV


Once the Github raw file web address is copied, it can be read.csv as if it were stored locally.

covid_jhu <- read.csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/11-24-2020.csv")


Examine CSV


library(kableExtra)
covid_jhu <- head(covid_jhu)
kbl(covid_jhu) %>%
  kable_paper() %>%
  scroll_box(width = "800px", height = "325px")
FIPS Admin2 Province_State Country_Region Last_Update Lat Long_ Confirmed Deaths Recovered Active Combined_Key Incident_Rate Case_Fatality_Ratio
NA Afghanistan 2020-11-25 05:27:20 33.93911 67.70995 45280 1712 36122 7446 Afghanistan 116.3163 3.780919
NA Albania 2020-11-25 05:27:20 41.15330 20.16830 34300 735 16666 16899 Albania 1191.8827 2.142857
NA Algeria 2020-11-25 05:27:20 28.03390 1.65960 77000 2309 50070 24621 Algeria 175.5945 2.998701
NA Andorra 2020-11-25 05:27:20 42.50630 1.52180 6351 76 5503 772 Andorra 8219.7632 1.196662
NA Angola 2020-11-25 05:27:20 -11.20270 17.87390 14742 338 7444 6960 Angola 44.8545 2.292769
NA Antigua and Barbuda 2020-11-25 05:27:20 17.06080 -61.79640 139 4 128 7 Antigua and Barbuda 141.9410 2.877698