Giter Club home page Giter Club logo

partypositions-wikitags's Introduction

Party positions from Wikipedia classifications

Herrmann, Michael, and Holger Döring. 2023. “Party Positions from Wikipedia Classifications of Party Ideology.” Political Analysis 31(1): 22–41. — doi: 10.1017/pan.2021.28

Holger Döring, and Michael Herrmann. [YEAR] “Party Positions from Wikipedia Tags.” — doi: 10.5281/zenodo.7043510

Results


Install

Running all scripts requires R, Python and Stan.

We use Docker as a replication environment. It includes R, RStudio, Python, Stan and all packages (see Dockerfile).

docker-compose up -d  # start container in detached mode

docker-compose down   # shut down container

http://localhost:8787/ — RStudio in a browser with all dependencies

Project structure

Note — Using RStudio project workflow – 0-wp-data.Rproj. All R scripts use project root as base path and file paths are based on it.

Folders

  • 01-data-sources
    • 01-partyfacts — Party Facts data
    • 02-wikipedia — Wikipedia data and infobox tags
    • 03-party-positions — party position data for validation (CHES, DALP, Manifesto, WVS)
  • 02-data-preparation — create datasets for analysis
  • 03-estimation — estimation of models and post-estimation
  • 04-data-final — datasets with party and tags positions (only M2)
  • 05-validation — validation of party positions (only M2)
  • 06-figures-tables — visualization of results (only M2)

Tag harmonization

A dataset of Wikipedia tags is created in 02-data-preparation/01-wp-infobox.R.

  • some minor harmonization of category names
  • selects only categories that are used twice

The dataset used for the analysis is created in 02-data-preparation/02-wp-data.R.

  • filter most frequent tags — see parameter
  • create dataset in wide format with tags as variable names

Estimation

Model 2 (and Model 1) can be estimated in 03-estimation.

We use only Model 2 for post-estimation and the succeeding preparation of final data, figures and tables.

Party positions

We include party position data for validation — see 01-data-sources/03-party-positions/

  • Chapel Hill Expert Survey (CHES) – trend file 1999–2019
  • Democratic Accountability and Linkages Project (DALP) expert survey (Kitschelt 2013)
  • Manifesto Project (MP) – left-right (rile) scores
  • World Values Survey (WVS) — voters left-right self-placement, Wave 6, 2010–2014

Changes

Differences of revised code with paper-based code used in replication material:

Herrmann, Michael, and Holger Döring. 2021. “Replication Data for: Party Positions from Wikipedia Classifications of Party Ideology.” — doi: 10.7910/DVN/1JHZIU

Data

  • new (revised) main final dataset — 04-descriptives/party-tags-positions.csv
  • remove historical and faction tags sections

Code

  • Stan statistical computing platform used for estimation (JAGS deprecated)
  • new folder structure with index numbers
  • fewer R packages dependencies
  • focus on Model 2 (Model 1 estimation only)
  • removed tables and figures only relevant for paper
  • revised documentation all scripts

datasets

License

MIT — Copyright (c) 2022 Holger Döring and Michael Herrmann

partypositions-wikitags's People

Contributors

hdigital avatar miherrmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

partypositions-wikitags's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.