Summary
data <- read_csv("all_cbsa_summary.csv")
## Rows: 9400 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): avg_eal_tercile, NAME
## dbl (8): archive_version_year, CBSAFP, rows, with_parent_number, mean_employ...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
plot1 <- data %>% ggplot()+
geom_line(aes(archive_version_year,rows,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Number of Businesses")
plot2 <- data %>% ggplot()+
geom_line(aes(archive_version_year,mean_employees,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Mean employees")
plot3 <- data %>% ggplot()+
geom_line(aes(archive_version_year,mean_year_established,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Mean year established")
plot4 <- data %>% mutate(pct_with_parent=with_parent_number/rows) %>% ggplot()+
geom_line(aes(archive_version_year,pct_with_parent,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("% with parent")
ggplotly(plot1) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot2) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot3) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot4) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
Summary (Top 100)
data <- read_csv("all_cbsa_summary_100.csv")
## Rows: 1000 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): avg_eal_tercile, NAME
## dbl (8): archive_version_year, CBSAFP, rows, with_parent_number, mean_employ...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
plot1 <- data %>% ggplot()+
geom_line(aes(archive_version_year,rows,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Number of Businesses")
plot2 <- data %>% ggplot()+
geom_line(aes(archive_version_year,mean_employees,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Mean employees")
plot3 <- data %>% ggplot()+
geom_line(aes(archive_version_year,mean_year_established,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("Mean year established")
plot4 <- data %>% mutate(pct_with_parent=with_parent_number/rows) %>% ggplot()+
geom_line(aes(archive_version_year,pct_with_parent,color=NAME),alpha=0.5)+
facet_wrap(~avg_eal_tercile,ncol =2)+
ggtitle("% with parent")
ggplotly(plot1) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot2) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot3) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
ggplotly(plot4) %>% layout(showlegend = TRUE, legend = list(font = list(size = 6)))
Births Deaths - All by Risk
## Rows: 1000 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## archive_version_year CBSAFP entry exit
## Min. :2013 Min. :10420 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 1st Qu.:19348 1st Qu.: 26.00 1st Qu.: 25.00
## Median :2018 Median :32060 Median : 45.00 Median : 44.00
## Mean :2018 Mean :30209 Mean : 67.08 Mean : 67.08
## 3rd Qu.:2020 3rd Qu.:40080 3rd Qu.: 84.00 3rd Qu.: 79.00
## Max. :2022 Max. :49340 Max. :561.00 Max. :670.00
## NA's :100
## births deaths NAME avg_eal
## Min. : 1328 Min. : 1128 Length:1000 Min. :38.21
## 1st Qu.: 3617 1st Qu.: 3416 Class :character 1st Qu.:65.60
## Median : 6166 Median : 5294 Mode :character Median :75.28
## Mean : 12411 Mean : 10836 Mean :77.28
## 3rd Qu.: 13648 3rd Qu.: 11576 3rd Qu.:94.11
## Max. :171670 Max. :139494 Max. :99.91
## NA's :100
## tercile avg_eal_tercile
## Min. :1.00 Length:1000
## 1st Qu.:1.00 Class :character
## Median :2.00 Mode :character
## Mean :1.99
## 3rd Qu.:3.00
## Max. :3.00
##
Births Deaths - with parent by Risk
## Rows: 978 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## archive_version_year CBSAFP entry exit
## Min. :2013 Min. :10420 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 1st Qu.:19430 1st Qu.: 4.00 1st Qu.: 20.00
## Median :2018 Median :31540 Median : 8.00 Median : 36.00
## Mean :2018 Mean :30192 Mean : 13.37 Mean : 54.31
## 3rd Qu.:2020 3rd Qu.:40060 3rd Qu.: 16.00 3rd Qu.: 66.00
## Max. :2022 Max. :49340 Max. :111.00 Max. :594.00
## NA's :97
## births deaths NAME avg_eal
## Min. : 12.0 Min. : 1128 Length:978 Min. :38.21
## 1st Qu.: 447.0 1st Qu.: 3428 Class :character 1st Qu.:65.97
## Median : 797.5 Median : 5354 Mode :character Median :75.17
## Mean : 1407.4 Mean : 10946 Mean :77.35
## 3rd Qu.: 1646.2 3rd Qu.: 11691 3rd Qu.:94.62
## Max. :19335.0 Max. :139494 Max. :99.91
## NA's :96
## tercile avg_eal_tercile
## Min. :1.000 Length:978
## 1st Qu.:1.000 Class :character
## Median :2.000 Mode :character
## Mean :1.993
## 3rd Qu.:3.000
## Max. :3.000
##
Births Deaths - standalone by Risk
## Rows: 1000 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## archive_version_year CBSAFP entry exit
## Min. :2013 Min. :10420 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 1st Qu.:19348 1st Qu.: 20.00 1st Qu.: 19.00
## Median :2018 Median :32060 Median : 35.00 Median : 35.00
## Mean :2018 Mean :30209 Mean : 52.28 Mean : 53.53
## 3rd Qu.:2020 3rd Qu.:40080 3rd Qu.: 64.00 3rd Qu.: 65.00
## Max. :2022 Max. :49340 Max. :499.00 Max. :594.00
## NA's :101
## births deaths NAME avg_eal
## Min. : 1152 Min. : 1128 Length:1000 Min. :38.21
## 1st Qu.: 3337 1st Qu.: 3416 Class :character 1st Qu.:65.60
## Median : 5682 Median : 5294 Mode :character Median :75.28
## Mean : 11596 Mean : 10836 Mean :77.28
## 3rd Qu.: 12722 3rd Qu.: 11576 3rd Qu.:94.11
## Max. :169862 Max. :139494 Max. :99.91
## NA's :100
## tercile avg_eal_tercile
## Min. :1.00 Length:1000
## 1st Qu.:1.00 Class :character
## Median :2.00 Mode :character
## Mean :1.99
## 3rd Qu.:3.00
## Max. :3.00
##
Births Deaths - All by Population
top100_cbsa <- get_acs(geography = "cbsa", variables = c(pop="B01001_001"),output = "wide") %>%
top_n(100,popE) %>%
mutate(pop_tercile = ntile(popE, 3)) %>%
mutate(pop_tercile=as_factor(pop_tercile)) %>%
mutate(pop_tercile = factor(pop_tercile, levels = 1:3, labels = c("Pop: Low", "Pop: Moderate", "Pop: High"))) %>%
select(pop_tercile,GEOID)
## Getting data from the 2018-2022 5-year ACS
data <- read_csv("cbsa_births_deaths_exits_entrys.csv") %>%
mutate(CBSAFP=as.character(CBSAFP)) %>%
mutate(avg_eal_tercile = factor(avg_eal_tercile,
levels = c("Low", "Moderate", "High"))) %>%
mutate(avg_eal_tercile = fct_recode(avg_eal_tercile,
"EAL: Low" = "Low",
"EAL: Moderate" = "Moderate",
"EAL: High" = "High")) %>%
left_join(top100_cbsa,by=c("CBSAFP"="GEOID"))
## Rows: 1000 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
summary(data)
## archive_version_year CBSAFP entry exit
## Min. :2013 Length:1000 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 Class :character 1st Qu.: 26.00 1st Qu.: 25.00
## Median :2018 Mode :character Median : 45.00 Median : 44.00
## Mean :2018 Mean : 67.08 Mean : 67.08
## 3rd Qu.:2020 3rd Qu.: 84.00 3rd Qu.: 79.00
## Max. :2022 Max. :561.00 Max. :670.00
## NA's :100
## births deaths NAME avg_eal
## Min. : 1328 Min. : 1128 Length:1000 Min. :38.21
## 1st Qu.: 3617 1st Qu.: 3416 Class :character 1st Qu.:65.60
## Median : 6166 Median : 5294 Mode :character Median :75.28
## Mean : 12411 Mean : 10836 Mean :77.28
## 3rd Qu.: 13648 3rd Qu.: 11576 3rd Qu.:94.11
## Max. :171670 Max. :139494 Max. :99.91
## NA's :100
## tercile avg_eal_tercile pop_tercile
## Min. :1.00 EAL: Low :340 Pop: Low :340
## 1st Qu.:1.00 EAL: Moderate:330 Pop: Moderate:330
## Median :2.00 EAL: High :330 Pop: High :330
## Mean :1.99
## 3rd Qu.:3.00
## Max. :3.00
##
Births Deaths - with parent by Population
data <- read_csv("cbsa_births_deaths_exits_entrys_parent.csv") %>%
mutate(CBSAFP=as.character(CBSAFP)) %>%
mutate(avg_eal_tercile = factor(avg_eal_tercile,
levels = c("Low", "Moderate", "High"))) %>%
mutate(avg_eal_tercile = fct_recode(avg_eal_tercile,
"EAL: Low" = "Low",
"EAL: Moderate" = "Moderate",
"EAL: High" = "High")) %>%
left_join(top100_cbsa,by=c("CBSAFP"="GEOID"))
## Rows: 978 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
summary(data)
## archive_version_year CBSAFP entry exit
## Min. :2013 Length:978 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 Class :character 1st Qu.: 4.00 1st Qu.: 20.00
## Median :2018 Mode :character Median : 8.00 Median : 36.00
## Mean :2018 Mean : 13.37 Mean : 54.31
## 3rd Qu.:2020 3rd Qu.: 16.00 3rd Qu.: 66.00
## Max. :2022 Max. :111.00 Max. :594.00
## NA's :97
## births deaths NAME avg_eal
## Min. : 12.0 Min. : 1128 Length:978 Min. :38.21
## 1st Qu.: 447.0 1st Qu.: 3428 Class :character 1st Qu.:65.97
## Median : 797.5 Median : 5354 Mode :character Median :75.17
## Mean : 1407.4 Mean : 10946 Mean :77.35
## 3rd Qu.: 1646.2 3rd Qu.: 11691 3rd Qu.:94.62
## Max. :19335.0 Max. :139494 Max. :99.91
## NA's :96
## tercile avg_eal_tercile pop_tercile
## Min. :1.000 EAL: Low :332 Pop: Low :327
## 1st Qu.:1.000 EAL: Moderate:321 Pop: Moderate:321
## Median :2.000 EAL: High :325 Pop: High :330
## Mean :1.993
## 3rd Qu.:3.000
## Max. :3.000
##
Births Deaths - standalone by Population
data <- read_csv("cbsa_births_deaths_exits_entrys_standalone.csv") %>%
mutate(CBSAFP=as.character(CBSAFP)) %>%
mutate(avg_eal_tercile = factor(avg_eal_tercile,
levels = c("Low", "Moderate", "High"))) %>%
mutate(avg_eal_tercile = fct_recode(avg_eal_tercile,
"EAL: Low" = "Low",
"EAL: Moderate" = "Moderate",
"EAL: High" = "High")) %>%
left_join(top100_cbsa,by=c("CBSAFP"="GEOID"))
## Rows: 1000 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): NAME, avg_eal_tercile
## dbl (8): archive_version_year, CBSAFP, entry, exit, births, deaths, avg_eal,...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
summary(data)
## archive_version_year CBSAFP entry exit
## Min. :2013 Length:1000 Min. : 1.00 Min. : 1.00
## 1st Qu.:2015 Class :character 1st Qu.: 20.00 1st Qu.: 19.00
## Median :2018 Mode :character Median : 35.00 Median : 35.00
## Mean :2018 Mean : 52.28 Mean : 53.53
## 3rd Qu.:2020 3rd Qu.: 64.00 3rd Qu.: 65.00
## Max. :2022 Max. :499.00 Max. :594.00
## NA's :101
## births deaths NAME avg_eal
## Min. : 1152 Min. : 1128 Length:1000 Min. :38.21
## 1st Qu.: 3337 1st Qu.: 3416 Class :character 1st Qu.:65.60
## Median : 5682 Median : 5294 Mode :character Median :75.28
## Mean : 11596 Mean : 10836 Mean :77.28
## 3rd Qu.: 12722 3rd Qu.: 11576 3rd Qu.:94.11
## Max. :169862 Max. :139494 Max. :99.91
## NA's :100
## tercile avg_eal_tercile pop_tercile
## Min. :1.00 EAL: Low :340 Pop: Low :340
## 1st Qu.:1.00 EAL: Moderate:330 Pop: Moderate:330
## Median :2.00 EAL: High :330 Pop: High :330
## Mean :1.99
## 3rd Qu.:3.00
## Max. :3.00
##
NAICs breakdown
## Rows: 780 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile
## dbl (3): archive_version_year, naics_2, rows
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 778 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile
## dbl (3): archive_version_year, naics_2, births
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 780 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile
## dbl (3): archive_version_year, naics_2, deaths
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 777 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile
## dbl (3): archive_version_year, naics_2, entries
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 776 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile
## dbl (3): archive_version_year, naics_2, exits
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Matrix Counts
## Rows: 4 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (4): Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Births, rows (hq), columns (branch)
Low |
112188 |
0.20 |
100817 |
0.18 |
79781 |
0.14 |
269305 |
0.48 |
562091 |
Moderate |
55558 |
0.14 |
120759 |
0.30 |
62719 |
0.16 |
157848 |
0.40 |
396884 |
High |
63981 |
0.12 |
93382 |
0.17 |
139196 |
0.26 |
239593 |
0.45 |
536152 |
Outside100 |
85846 |
0.14 |
106981 |
0.17 |
88148 |
0.14 |
330382 |
0.54 |
611357 |
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Births yearly, rows (hq), columns (branch)
2013 |
Low |
12643 |
0.22 |
9972 |
0.18 |
8186 |
0.15 |
25553 |
0.45 |
56354 |
2013 |
Moderate |
8886 |
0.15 |
17838 |
0.29 |
9205 |
0.15 |
24993 |
0.41 |
60922 |
2013 |
High |
12535 |
0.13 |
17065 |
0.17 |
23942 |
0.24 |
44923 |
0.46 |
98465 |
2013 |
Outside100 |
12703 |
0.15 |
15619 |
0.19 |
13249 |
0.16 |
42120 |
0.50 |
83691 |
2014 |
Low |
9844 |
0.25 |
7065 |
0.18 |
5492 |
0.14 |
17024 |
0.43 |
39425 |
2014 |
Moderate |
5881 |
0.14 |
13628 |
0.32 |
6038 |
0.14 |
16613 |
0.39 |
42160 |
2014 |
High |
6894 |
0.12 |
10177 |
0.18 |
16240 |
0.28 |
24245 |
0.42 |
57556 |
2014 |
Outside100 |
8693 |
0.15 |
10776 |
0.18 |
8307 |
0.14 |
32022 |
0.54 |
59798 |
2015 |
Low |
9131 |
0.23 |
6986 |
0.17 |
5961 |
0.15 |
18055 |
0.45 |
40133 |
2015 |
Moderate |
6110 |
0.14 |
12307 |
0.29 |
6782 |
0.16 |
17189 |
0.41 |
42388 |
2015 |
High |
6835 |
0.12 |
10047 |
0.18 |
14599 |
0.26 |
24091 |
0.43 |
55572 |
2015 |
Outside100 |
8567 |
0.14 |
10399 |
0.17 |
9112 |
0.15 |
31984 |
0.53 |
60062 |
2016 |
Low |
7721 |
0.25 |
5591 |
0.18 |
4434 |
0.14 |
13721 |
0.44 |
31467 |
2016 |
Moderate |
5824 |
0.14 |
12730 |
0.31 |
6899 |
0.17 |
15720 |
0.38 |
41173 |
2016 |
High |
5348 |
0.11 |
7662 |
0.16 |
12530 |
0.27 |
21330 |
0.46 |
46870 |
2016 |
Outside100 |
7581 |
0.13 |
9329 |
0.16 |
7525 |
0.13 |
33276 |
0.58 |
57711 |
2017 |
Low |
6577 |
0.19 |
6508 |
0.19 |
4696 |
0.14 |
16121 |
0.48 |
33902 |
2017 |
Moderate |
3595 |
0.13 |
7539 |
0.28 |
4205 |
0.16 |
11596 |
0.43 |
26935 |
2017 |
High |
5161 |
0.12 |
7466 |
0.18 |
10014 |
0.24 |
19592 |
0.46 |
42233 |
2017 |
Outside100 |
6259 |
0.14 |
8120 |
0.18 |
6376 |
0.14 |
23334 |
0.53 |
44089 |
2018 |
Low |
7585 |
0.24 |
5727 |
0.18 |
4342 |
0.14 |
14461 |
0.45 |
32115 |
2018 |
Moderate |
4304 |
0.13 |
9939 |
0.30 |
4880 |
0.15 |
14473 |
0.43 |
33596 |
2018 |
High |
5539 |
0.12 |
8043 |
0.17 |
11982 |
0.26 |
21339 |
0.45 |
46903 |
2018 |
Outside100 |
7553 |
0.14 |
9559 |
0.17 |
7388 |
0.13 |
31154 |
0.56 |
55654 |
2019 |
Low |
7810 |
0.24 |
5391 |
0.17 |
4356 |
0.14 |
14670 |
0.46 |
32227 |
2019 |
Moderate |
4695 |
0.14 |
10884 |
0.32 |
5498 |
0.16 |
13187 |
0.38 |
34264 |
2019 |
High |
5901 |
0.11 |
9088 |
0.17 |
13031 |
0.25 |
24820 |
0.47 |
52840 |
2019 |
Outside100 |
6526 |
0.14 |
8259 |
0.17 |
7111 |
0.15 |
25992 |
0.54 |
47888 |
2020 |
Low |
19749 |
0.16 |
20235 |
0.17 |
16543 |
0.14 |
64578 |
0.53 |
121105 |
2020 |
Moderate |
3982 |
0.13 |
9439 |
0.32 |
4435 |
0.15 |
12074 |
0.40 |
29930 |
2020 |
High |
6009 |
0.12 |
9307 |
0.19 |
12323 |
0.25 |
22563 |
0.45 |
50202 |
2020 |
Outside100 |
10531 |
0.13 |
13775 |
0.17 |
11019 |
0.14 |
44523 |
0.56 |
79848 |
2021 |
Low |
6605 |
0.28 |
3651 |
0.16 |
2887 |
0.12 |
10085 |
0.43 |
23228 |
2021 |
Moderate |
2808 |
0.12 |
8312 |
0.37 |
3062 |
0.13 |
8584 |
0.38 |
22766 |
2021 |
High |
3448 |
0.11 |
5021 |
0.16 |
9284 |
0.29 |
14372 |
0.45 |
32125 |
2021 |
Outside100 |
5773 |
0.13 |
6753 |
0.15 |
6073 |
0.14 |
25042 |
0.57 |
43641 |
2022 |
Low |
24523 |
0.16 |
29691 |
0.20 |
22884 |
0.15 |
75037 |
0.49 |
152135 |
2022 |
Moderate |
9473 |
0.15 |
18143 |
0.29 |
11715 |
0.19 |
23419 |
0.37 |
62750 |
2022 |
High |
6311 |
0.12 |
9506 |
0.18 |
15251 |
0.29 |
22318 |
0.42 |
53386 |
2022 |
Outside100 |
11660 |
0.15 |
14392 |
0.18 |
11988 |
0.15 |
40935 |
0.52 |
78975 |
## Rows: 4 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (4): Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Deaths, rows (hq), columns (branch)
Low |
65342 |
0.21 |
54570 |
0.17 |
44652 |
0.14 |
147916 |
0.47 |
312480 |
Moderate |
44158 |
0.14 |
88708 |
0.28 |
49200 |
0.16 |
134026 |
0.42 |
316092 |
High |
58132 |
0.13 |
84395 |
0.18 |
113125 |
0.25 |
205709 |
0.45 |
461361 |
Outside100 |
74891 |
0.15 |
92503 |
0.18 |
77553 |
0.15 |
267957 |
0.52 |
512904 |
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Deaths yearly, rows (hq), columns (branch)
2012 |
Low |
5402 |
0.23 |
4353 |
0.18 |
3472 |
0.15 |
10713 |
0.45 |
23940 |
2012 |
Moderate |
3246 |
0.14 |
7341 |
0.31 |
3893 |
0.16 |
9513 |
0.40 |
23993 |
2012 |
High |
6269 |
0.14 |
8402 |
0.18 |
10843 |
0.24 |
20383 |
0.44 |
45897 |
2012 |
Outside100 |
6609 |
0.15 |
8500 |
0.19 |
6899 |
0.16 |
21818 |
0.50 |
43826 |
2013 |
Low |
5272 |
0.21 |
4594 |
0.18 |
3975 |
0.16 |
11757 |
0.46 |
25598 |
2013 |
Moderate |
4064 |
0.15 |
7826 |
0.28 |
4629 |
0.17 |
11365 |
0.41 |
27884 |
2013 |
High |
4761 |
0.13 |
7104 |
0.19 |
9633 |
0.25 |
16498 |
0.43 |
37996 |
2013 |
Outside100 |
6725 |
0.15 |
8249 |
0.19 |
7169 |
0.16 |
22379 |
0.50 |
44522 |
2014 |
Low |
5667 |
0.21 |
4703 |
0.18 |
3986 |
0.15 |
12510 |
0.47 |
26866 |
2014 |
Moderate |
4683 |
0.14 |
9123 |
0.27 |
5213 |
0.16 |
14173 |
0.43 |
33192 |
2014 |
High |
5146 |
0.12 |
7514 |
0.18 |
10159 |
0.24 |
19104 |
0.46 |
41923 |
2014 |
Outside100 |
7829 |
0.15 |
10096 |
0.19 |
8332 |
0.16 |
27282 |
0.51 |
53539 |
2015 |
Low |
6717 |
0.20 |
5699 |
0.17 |
4550 |
0.14 |
16710 |
0.50 |
33676 |
2015 |
Moderate |
5216 |
0.14 |
10224 |
0.27 |
5862 |
0.15 |
16934 |
0.44 |
38236 |
2015 |
High |
4897 |
0.12 |
7496 |
0.18 |
10154 |
0.25 |
18215 |
0.45 |
40762 |
2015 |
Outside100 |
7185 |
0.14 |
9129 |
0.18 |
7767 |
0.16 |
25960 |
0.52 |
50041 |
2016 |
Low |
8070 |
0.22 |
6475 |
0.18 |
5140 |
0.14 |
17219 |
0.47 |
36904 |
2016 |
Moderate |
5563 |
0.15 |
10759 |
0.28 |
5977 |
0.16 |
15995 |
0.42 |
38294 |
2016 |
High |
6830 |
0.13 |
9677 |
0.18 |
13169 |
0.25 |
22792 |
0.43 |
52468 |
2016 |
Outside100 |
9707 |
0.15 |
11528 |
0.18 |
9476 |
0.15 |
32547 |
0.51 |
63258 |
2017 |
Low |
8810 |
0.22 |
7300 |
0.18 |
5744 |
0.14 |
18235 |
0.45 |
40089 |
2017 |
Moderate |
5745 |
0.14 |
11717 |
0.28 |
6528 |
0.16 |
17241 |
0.42 |
41231 |
2017 |
High |
9711 |
0.13 |
13821 |
0.19 |
17825 |
0.24 |
32777 |
0.44 |
74134 |
2017 |
Outside100 |
10348 |
0.15 |
12509 |
0.18 |
10310 |
0.15 |
35675 |
0.52 |
68842 |
2018 |
Low |
7218 |
0.22 |
5658 |
0.17 |
4488 |
0.14 |
15744 |
0.48 |
33108 |
2018 |
Moderate |
4506 |
0.14 |
9438 |
0.28 |
5013 |
0.15 |
14188 |
0.43 |
33145 |
2018 |
High |
5063 |
0.12 |
7975 |
0.18 |
10326 |
0.24 |
19757 |
0.46 |
43121 |
2018 |
Outside100 |
10407 |
0.14 |
12660 |
0.17 |
10253 |
0.14 |
39535 |
0.54 |
72855 |
2019 |
Low |
6444 |
0.20 |
5712 |
0.18 |
4659 |
0.15 |
15127 |
0.47 |
31942 |
2019 |
Moderate |
4426 |
0.14 |
8366 |
0.26 |
4760 |
0.15 |
14045 |
0.44 |
31597 |
2019 |
High |
5454 |
0.12 |
7762 |
0.18 |
10893 |
0.25 |
20093 |
0.45 |
44202 |
2019 |
Outside100 |
6532 |
0.15 |
7836 |
0.18 |
6448 |
0.14 |
23828 |
0.53 |
44644 |
2020 |
Low |
4196 |
0.21 |
3277 |
0.16 |
2845 |
0.14 |
9796 |
0.49 |
20114 |
2020 |
Moderate |
2924 |
0.14 |
5889 |
0.28 |
3038 |
0.15 |
8967 |
0.43 |
20818 |
2020 |
High |
4164 |
0.13 |
6104 |
0.18 |
8645 |
0.26 |
14112 |
0.43 |
33025 |
2020 |
Outside100 |
4102 |
0.13 |
5181 |
0.17 |
4684 |
0.15 |
16920 |
0.55 |
30887 |
2021 |
Low |
7546 |
0.19 |
6799 |
0.17 |
5793 |
0.14 |
20105 |
0.50 |
40243 |
2021 |
Moderate |
3785 |
0.14 |
8025 |
0.29 |
4287 |
0.15 |
11605 |
0.42 |
27702 |
2021 |
High |
5837 |
0.12 |
8540 |
0.18 |
11478 |
0.24 |
21978 |
0.46 |
47833 |
2021 |
Outside100 |
5447 |
0.13 |
6815 |
0.17 |
6215 |
0.15 |
22013 |
0.54 |
40490 |
## Rows: 4 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (4): Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Expansions, rows (hq), columns (branch)
Low |
5331 |
0.21 |
4463 |
0.18 |
3412 |
0.14 |
11875 |
0.47 |
25081 |
Moderate |
2857 |
0.14 |
5810 |
0.29 |
3049 |
0.15 |
8185 |
0.41 |
19901 |
High |
3343 |
0.13 |
4861 |
0.18 |
6970 |
0.26 |
11131 |
0.42 |
26305 |
Outside100 |
4421 |
0.15 |
5441 |
0.19 |
4497 |
0.15 |
14954 |
0.51 |
29313 |
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Expansions yearly, rows (hq), columns (branch)
2013 |
Low |
673 |
0.19 |
630 |
0.18 |
558 |
0.16 |
1592 |
0.46 |
3453 |
2013 |
Moderate |
570 |
0.15 |
986 |
0.26 |
657 |
0.18 |
1521 |
0.41 |
3734 |
2013 |
High |
678 |
0.13 |
1057 |
0.20 |
1356 |
0.26 |
2186 |
0.41 |
5277 |
2013 |
Outside100 |
952 |
0.16 |
1114 |
0.19 |
1028 |
0.18 |
2775 |
0.47 |
5869 |
2014 |
Low |
237 |
0.26 |
177 |
0.19 |
138 |
0.15 |
360 |
0.39 |
912 |
2014 |
Moderate |
205 |
0.14 |
453 |
0.31 |
237 |
0.16 |
576 |
0.39 |
1471 |
2014 |
High |
202 |
0.11 |
314 |
0.17 |
498 |
0.28 |
789 |
0.44 |
1803 |
2014 |
Outside100 |
272 |
0.16 |
325 |
0.19 |
273 |
0.16 |
846 |
0.49 |
1716 |
2015 |
Low |
355 |
0.19 |
297 |
0.16 |
214 |
0.11 |
1036 |
0.54 |
1902 |
2015 |
Moderate |
173 |
0.14 |
398 |
0.32 |
169 |
0.14 |
494 |
0.40 |
1234 |
2015 |
High |
201 |
0.14 |
244 |
0.17 |
351 |
0.25 |
621 |
0.44 |
1417 |
2015 |
Outside100 |
212 |
0.13 |
301 |
0.18 |
245 |
0.15 |
879 |
0.54 |
1637 |
2016 |
Low |
1289 |
0.25 |
929 |
0.18 |
775 |
0.15 |
2083 |
0.41 |
5076 |
2016 |
Moderate |
849 |
0.14 |
1763 |
0.29 |
929 |
0.15 |
2612 |
0.42 |
6153 |
2016 |
High |
1014 |
0.12 |
1502 |
0.18 |
2282 |
0.28 |
3463 |
0.42 |
8261 |
2016 |
Outside100 |
1221 |
0.14 |
1622 |
0.19 |
1408 |
0.17 |
4214 |
0.50 |
8465 |
2017 |
Low |
313 |
0.26 |
217 |
0.18 |
154 |
0.13 |
539 |
0.44 |
1223 |
2017 |
Moderate |
172 |
0.14 |
390 |
0.32 |
176 |
0.14 |
483 |
0.40 |
1221 |
2017 |
High |
230 |
0.13 |
321 |
0.18 |
449 |
0.26 |
742 |
0.43 |
1742 |
2017 |
Outside100 |
309 |
0.16 |
359 |
0.18 |
288 |
0.15 |
987 |
0.51 |
1943 |
2018 |
Low |
250 |
0.25 |
183 |
0.18 |
135 |
0.13 |
451 |
0.44 |
1019 |
2018 |
Moderate |
180 |
0.16 |
362 |
0.32 |
180 |
0.16 |
413 |
0.36 |
1135 |
2018 |
High |
163 |
0.12 |
249 |
0.19 |
366 |
0.27 |
561 |
0.42 |
1339 |
2018 |
Outside100 |
408 |
0.17 |
490 |
0.20 |
341 |
0.14 |
1227 |
0.50 |
2466 |
2019 |
Low |
131 |
0.23 |
101 |
0.18 |
71 |
0.12 |
269 |
0.47 |
572 |
2019 |
Moderate |
97 |
0.15 |
172 |
0.26 |
96 |
0.15 |
287 |
0.44 |
652 |
2019 |
High |
119 |
0.15 |
148 |
0.18 |
210 |
0.26 |
339 |
0.42 |
816 |
2019 |
Outside100 |
124 |
0.16 |
156 |
0.20 |
112 |
0.14 |
402 |
0.51 |
794 |
2020 |
Low |
155 |
0.22 |
126 |
0.18 |
104 |
0.15 |
309 |
0.45 |
694 |
2020 |
Moderate |
79 |
0.14 |
158 |
0.29 |
80 |
0.15 |
231 |
0.42 |
548 |
2020 |
High |
107 |
0.12 |
173 |
0.20 |
238 |
0.28 |
341 |
0.40 |
859 |
2020 |
Outside100 |
120 |
0.16 |
153 |
0.20 |
106 |
0.14 |
388 |
0.51 |
767 |
2021 |
Low |
210 |
0.23 |
149 |
0.16 |
170 |
0.18 |
393 |
0.43 |
922 |
2021 |
Moderate |
83 |
0.17 |
158 |
0.32 |
54 |
0.11 |
201 |
0.41 |
496 |
2021 |
High |
121 |
0.14 |
152 |
0.18 |
217 |
0.26 |
360 |
0.42 |
850 |
2021 |
Outside100 |
114 |
0.13 |
148 |
0.16 |
145 |
0.16 |
494 |
0.55 |
901 |
2022 |
Low |
1718 |
0.18 |
1654 |
0.18 |
1093 |
0.12 |
4843 |
0.52 |
9308 |
2022 |
Moderate |
449 |
0.14 |
970 |
0.30 |
471 |
0.14 |
1367 |
0.42 |
3257 |
2022 |
High |
508 |
0.13 |
701 |
0.18 |
1003 |
0.25 |
1729 |
0.44 |
3941 |
2022 |
Outside100 |
689 |
0.14 |
773 |
0.16 |
551 |
0.12 |
2742 |
0.58 |
4755 |
Matrix Yearly Charts
table <- read_csv("matrix_births_yearly.csv") %>%
gather(key="branch_risk",value="count",-archive_version_year,-avg_eal_tercile_parent) %>%
rename(parent_risk=avg_eal_tercile_parent) %>%
mutate(label=paste0(parent_risk,"(HQ) - ",branch_risk, "(Branch)"))
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ggplot(table)+geom_density_ridges(alpha=0.5,bandwidth = 0.1,stat = "identity",aes(archive_version_year,label,height=count))+
ggtitle("Births")
## Warning in geom_density_ridges(alpha = 0.5, bandwidth = 0.1, stat = "identity",
## : Ignoring unknown parameters: `bandwidth`

table <- read_csv("matrix_deaths_yearly.csv")%>%
gather(key="branch_risk",value="count",-archive_version_year,-avg_eal_tercile_parent) %>%
rename(parent_risk=avg_eal_tercile_parent) %>%
mutate(label=paste0(parent_risk,"(HQ) - ",branch_risk, "(Branch)"))
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ggplot(table)+geom_density_ridges(alpha=0.5,bandwidth = 0.1,stat = "identity",aes(archive_version_year,label,height=count))+
ggtitle("Deaths")
## Warning in geom_density_ridges(alpha = 0.5, bandwidth = 0.1, stat = "identity",
## : Ignoring unknown parameters: `bandwidth`

table <- read_csv("matrix_expansion_yearly.csv")%>%
gather(key="branch_risk",value="count",-archive_version_year,-avg_eal_tercile_parent) %>%
rename(parent_risk=avg_eal_tercile_parent) %>%
mutate(label=paste0(parent_risk,"(HQ) - ",branch_risk, "(Branch)"))
## Rows: 40 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): avg_eal_tercile_parent
## dbl (5): archive_version_year, Low, Moderate, High, <NA>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ggplot(table)+geom_density_ridges(alpha=0.5,bandwidth = 0.1,stat = "identity",aes(archive_version_year,label,height=count))+
ggtitle("Expansions")
## Warning in geom_density_ridges(alpha = 0.5, bandwidth = 0.1, stat = "identity",
## : Ignoring unknown parameters: `bandwidth`
