This package has been deprecated

Author message:

WARNING: This package is unmaintained and might be broken. If you would like to maintain it, please contact mail@juliustens.eu

wahlrecht

1.0.1 • Public • Published

wahlrecht

Scrapes wahlrecht.de for the latest public opinion polls on the german general election (Bundestagswahl).

npm version Build Status Greenkeeper badge dependency status license chat on gitter

Installation

npm install wahlrecht

Usage

The module provides seperate methods for each institute:

  • allensbach()
  • emnid()
  • forsa()
  • politbarometer() - Forschungsgruppe Wahlen
  • gms()
  • dimap() - Infratest Dimap
  • insa()

and a method that combines all polls:

  • all()

Each method returns a promise that resolves in an array of objects like this:

{
    date: '2017-01-27T00:00:00+01:00',
    results: {
        union: 0.36,
        spd: 0.24,
        'grüne': 0.08,
        fdp: 0.06,
        linke: 0.1,
        afd: 0.11,
        sonstige: 0.05
    },
    sampleSize: 1303,
    period: '24.01.–26.01.',
    institute: 'politbarometer'
}

Simple example:

const wahlrecht = require('wahlrecht')
 
wahlrecht.all().then(console.log)
wahlrecht.dimap().then(console.log)

See also

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.

Package Sidebar

Install

npm i wahlrecht

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

8.85 kB

Total Files

5

Last publish

Collaborators

  • juliuste