From 76eda4d5c1c910adc6f07d5ae412e2defb7fafff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:19:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- code/jiemakel/analyse-vd17.Rmd | 85 ++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/code/jiemakel/analyse-vd17.Rmd b/code/jiemakel/analyse-vd17.Rmd index 85fb5f0ac9..a5be453d7e 100644 --- a/code/jiemakel/analyse-vd17.Rmd +++ b/code/jiemakel/analyse-vd17.Rmd @@ -180,13 +180,14 @@ vd17_c %>% by = c("value") ) %>% select(record_number, genre) %>% - left_join(vd17_c %>% - filter(field_code == "011@", subfield_code == "a") %>% - select(record_number, year = value) %>% - mutate(year = as.integer(year)) %>% - filter(year >= 1600, year <= 1700) %>% - collect(), - by = c("record_number") + left_join( + vd17_c %>% + filter(field_code == "011@", subfield_code == "a") %>% + select(record_number, year = value) %>% + mutate(year = as.integer(year)) %>% + filter(year >= 1600, year <= 1700) %>% + collect(), + by = c("record_number") ) %>% mutate(genre = fct_lump_n(genre, 12)) %>% ggplot(aes(x = year, fill = genre)) + @@ -204,21 +205,23 @@ vd17_c %>% vd17_c %>% filter(field_code == "044S", subfield_code == "9") %>% collect() %>% - left_join(vd17_044s_raw %>% - filter(field_code == "150") %>% - select(genre = value, value = ppn) %>% - collect(), - by = c("value") + left_join( + vd17_044s_raw %>% + filter(field_code == "150") %>% + select(genre = value, value = ppn) %>% + collect(), + by = c("value") ) %>% mutate(genre = str_replace(genre, ":.*", "")) %>% select(record_number, genre) %>% - left_join(vd17_c %>% - filter(field_code == "011@", subfield_code == "a") %>% - select(record_number, year = value) %>% - mutate(year = as.integer(year)) %>% - filter(year >= 1600, year <= 1700) %>% - collect(), - by = c("record_number") + left_join( + vd17_c %>% + filter(field_code == "011@", subfield_code == "a") %>% + select(record_number, year = value) %>% + mutate(year = as.integer(year)) %>% + filter(year >= 1600, year <= 1700) %>% + collect(), + by = c("record_number") ) %>% mutate(genre = fct_lump_n(genre, 12)) %>% ggplot(aes(x = year, fill = genre)) + @@ -237,19 +240,21 @@ vd17_c %>% ```{r} fbs_a %>% filter(field_code == "044S", subfield_code == "9") %>% - left_join(vd17_044s_raw %>% - filter(field_code == "150") %>% - select(genre = value, value = ppn), - by = c("value") + left_join( + vd17_044s_raw %>% + filter(field_code == "150") %>% + select(genre = value, value = ppn), + by = c("value") ) %>% mutate(genre = str_replace_all(genre, ":.*", "")) %>% select(record_number, genre) %>% - left_join(fbs_a %>% - filter(field_code == "011@", subfield_code == "a") %>% - select(record_number, year = value) %>% - mutate(year = as.integer(year)) %>% - filter(year >= 1600, year <= 1700), - by = c("record_number") + left_join( + fbs_a %>% + filter(field_code == "011@", subfield_code == "a") %>% + select(record_number, year = value) %>% + mutate(year = as.integer(year)) %>% + filter(year >= 1600, year <= 1700), + by = c("record_number") ) %>% count(year, genre) %>% ungroup() %>% @@ -272,19 +277,21 @@ fbs_a %>% ```{r} fbs_a %>% filter(field_code == "044S", subfield_code == "9") %>% - left_join(vd17_044s_raw %>% - filter(field_code == "150") %>% - select(genre = value, value = ppn), - by = c("value") + left_join( + vd17_044s_raw %>% + filter(field_code == "150") %>% + select(genre = value, value = ppn), + by = c("value") ) %>% mutate(genre = str_replace_all(genre, ":.*", "")) %>% select(record_number, genre) %>% - left_join(fbs_a %>% - filter(field_code == "011@", subfield_code == "a") %>% - select(record_number, year = value) %>% - mutate(year = as.integer(year)) %>% - filter(year >= 1600, year <= 1700), - by = c("record_number") + left_join( + fbs_a %>% + filter(field_code == "011@", subfield_code == "a") %>% + select(record_number, year = value) %>% + mutate(year = as.integer(year)) %>% + filter(year >= 1600, year <= 1700), + by = c("record_number") ) %>% count(year, genre) %>% ungroup() %>%