# NOT RUN {
library(ggplot2)
kco <- new("KorAPConnection", verbose=TRUE)
# }
# NOT RUN {
year <- (2003:2011)
# }
# NOT RUN {
condition <- c("textDomain = /Wirtschaft.*/", "textDomain != /Wirtschaft.*/")
# }
# NOT RUN {
g <- expand_grid(condition, year) %>%
cbind(frequencyQuery(kco, "[tt/l=Heuschrecke]",
paste0(.$condition," & pubDate in ", .$year))) %>%
ipm() %>%
ggplot(aes(year, ipm, fill = condition, color = condition)) +
## theme_light(base_size = 20) +
geom_freq_by_year_ci()
p <- ggplotly(g)
print(p)
## saveWidget(p, paste0(tmpdir(), "heuschrecke.html")
# }
Run the code above in your browser using DataLab