token_count | R Documentation |
Takes a dataframe with columns from cols and counts the unique occurrences, returns a data frame with counts.
token_count(dat_tokens, cols = TOKEN_TOKEN_TYPE_VEC, .groups = "drop", ...)
dat_tokens |
data frame with columns in cols. |
cols |
vector of column names. Default token, token_type |
.groups |
passed to summarize. Default 'drop' |
... |
not used |
temp_fn <- tempfile() download.file("https://www150.statcan.gc.ca/n1/pub/37-26-0001/2021001/ODEF_v2.zip",temp_fn) dat_odef <- readr::read_csv(unz(temp_fn, "ODEF_v2/ODEF_v2.csv")) toke_odef <- dat_odef |> tokenize_df(col_nms = c('Facility_Name','Facility_Type', 'Authority_Name', 'Full_Addr'), token_types = c('company_name', 'company_name', 'company_name', 'Address')) toke_odef |> token_count()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.