Skip to main content

Parse reports covering renewables published by the Czech Ministry of Trade and Industry

Project description

Renewables in YYYY

The Czech Ministry of Industry and Trade (Ministerstvo průmyslu a obchodu, MPO) each year publishes a statistical report Renewable Energy Resources in YYYY in the form of a PDF file which contains statistics about renewable energy production in the country.

This package provides two commands for scraping links to these PDF reports and parsing tables in ther reports (for selected year).

One script scrapes links to these PDF reports from the website and saves them to CSV.

Another script parses selected pdf report using Camelot:

  • reads data tables,
  • removes spaces between numbers and
  • saves tables as CSV files in the directory for the relevant year. It also saves one Excel file for the year (one worksheet per table).

Instalation

python3 -m venv venv
pip install mpo-oze

Usage

# Scrape links to csv file
mpo links

# Parse 2020 report
mpo pdf --y 2020
usage: mpo [-h] [-y YEAR] {links,pdf}

parse tables in reports on renewables from MPO

positional arguments:
  {links,pdf}           scrape links to reports or the report pdf itself

optional arguments:
  -h, --help            show this help message and exit
  -y YEAR, --year YEAR  select report year of interest (default: 2020)

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

mpo-oze-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

mpo_oze-0.0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file mpo-oze-0.0.2.tar.gz.

File metadata

  • Download URL: mpo-oze-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for mpo-oze-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c86ff91ee8c8c8a4fb859b735866cd8d98e47cbe711e58ad8a9ce66b3e1f5695
MD5 c159011eed7da948a6e7ae865e98227d
BLAKE2b-256 ebe19c8ae57438555ca728395720731746359d8e06e616f7bd33b00f7f3046a5

See more details on using hashes here.

Provenance

File details

Details for the file mpo_oze-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mpo_oze-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for mpo_oze-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb90c03789e51e5274a417adf2fc20174475c9627b5602a4bb864edfa8ee8b8d
MD5 4b37bd247941af7807a6c7dce21caec9
BLAKE2b-256 ef14bef7e8fb200919a126dc52aa94ab56afaa4f44dd0f4dbc8a600a773f2fb0

See more details on using hashes here.

Provenance

Supported by

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