Skip to content

Commit

Permalink
added London data, 7/jan
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkoltai committed Jan 8, 2022
1 parent 9bdd3e5 commit f7d0d01
Show file tree
Hide file tree
Showing 42 changed files with 535 additions and 47 deletions.
36 changes: 18 additions & 18 deletions ONS_2019_midpoint_population_estim_modified.csv
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
age,UK,England
12_15,2964509,2513686
16_17,1427406,1206160
18_24,5647655,4746616
25_29,4514249,3801409
30_34,4497132,3807954
35_39,4395667,3733642
40_44,4019539,3414297
45_49,4402122,3715812
50_54,4661015,3907461
55_59,4405908,3670651
60_64,3755185,3111835
65_69,3368199,2796740
70_74,3318867,2779326
75_79,2325296,1940686
80_84,1715328,1439913
85_89,1042090,879778
90+,605181,517273
age,UK,England,London
12_15,2964509,2513686,409942
16_17,1427406,1206160,188846
18_24,5647655,4746616,747203
25_29,4514249,3801409,784361
30_34,4497132,3807954,849074
35_39,4395667,3733642,783331
40_44,4019539,3414297,646347
45_49,4402122,3715812,596141
50_54,4661015,3907461,564205
55_59,4405908,3670651,479470
60_64,3755185,3111835,378068
65_69,3368199,2796740,309586
70_74,3318867,2779326,265847
75_79,2325296,1940686,189753
80_84,1715328,1439913,147303
85_89,1042090,879778,91993
90+,605181,517273,54731
33 changes: 29 additions & 4 deletions README.md

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions datavis.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ ons_all_age_groups_uk_england_2019 <- read_csv("ons_all_age_groups_uk_england_20
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
# vacc uptake
url_data<-
"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"

vacc_dose_data_eng <- left_join(read_csv(url_data),ONS_2019_population_estim %>% # %>% select(!contains("UK"))

vacc_dose_data_eng <- left_join(read_csv(url_data),ONS_2019_population_estim %>% select(!contains(c("UK","London"))) %>%
rename(population=England),by="age")
vacc_dose_data_eng <- vacc_dose_data_eng %>% group_by(age) %>%
mutate(daily_first_dose_perc_agegroup=1e2*roll_mean(
Expand Down Expand Up @@ -271,7 +272,7 @@ ggsave(paste0("england_cases_number_10_yr_agebands_y",
######################################################
# RATE of CASES in 10-yr bands
df_cases<-left_join(eng_case_age_data,ons_all_age_groups_uk_england_2019,by="age") %>%
select(!c(UK,areaCode,areaType,age_categ,areaName)) %>% rename(population=England) %>%
select(!c(UK,London,areaCode,areaType,age_categ,areaName)) %>% rename(population=England) %>%
ungroup() %>% mutate(age_num=as.numeric(factor(age)),
meta_age=ifelse(ceiling(age_num/2)>8,9,ceiling(age_num/2))) %>%
group_by(date,meta_age) %>%
Expand Down Expand Up @@ -363,7 +364,7 @@ deaths_age<-read_csv(death_url) %>% group_by(age) %>%
mutate(rolling_rate_per_alldeaths=roll_mean(deaths,n=7,align="center",fill=NA)) %>% ungroup()

# lineplots
df_deaths <- left_join(deaths_age,ons_all_age_groups_uk_england_2019 %>% select(!UK),by="age") %>%
df_deaths <- left_join(deaths_age,ons_all_age_groups_uk_england_2019 %>% select(!c(UK,London)),by="age") %>%
rename(population=England) %>% mutate(age_uplim=as.numeric(gsub("^.*_","",age)),
age_grp=ifelse(age_uplim<=49,"00_49",ifelse(age_uplim>=49&age_uplim<=59,"50_59",age)),
age_grp=ifelse(grepl("\\+",age),age,age_grp)) %>% filter(!age %in% c("00_59","60+")) %>%
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added london/cumul_deaths_by_age.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions london/ons_all_age_groups_london_2019.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
age,London
0-4,"615,881"
5-9,"599,855"
10-14,"524,126"
15-19,"464,768"
20-24,"563,241"
25-29,"784,361"
30-34,"849,074"
35-39,"783,331"
40-44,"646,347"
45-49,"596,141"
50-54,"564,205"
55-59,"479,470"
60-64,"378,068"
65-69,"309,586"
70-74,"265,847"
75-79,"189,753"
80-84,"147,303"
85-89,"91,993"
90+,"54,731"
Binary file added london/vaccine_data/vaccine_by_age_cumul.png
Binary file added london/vaccine_data/vaccine_by_age_rate_lin.png
Binary file added london/vaccine_data/vaccine_by_age_rate_log.png
443 changes: 443 additions & 0 deletions london_datavis.R

Large diffs are not rendered by default.

41 changes: 20 additions & 21 deletions ons_all_age_groups_uk_england_2019.csv
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
age,UK,England
00_04,3857263,3299637
05_09,4149852,3538206
10_14,3953866,3354246
15_19,3656968,3090232
20_24,4153080,3487863
25_29,4514249,3801409
30_34,4497132,3807954
35_39,4395667,3733642
40_44,4019539,3414297
45_49,4402122,3715812
50_54,4661015,3907461
55_59,4405908,3670651
60_64,3755185,3111835
65_69,3368199,2796740
70_74,3318867,2779326
75_79,2325296,1940686
80_84,1715328,1439913
85_89,1042090,879778
90+,605181,517273

age,UK,England,London
00_04,3857263,3299637,615881
05_09,4149852,3538206,599855
10_14,3953866,3354246,524126
15_19,3656968,3090232,464768
20_24,4153080,3487863,563241
25_29,4514249,3801409,784361
30_34,4497132,3807954,849074
35_39,4395667,3733642,783331
40_44,4019539,3414297,646347
45_49,4402122,3715812,596141
50_54,4661015,3907461,564205
55_59,4405908,3670651,479470
60_64,3755185,3111835,378068
65_69,3368199,2796740,309586
70_74,3318867,2779326,265847
75_79,2325296,1940686,189753
80_84,1715328,1439913,147303
85_89,1042090,879778,91993
90+,605181,517273,54731

0 comments on commit f7d0d01

Please sign in to comment.