Web Scraper for Eurostat data.
Project description
Eurostat
Package is a simple interface for parsing data from Eurostat:
- deaths counts
- population sizes
To import and fetch data, simply write
import eurostat_deaths
Function deaths()
fetches the deaths, function populations()
fetches the populations. Use them such as
Deaths
from datetime import datetime
import eurostat
data = eurostat.deaths(start = datetime(2019,1,1))
Parameter start
sets the start of the data. The end is always now()
.
You receive per-week data of deaths. Since the total size of the data frame is about 218 MB, call taes more than 15 minutes. The usage of memory is significant.
In the future, module will be reimplemented to use Big Data framework, such as PySpark.
The data can be forwarded directly to file. Give the function a filename by parameter output
.
from datetime import datetime
import eurostat
data = eurostat.deaths(output = "file.csv", start = datetime(2019,1,1))
Parameter output = None
causes that the output is collected into a single dataframe and returned.
One additional setting is chunksize
to set the size of chunk, that is processed at a time. The unit used is thousands of rows.
Population
TODO
Credits
Author: Martin Benes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for eurostat_deaths-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12625f872a9decd3812889c77ea19d9ef5ebb16b2cef6f015d5f433ce0c0028f |
|
MD5 | 52fe080d27e382c4b7b82b00d9a8d629 |
|
BLAKE2b-256 | 4d02ef74b7f3c6a3c36da58f097182a7136a7effa3743b48775ee4a2b06bef33 |