Skip to contents

Turns the Gallicagram API data into a tibble, renames the variables and add the input parameters to the output tibble.

Usage

tidy_gallicagram(url, corpus, resolution_en)

Arguments

url

A url to pass the Gallicagram API

corpus

A character string. The corpus to search. The list of available corpora can be found in the list_corpora dataset.

resolution_en

A character string. Can only be "daily", "monthly" or "yearly".

Value

A tibble. With the keyword, the number of occurrences (n_occur) or co-occurrences (n_cooccur), the total number of ngrams or aritcles over the period (n_total), the proportion of occurrences or co-occurrences of the keyword(s) over the period of a given observation (prop_occcur or prop_coocccur), either info about whether the total number is a number of grams or articles (n_of) or about the syntagma at which the co-occurrences are computed (cooccur_level), the date at the beginning of the period of a given observation (date), the corpus, the resolution, the year and potentially the month and day of the observation.