Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 1, 2022
1 parent 385d6ae commit 76eda4d
Showing 1 changed file with 46 additions and 39 deletions.
85 changes: 46 additions & 39 deletions code/jiemakel/analyse-vd17.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)) +
Expand All @@ -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)) +
Expand All @@ -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() %>%
Expand All @@ -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() %>%
Expand Down

0 comments on commit 76eda4d

Please sign in to comment.