DH-forum: R and accessing the Norwegian parliamentary data

Martin Søyland is a Postdoctoral Fellow at the Department of Political Science at the University of Oslo. He will explain how to retrieve data from the Norwegian parliament using the package stortingscrape.

Screenshot fra en database på en pc-skjerm

DH forum - an open lecture series for Digital Humanities and Social Sciences

Digital Humanities and Social Sciences emphasize using digital methods, research activities and tools in humanities and social science research. Though the term Digital Humanities was only coined in 2004, as a field of research, it has been practiced and taught in Norway for nearly forty years.

R and accessing the Norwegian parliamentary data

The R software and the package stortingscrape offers a solution for easily extracting data from the Parliament of Norway, Stortinget. The philosophy and scope of the stortingscrape package will be explained, and examples of how to use the package will be showcased. The package can be found on the Comprehensive R Archive Network (CRAN) and as open source code on GitHub.

The Norwegian Parliament produces a lot of data made available at stortinget.no. Within these data, there is much-untapped potential for political analyses for multiple disciplines over many topics. Whether through front-end websites or back-end APIs, researchers on parliaments have never had easier access to large amounts of data than they do now. However, both frontend and API scraped data often come in formats (.html, .xml, .json, etc.) that require substantial structuring and pre-processing before they are ready for subsequent analyses.

The R package stortingscrape aims to make this process easier for both researchers and students by offering a set of functions that simplify data retrieval from Stortinget while still preserving user agency. The main goal of stortingscrape is to allow researchers to access any data from the Norwegian parliament easily but also still be able to structure the data according to one's needs. Most importantly, the package is facilitated for weaving together different parts of the data.stortinget.no API. In sum, stortingscrape makes the process of selecting, accessing, and structuring data from Stortinget accessible for a large range of scholars from various disciplines.

 

Tags: Digital humanities, R-pakken, GitHub
Published Sep. 16, 2022 10:19 AM - Last modified Jan. 4, 2023 3:43 PM