R code examples to teach basic Web scraping with
rvest and related packages.
lagasafn· legal cross-references in Icelandic law
jorf· XML field extraction from the French Official Journal
cop21· word extraction from the UNCC Paris Accord
qosd· keyword co-occurrence in French parliamentary questions
Projects mentioned but not included in the repository:
marsad· voting behaviour in the Tunisian parliament
parlnet· bill cosponsorship in European parliaments
parlviz· interactive visualizations of the above
Slides shown but not included in the repository (available on request):
- "Large-scale legislative data collection from online sources" (2016)
- "Web scraping et APIs avec R" (2017)
- Run the
dependencies.rscript to install all required packages.
- Run each code folder separately. Each has its own
- Sabrina Granger and Isabelle Scarpat-Bouvet for excellent logistics.
- Thomas J. Leeper for his
word_countfunction, used in the
- Emiliano Grossman for inspiring the