Code Monkey home page Code Monkey logo

germanpolls's Introduction

germanpolls - an R package for German polling data

germanpolls is an R package for scraping Wahlrecht.de, a German website with the most comprehensive collection of polling results.

Install

install.packages("germanpolls")

devtools::install_github("cutterkom/germanpolls")

Usage

library(germanpolls)

polling_data <- germanpolls(region = "de")

Result

You get all elements from XML files in a dataframe.

Available data

Call data for regions with germanpolls(region = "de") for Germany or region = "by" for Bavaria.

You can get polling data for:

  • de,Deutschland
  • by,Bayern
  • he,Hessen
  • hb,Bremen
  • ni,Niedersachsen
  • sn,Sachsen
  • th,Thüringen

You can't get polling data for:

  • eu, European Union
  • be,Berlin
  • bb,Brandenburg
  • bw,Baden-Württemberg
  • hh,Hamburg
  • mv,Mecklenburg-Vorpommern
  • nw,Nordrhein-Westfalen
  • rp,Rheinland-Pfalz
  • sh,Schleswig-Holstein
  • sl,Saarland
  • st,Sachsen-Anhalt

What you get

** Caution! old version**

You get a dataframe with the following variables on the federal level:

  • institute
  • date
  • sample size
  • period
  • results for parties: cdu.csu,spd,grüne,fdp,linke,afd,sonstige,nw_un,piraten,fw
  • type (phone, online, unknown)

...

Better Polls

Germanpolls is a byproduct of gen-better-polls. At the GEN Hackathon at Süddeutsche Zeitung we were working on a better way to visualize polling data.

To Do

  • Rename variables (parties etc)
  • Document all Variables
  • germanpolls_latest(): get only the last poll
  • Submit to CRAN

germanpolls's People

Contributors

cutterkom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.