This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
update_static_datasets.r
executable file
·106 lines (104 loc) · 2.92 KB
/
update_static_datasets.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
source("./lib/common.r")
options(timeout = 600)
urls <- list(
c(
"https://raw.githubusercontent.com/robert-koch-institut/COVID-19-Impfungen_in_Deutschland/main/Archiv/2022-09-05_Deutschland_Landkreise_COVID-19-Impfungen.csv",
"covid19_deu_vaccinations.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/2000-2010/",
"intercensal/state/st-est00int-agesex.csv"
),
"population_usa_2000-2010.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/2010-2020/",
"state/asrh/SC-EST2020-AGESEX-CIV.csv"
),
"population_usa_2010-2020.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/",
"2020-2022/state/asrh/sc-est2022-agesex-civ.csv"
),
"population_usa_2020-2022.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/2000-2010/",
"intercensal/county/co-est00int-agesex-5yr.csv"
),
"population_usa_county_2000-2010.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/",
"2010-2020/counties/asrh/CC-EST2020-ALLDATA-36.csv"
),
"population_usa_county_2010-2020.csv"
),
c(
paste0(
"https://www2.census.gov/programs-surveys/popest/datasets/2020-2022/",
"counties/asrh/cc-est2022-alldata-36.csv"
),
"population_usa_county_2020-2022.csv"
),
c(
paste0(
"https://population.un.org/wpp/Download/Files/",
"1_Indicators%20(Standard)/EXCEL_FILES/1_General/WPP2022_GEN_F01_",
"DEMOGRAPHIC_INDICATORS_COMPACT_REV1.xlsx"
),
"WPP2022_GEN_F01_DEMOGRAPHIC_INDICATORS_COMPACT_REV1.xlsx"
),
c(
paste0(
"https://data.cdc.gov/api/views/3yf8-kanr/rows.csv",
"?accessType=DOWNLOAD&bom=true&format=true"
),
"usa_deaths_causes_2014_2019.csv"
),
c(
paste0(
"https://raw.githubusercontent.com/dr5hn/countries-states-cities",
"-database/master/csv/countries.csv"
),
"countries.csv"
),
c(
paste0(
"https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Bevoelkerung/",
"Sterbefaelle-Lebenserwartung/Tabellen/sonderauswertung-",
"sterbefaelle-endgueltige-daten.xlsx?__blob=publicationFile"
),
"sonderauswertung-sterbefaelle-endgueltige-daten.xlsx"
),
c(
paste0(
"https://data.cdc.gov/api/views/muzy-jte6/rows.csv?accessType=DOWNLOAD",
"&bom=true&format=true"
),
"usa_deaths_causes_2020_n.csv"
),
c(
"https://data.cdc.gov/api/views/y5bj-9g5w/rows.csv?accessType=DOWNLOAD",
"usa_states_age_weekly.csv"
),
c(
"https://data.cdc.gov/api/views/xkkf-xrst/rows.csv?accessType=DOWNLOAD",
"usa_states_excess_weekly.csv"
),
c(
"https://data.cdc.gov/api/views/unsk-b7fc/rows.csv?accessType=DOWNLOAD",
"usa_states_vaccination.csv"
)
)
dir <- "data_static/"
for (url in urls) {
print(paste0(dir, url[2]))
retry_download(url[1], paste0(dir, url[2]))
}