wahlrecht

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


Keywords
wahlrecht, wahlrecht.de, polls, election, germany, deutschland, bundestag, bundestagswahl, umfrage, infratest, dimap, insa, allensbach, emnid, politbarometer, forschungsgruppe, wahlen, gms, forsa, german, opinion-polls, poll
License
ISC
Install
npm install wahlrecht@1.0.1

Documentation

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.