wikiaves.Rmd
The main function is wa_metadata()
. It takes a “term” specifying the species that you would like to retrieve information and download the audio files (in mp3 format). In the exmaple below brings all records from species “Querula purpurata” into a tidy tibble.
library(wikiaves)
library(dplyr)
# fetching metadata in a tidy tibble
querula_purpurata_metadata <- wa_metadata(c("Querula purpurata"))
#> IDs found from terms:
#> id = 11387 (from term 'Querula purpurata')
#> 66 registers fetched from 1 distinct IDs.
querula_purpurata_metadata %>% head
#> # A tibble: 6 x 35
#> term id wid label nome sp tax class ds titulo link total
#> <chr> <chr> <chr> <chr> <chr> <int> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> 2 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> 3 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> 4 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> 5 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> 6 Queru… 11387 anam… Quer… anam… 1 Espé… sp 1 Sons … regi… 66
#> # … with 23 more variables: id1 <int>, tipo <chr>, id_usuario <chr>,
#> # sp.id <chr>, sp.nome <chr>, sp.nvt <chr>, sp.idwiki <chr>,
#> # autor <chr>, por <chr>, perfil <chr>, data <chr>,
#> # is_questionada <lgl>, local <chr>, idMunicipio <int>, coms <int>,
#> # likes <int>, vis <int>, grande <chr>, enviado <chr>, link1 <chr>,
#> # dura <chr>, mp3_name <chr>, mp3_link <chr>
To download all files from querula_purpurata_metadata
we could use wa_download()
.
The term could be part of the species name also (like the gender).
querula_metadata <- wa_metadata(c("Querula"))
#> IDs found from terms:
#> id = 11387 (from term 'Querula')
#> 66 registers fetched from 1 distinct IDs.
For now, to browse for species names is recommended to start from the wikiaves website.