All Projects → saschagobel → Legislator

saschagobel / Legislator

Interface to the Comparative Legislators Database

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Legislator

Everypolitician Data
data for national legislatures worldwide
Stars: ✭ 174 (+180.65%)
Mutual labels:  dataset, data, politics
Datasets
TFDS is a collection of datasets ready to use with TensorFlow, Jax, ...
Stars: ✭ 3,094 (+4890.32%)
Mutual labels:  dataset, data
Retriever
Quickly download, clean up, and install public datasets into a database management system
Stars: ✭ 241 (+288.71%)
Mutual labels:  dataset, data
Data Science Hacks
Data Science Hacks consists of tips, tricks to help you become a better data scientist. Data science hacks are for all - beginner to advanced. Data science hacks consist of python, jupyter notebook, pandas hacks and so on.
Stars: ✭ 273 (+340.32%)
Mutual labels:  dataset, data
Data Science Resources
👨🏽‍🏫You can learn about what data science is and why it's important in today's modern world. Are you interested in data science?🔋
Stars: ✭ 171 (+175.81%)
Mutual labels:  dataset, data
Awesome Json Datasets
A curated list of awesome JSON datasets that don't require authentication.
Stars: ✭ 2,421 (+3804.84%)
Mutual labels:  dataset, data
Datagear
数据可视化分析平台,使用Java语言开发,采用浏览器/服务器架构,支持SQL、CSV、Excel、HTTP接口、JSON等多种数据源
Stars: ✭ 266 (+329.03%)
Mutual labels:  dataset, data
Coffee Quality Database
Building the Coffee Quality Institute Database
Stars: ✭ 141 (+127.42%)
Mutual labels:  dataset, data
Browser Compat Data
This repository contains compatibility data for Web technologies as displayed on MDN
Stars: ✭ 3,710 (+5883.87%)
Mutual labels:  dataset, data
Voice datasets
🔊 A comprehensive list of open-source datasets for voice and sound computing (50+ datasets).
Stars: ✭ 494 (+696.77%)
Mutual labels:  dataset, data
Awesome Twitter Data
A list of Twitter datasets and related resources.
Stars: ✭ 533 (+759.68%)
Mutual labels:  dataset, data
Covid 19 Uk Data
Coronavirus (COVID-19) UK Historical Data
Stars: ✭ 169 (+172.58%)
Mutual labels:  dataset, data
Weeklypedia
A weekly email update of all the most popular wikipedia articles
Stars: ✭ 50 (-19.35%)
Mutual labels:  wikipedia, data
Charlatan
Create fake data in R
Stars: ✭ 209 (+237.1%)
Mutual labels:  dataset, data
Pandas Datareader
Extract data from a wide range of Internet sources into a pandas DataFrame.
Stars: ✭ 2,183 (+3420.97%)
Mutual labels:  dataset, data
Jschema
A simple, easy to use data modeling framework for JavaScript
Stars: ✭ 261 (+320.97%)
Mutual labels:  dataset, data
Datasets
🎁 3,000,000+ Unsplash images made available for research and machine learning
Stars: ✭ 1,805 (+2811.29%)
Mutual labels:  dataset, data
Dataspice
🌶 Create lightweight schema.org descriptions of your datasets
Stars: ✭ 137 (+120.97%)
Mutual labels:  dataset, data
Datascience course
Curso de Data Science em Português
Stars: ✭ 294 (+374.19%)
Mutual labels:  dataset, data
Listen To Wikipedia
Live, generative music from Wikipedia edits
Stars: ✭ 685 (+1004.84%)
Mutual labels:  wikipedia, data

legislatoR: Interface to the Comparative
Legislators Database

Travis-CI Build Status License: GPL v3 CRAN_Status_Badge GitHub release version CRAN_Download_Badge

legislatoR is a package for the software environment R that facilitates access to the Comparative Legislators Database (CLD). The CLD includes political, sociodemographic, career, online presence, public attention, and visual information for over 45,000 contemporary and historical politicians from ten countries.

Content and data structure

The CLD covers the following countries and time periods:

Country Legislative sessions Politicians (unique) Integrated with
Austria (Nationalrat) all 27
(1920-2019)
1,923 ParlSpeech V2 (Rauh/Schwalbach 2020)
Canada (House of Commons) all 43
(1867-2019)
4,515
Czech Republic (Poslanecka Snemovna) all 8
(1992-2017)
1,020 ParlSpeech V1 (Rauh et al. 2017)
France (Assemblée) all 15
(1958-2017)
3,933
Germany (Bundestag) all 19
(1949-2017)
4,075 BTVote data (Bergmann et al. 2018),
ParlSpeech V1 (Rauh et al. 2017),
Reelection Prospects data (Stoffel/Sieberer 2017)
Ireland (Dail) all 33
(1918-2020)
1,408 Database of Parliamentary Speeches in Ireland (Herzog/Mikhaylov 2017)
Scotland (Parliament) all 5
(1999-2016)
305 ParlScot (Braby/Fraser 2021)
Spain (Congreso de los Diputados) all 14
(1979-2019)
2634 ParlSpeech V2 (Rauh/Schwalbach 2020)
United Kingdom (House of Commons) all 58
(1801-2019)
13,215 EggersSpirling data (starting from
38th session, Eggers/Spirling 2014),
ParlSpeech V1 (Rauh et al. 2017)
United States (House and Senate) all 116
(1789-2019)
12,512 Voteview data (Lewis et al. 2019),
Congressional Bills Project data (Adler/Wilkserson 2018)
10 338 45,540 12

