Skip to main content

Download polls data from Politico Polls.

Project description

Download polls from Politico Polls with this Python package.

Politico collects polls data from all european country, but doesn't give a possibility to download this data. If you want to use these polls data you can easy download that with this package in python. It's just some seconds.

There are some countries what is not available in the package, please consider upgrades in the future.

This package uses Python Selenium with Chrome driver. After the scraping of x and y axis, the package scraps every points's position, then with a simple linear regression, turn cx and cy values to dates and percentages.

Let me know if you have any observation.

Usage

Import the package:

from politicopolls import politico

Assign a variable with the class in the module.

var = politico.Politico()

To get a list about available countries, type this:

var.get_list()

To download polls from a country, use this:

var.download('hungary')

If you want to work with the result dataframe, you can do this:

var.df

Please notice

This is my first Python package, you can expect bugfixes and upgrades. The package uses Selenium and pandas so maybe a little bit slow. I am on it.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

politicopolls-1.0.6.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

politicopolls-1.0.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file politicopolls-1.0.6.tar.gz.

File metadata

  • Download URL: politicopolls-1.0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for politicopolls-1.0.6.tar.gz
Algorithm Hash digest
SHA256 d275aad590999b84057b96e8a96315f33ee73d2ba689f8b4a92caf69d93e43ad
MD5 91f5f56fb4cdf73f9d04af094c1c7e65
BLAKE2b-256 d5a05226e4a6ff30bd287c349d125c79f1ada8fbec74cf2c522dda1489da1d69

See more details on using hashes here.

File details

Details for the file politicopolls-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: politicopolls-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for politicopolls-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4269add53681763b1f253c27a6919adf6da8a4af0cad00a9b62d95477e3627a6
MD5 deac4b6cd54456e1d443d8584e400a2f
BLAKE2b-256 57dd82eeebed4156e5a3af0a6549eb421667a7997ceaf552a54dcead71af2eb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page