Metadata-Version: 2.1
Name: politicopolls
Version: 1.0.4
Summary: Download polls data from Politico Polls.
Author-email: Robert Vamosi <vamosi.robert2@gmail.com>
License: MIT License
        
        Copyright (c) 2023 VRobert123
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/VRobert123/politico_polls_scraper
Keywords: politico,polls,download,scraper,scraping,election,polls
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# 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
