Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
michalovadek committed Mar 31, 2022
1 parent ba1b473 commit faa65e7
Show file tree
Hide file tree
Showing 23 changed files with 1,575 additions and 1,807 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^CODE_OF_CONDUCT\.md$
^LICENSE\.md$
^\.github$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.RData
.Ruserdata
eurlex.Rproj
/doc/
/Meta/
4 changes: 2 additions & 2 deletions doc/eurlexpkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ rec_eurovoc %>%

## ----getdatapur, message = FALSE, warning=FALSE, error=FALSE------------------
# the function is not vectorized by default
elx_fetch_data(results$work[1],"title")
elx_fetch_data(url = results$work[1], type = "title")

# we can use purrr::map() to play that role
library(purrr)

dir_titles <- results[1:10,] %>% # take the first 10 directives only to save time
mutate(title = map_chr(work,elx_fetch_data, "title")) %>%
mutate(title = map_chr(work, elx_fetch_data, "title")) %>%
as_tibble() %>%
select(celex, title)

Expand Down
6 changes: 3 additions & 3 deletions doc/eurlexpkg.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ One of the most sought-after data in the Eur-Lex dataverse is the text. It is po

```{r getdatapur, message = FALSE, warning=FALSE, error=FALSE}
# the function is not vectorized by default
elx_fetch_data(results$work[1],"title")
elx_fetch_data(url = results$work[1], type = "title")
# we can use purrr::map() to play that role
library(purrr)
dir_titles <- results[1:10,] %>% # take the first 10 directives only to save time
mutate(title = map_chr(work,elx_fetch_data, "title")) %>%
mutate(title = map_chr(work, elx_fetch_data, "title")) %>%
as_tibble() %>%
select(celex, title)
Expand Down Expand Up @@ -262,6 +262,6 @@ dirs_1970_title %>%

I use term-frequency inverse-document frequency (tf-idf) to weight the importance of the words in the wordcloud. If we used pure frequencies, the wordcloud would largely consist of words conveying little meaning ("the", "and", ...).

This is an extremely basic application of the `eurlex` package. Much more sophisticated methods can be used to analyse both the content and metadata of European Union legislation. If the package is useful for your research, please consider citing the [accompanying paper](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150).^[Michal Ovádek (2021) Facilitating access to data on European Union laws, Political Research Exchange, 3:1, DOI: [10.1080/2474736X.2020.1870150](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150)]
This is an extremely basic application of the `eurlex` package. Much more sophisticated methods can be used to analyse both the content and metadata of European Union legislation. If the package is useful for your research, please cite the [accompanying paper](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150).^[Michal Ovádek (2021) Facilitating access to data on European Union laws, Political Research Exchange, 3:1, DOI: [10.1080/2474736X.2020.1870150](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150)]


778 changes: 309 additions & 469 deletions doc/eurlexpkg.html

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/eurlexpkg.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/eurlexpkg_files/figure-html/firstplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/eurlexpkg_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/eurlexpkg_files/figure-html/wordcloud-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 80 additions & 82 deletions docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit faa65e7

Please sign in to comment.