For each legislature, the CLD holds nine tables:

  1. Core (sociodemographic data)
  2. Political (political data)
  3. History (full revision records of individual Wikipedia biographies)
  4. Traffic (daily user traffic on individual Wikipedia biographies starting from July 2007)
  5. Social (social media handles and personal website URLs)
  6. Portraits (URLs to portraits)
  7. Offices (public offices)
  8. Professions (professions)
  9. IDs (identifiers linking politicians to other files, databases, or websites)

The tables contain the following variables (see respective R help files for further details):

  • Core: Country, Wikipedia page ID, Wikidata ID, Wikipedia Title, full name, sex, ethnicity, religion, date of birth and death, place of birth and death.
  • Political: Wikipedia page ID, legislative session, party affiliation, lower constituency, upper constituency, constituency ID, start and end date of legislative session, period of service, majority status, leader positions.
  • History: Wikipedia page ID, Wikipedia revision and previous revision ID, editor name/IP and ID, revision date and time, revision size, revision comment.
  • Traffic: Wikipedia page ID, date, user traffic.
  • Social: Wikidata ID, Twitter handle, Facebook handle, Youtube ID, Google Plus ID, Instagram handle, LinkedIn ID, personal website URL.
  • Portraits: Wikipedia page ID, Wikipedia portrait URL.
  • Offices: Wikidata ID, a range of offices such as attorney general, chief justice, mayor, party chair, secretary of state, etc.
  • Professions: Wikidata ID, a range of professions such as accountant, farmer, historian, judge, mechanic, police officer, salesperson, teacher, etc.
  • IDs: Wikidata ID, IDs for integration with various political science datsets as well as a range of other IDs such as parliamentary website IDs, Library of Congress or German National Library IDs, Notable Names Database or Project Vote Smart IDs, etc.

Note that for some legislatures or legislative periods, tables may only hold information for a subset of politicians or variables. In successive versions of the CLD, we fill some of these gaps.

The CLD comes as a relational database. This means that all tables can be joined with the Core table via one of two keys - the Wikipedia page ID or the Wikidata ID. These keys uniquely identify individual politicians. The figure below illustrates this structure and the CLD's content.

Installation

legislatoR is available through CRAN and GitHub. To install the package from CRAN, type:

install.packages("legislatoR")

To install the package from Github, type:

devtools::install_github("saschagobel/legislatoR")

Usage

A working Internet connection is required to access the CLD in R. This is because the data are stored online and not installed together with the package. The package provides table-specific function calls. These functions are named after the respective table (see above) and preceded by get_. To fetch the Core table, use the get_core() function, for the Political table, use the get_political() function. Call the package help file via ?legislatoR() to get an overview of all function calls. Tables are legislature-specific, so a three-letter country code must be passed as an argument to the function. Here is a breakdown of all country codes. You can also call the cld_content() function to get an overview of the CLD's scope and valid country codes.

Legislature Code Legislature Code Legislature Code
Austrian Nationalrat aut German Bundestag deu UK House of Commons gbr
Canadian House of Commons can Irish Dail irl United States Congress usa_house/usa_senate
Czech Poslanecka Snemovna cze Scottish Parliament sco
French Assemblée fra Spanish Congreso esp

Tables can be joined and subsetted while being fetched and memory is only allocated by the parts of a table assigned into the environment. Basic fetching, joining, and subsetting of data are illustrated below. See the Vignette Introducing legislatoR for a detailed tutorial.

# load and attach legislatoR and dplyr
library(legislatoR)
library(dplyr)

# assign entire Core table for the German Bundestag into the environment
deu_politicians <- get_core(legislature = "deu")

# assign data for the 8th legislative session into the environment
deu_politicians_subset <- semi_join(x = get_core(legislature = "deu"),
				                            y = filter(get_political(legislature = "deu"), session == 8), 
			                              by = "pageid")

# join deu_politicians_subset with respective traffic on Wikipedia biographies
deu_traffic <- left_join(x = deu_politicians_subset, 
               		       y = get_traffic(legislature = "deu"), 
		                     by = "pageid")

# assign birthdate for members of the political party 'SPD' into the environment
deu_birthdates_SPD <- semi_join(x = select(get_core(legislature = "deu"), pageid, birth),
                                y = filter(get_political(legislature = "deu"), party == "SPD"),
                                by = "pageid")$birth

News

See here for details on updates.

Glossary

See here for the full form of abbreviated country codes and party names and English translations of non-English party names.

Sources

The CLD was predominantly built using automated data extraction techniques. See the source code and this list of Web sources for more details.

Citation

Thank you for using the CLD and legislatoR! Please consider citing:

Göbel, Sascha and Simon Munzert. "The Comparative Legislators Database". Forthcoming at British Journal of Political Science.

Support

The work on this package was in part funded by the Daimler and Benz Foundation (Funding period 2017/18; project "Citizen and Elite Activity on the Wikipedia Market Place of Political Information").

Many thanks to Anna Wunderling for designing legislatoR's logo.

Author information

Sascha Göbel (corresponding author and repository maintainer)
University of Konstanz
Graduate School of Decision Sciences and Center for Data and Methods
Box 85
D-78457 Konstanz, Germany
Email: [email protected]

Simon Munzert
Hertie School of Governance
Quartier 110 - Friedrichstrasse 180
D-10117 Berlin, Germany
Email: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].