Last active
March 3, 2020 05:12
-
-
Save mcfrank/373afb82d389b91d51b196d55eb824a7 to your computer and use it in GitHub Desktop.
get possessive datas from wordbank and plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(wordbankr) | |
library(tidyverse) | |
possess_data <- get_instrument_data(language = "English (American)", | |
form = "WS", | |
items = "item_687") # note that 687 is the s-possess item | |
admin_data <- get_administration_data(language = "English (American)", | |
form = "WS") | |
left_join(possess_data, admin_data) %>% | |
filter(!is.na(value)) %>% | |
group_by(age, value) %>% | |
count %>% | |
group_by(age) %>% | |
summarise(prop = sum(n[value %in% c("sometimes", "often")])/sum(n)) %>% | |
ggplot(aes(x = age, y = prop)) + | |
geom_line() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment