Skip to content

Instantly share code, notes, and snippets.

@romainfrancois
Last active June 21, 2019 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romainfrancois/0e8bc84bb89710ebbf58cb6618612c83 to your computer and use it in GitHub Desktop.
Save romainfrancois/0e8bc84bb89710ebbf58cb6618612c83 to your computer and use it in GitHub Desktop.
suppressMessages(library(tidyverse))
musique <- jsonlite::read_json("https://www.data.gouv.fr/fr/datasets/r/0dba0390-5eba-401f-aae5-933243c0b163", simplifyDataFrame = TRUE)$fields
musique %>%
pull("keywords_fr") %>%
str_split(";") %>%
flatten_chr() %>%
table() %>%
enframe() %>%
arrange(desc(value))
#> # A tibble: 2,426 x 2
#> name value
#> <chr> <table>
#> 1 rock 123
#> 2 musique 88
#> 3 concert 86
#> 4 fête de la musique 56
#> 5 pop 49
#> 6 jazz 47
#> 7 gratuit 42
#> 8 chorale 41
#> 9 Rock 37
#> 10 blues 23
#> # … with 2,416 more rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment