Skip to main content

A library for creating insights from publicly available data on the Polish Energy Regulatory Office

Project description

Polish Energy Regulatory Office Library

CI codecov PyPI version Python versions License: MIT

A comprehensive Python library for creating insights from publicly available data on the Polish Energy Regulatory Office (Urzฤ…d Regulacji Energetyki) websites:

๐Ÿš€ Features

This mono-repository contains 6 specialized Python modules for energy market analysis:

๐Ÿ“Š Energy Price Analyzer

  • Track and analyze energy price trends
  • Compare tariff structures
  • Generate price forecasts
  • Historical price analysis

๐Ÿ—บ๏ธ Renewable Energy Sources Mapper

  • Map renewable energy installations across Poland
  • Analyze regional distribution of renewable sources
  • Track capacity growth over time
  • Visualize installation density by voivodeship

โšก Microinstallation Mapper

  • Monitor small-scale renewable energy deployments (โ‰ค50kW)
  • Track prosumer adoption rates
  • Analyze distributed generation patterns
  • Grid impact assessment

๐Ÿข Energy Efficiency Audit Tool

  • Analyze energy efficiency metrics
  • Generate comprehensive audit reports
  • Track efficiency improvements over time
  • Regulatory compliance checking

๐Ÿ’ฐ Tariff Oracle

  • Optimize energy tariff selection
  • Predict tariff changes
  • Calculate potential savings
  • Compare multiple tariff options

๐ŸŽฏ Renewable Auctions Monitor

  • Track renewable energy auction results
  • Analyze bid patterns and clearing prices
  • Monitor market trends
  • Support mechanism analysis

๐Ÿ“ฆ Installation

From PyPI (recommended)

pip install polish-energy-regulatory-office

From source

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
pip install -e .

Development installation

Option 1: Standard setup (Linux/Windows)

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
./setup_dev.sh

Option 2: macOS with pyenv (recommended for macOS)

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
./setup_dev_macos.sh

Option 3: Manual installation

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
pip install -e ".[dev,test,docs]"

๐Ÿ”ง Quick Start

Energy Price Analysis

from polish_energy_regulatory_office.energy_price_analyzer import EnergyPriceAnalyzer
from datetime import date

# Initialize analyzer
analyzer = EnergyPriceAnalyzer()

# Analyze price trends
trends = analyzer.analyze_price_trends(
    start_date=date(2023, 1, 1),
    end_date=date(2023, 12, 31),
    energy_type="electricity"
)

print(f"Average price: {trends.average_price} PLN/MWh")
print(f"Price trend: {trends.price_trend}")
print(f"Volatility: {trends.volatility}")

Renewable Energy Mapping

from polish_energy_regulatory_office.renewable_energy_sources_mapper import RenewableEnergyMapper
from polish_energy_regulatory_office.renewable_energy_sources_mapper.models import InstallationType

# Initialize mapper
mapper = RenewableEnergyMapper()

# Get solar installations in Mazowieckie voivodeship
solar_installations = mapper.get_installations_by_region(
    voivodeship="mazowieckie",
    installation_type=InstallationType.SOLAR_PV
)

print(f"Found {len(solar_installations)} solar installations")

# Generate regional statistics
regional_stats = mapper.generate_regional_statistics()
for voivodeship, stats in regional_stats.items():
    print(f"{voivodeship}: {stats.total_capacity_kw:.2f} kW total capacity")

Microinstallation Analysis

from polish_energy_regulatory_office.microinstallation_mapper import MicroinstallationMapper

# Initialize mapper
micro_mapper = MicroinstallationMapper()

# Get microinstallations by region
installations = micro_mapper.get_microinstallations_by_region("ล›lฤ…skie")
print(f"Microinstallations in ลšlฤ…skie: {len(installations)}")

Tariff Optimization

from polish_energy_regulatory_office.tariff_oracle import TariffOracle

# Initialize oracle
oracle = TariffOracle()

# Compare tariff options
tariff_comparison = oracle.compare_tariffs(
    tariff_ids=["G11", "G12", "G21"],
    annual_consumption_kwh=3500
)

best_tariff = oracle.recommend_optimal_tariff(
    consumption_profile={"peak": 1200, "off_peak": 2300}
)
print(f"Recommended tariff: {best_tariff}")

๐Ÿ“‹ Module Structure

src/polish_energy_regulatory_office/
โ”œโ”€โ”€ energy_price_analyzer/
โ”‚   โ”œโ”€โ”€ analyzer.py          # Main analysis engine
โ”‚   โ”œโ”€โ”€ models.py           # Data models
โ”‚   โ”œโ”€โ”€ scrapers.py         # Web scraping utilities
โ”‚   โ””โ”€โ”€ utils.py            # Helper functions
โ”œโ”€โ”€ renewable_energy_sources_mapper/
โ”‚   โ”œโ”€โ”€ mapper.py           # Mapping and analysis
โ”‚   โ”œโ”€โ”€ models.py           # Installation models
โ”‚   โ”œโ”€โ”€ scrapers.py         # Registry scrapers
โ”‚   โ””โ”€โ”€ utils.py            # Geospatial utilities
โ”œโ”€โ”€ microinstallation_mapper/
โ”‚   โ”œโ”€โ”€ mapper.py           # Micro-installation analysis
โ”‚   โ”œโ”€โ”€ models.py           # Prosumer data models
โ”‚   โ”œโ”€โ”€ scrapers.py         # Microinstallation scrapers
โ”‚   โ””โ”€โ”€ utils.py            # Analysis utilities
โ”œโ”€โ”€ energy_efficiency_audit_tool/
โ”‚   โ”œโ”€โ”€ auditor.py          # Audit engine
โ”‚   โ”œโ”€โ”€ models.py           # Audit data models
โ”‚   โ”œโ”€โ”€ scrapers.py         # Efficiency data scrapers
โ”‚   โ””โ”€โ”€ utils.py            # Audit utilities
โ”œโ”€โ”€ tariff_oracle/
โ”‚   โ”œโ”€โ”€ oracle.py           # Tariff prediction engine
โ”‚   โ”œโ”€โ”€ models.py           # Tariff data models
โ”‚   โ”œโ”€โ”€ scrapers.py         # Tariff data scrapers
โ”‚   โ””โ”€โ”€ utils.py            # Optimization utilities
โ””โ”€โ”€ renewable_auctions_monitor/
    โ”œโ”€โ”€ monitor.py          # Auction monitoring
    โ”œโ”€โ”€ models.py           # Auction data models
    โ”œโ”€โ”€ scrapers.py         # Auction data scrapers
    โ””โ”€โ”€ utils.py            # Analysis utilities

๐Ÿงช Testing

Run tests with pytest:

# Run all tests
make test

# Run with coverage
pytest --cov=polish_energy_regulatory_office

# Run specific test file
pytest tests/unit/test_energy_price_analyzer.py

# Run tests across all Python versions
make test-all

๐Ÿ” Code Quality

This project maintains high code quality standards:

# Format code
make format

# Run linting
make lint

# Type checking
mypy src

# Pre-commit hooks
make pre-commit

๐Ÿ“š Documentation

Build documentation locally:

make docs

Or visit the online documentation (when available).

๐Ÿ› ๏ธ Development

Setting up development environment

Quick Setup (Recommended):

For macOS users with pyenv:

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
./setup_dev_macos.sh

For Linux/Windows users:

git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
cd polish-energy-regulatory-office
./setup_dev.sh

Manual Setup:

  1. Clone the repository:

    git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git
    cd polish-energy-regulatory-office
    
  2. Create virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install development dependencies:

    make install-dev
    
  4. Install pre-commit hooks:

    make pre-commit
    

Contributing

This project follows the Git Flow branching strategy for organized development and releases. See CONTRIBUTING.md for detailed instructions on the development workflow, branch naming conventions, and submission process.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿค Support

๐Ÿ“ˆ Roadmap

  • Add support for historical data analysis
  • Implement machine learning models for price prediction
  • Add real-time data streaming capabilities
  • Create interactive web dashboard
  • Add support for European energy market data
  • Implement automated report generation

๐Ÿ™ Acknowledgments

  • Polish Energy Regulatory Office (URE) for providing public data access
  • Contributors and the open-source community
  • Python data science ecosystem (pandas, requests, BeautifulSoup, etc.)

Made with โค๏ธ for the Polish energy market analysis community

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

polish_energy_regulatory_office-0.0.1.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file polish_energy_regulatory_office-0.0.1.tar.gz.

File metadata

File hashes

Hashes for polish_energy_regulatory_office-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1335dee84de16e5c044d8b481cee737aee7e649f380a234b666e5e58bfeda0ae
MD5 88bae05472028b9be55efebeb1154676
BLAKE2b-256 c4860c942513ead9e20754c8678f99584d6f1af37811abc6479ee3b484d9e883

See more details on using hashes here.

File details

Details for the file polish_energy_regulatory_office-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for polish_energy_regulatory_office-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f131478a883b1cb16f1bac6dd0a6b4ab1b25a013d5c78e67d69dbb3dd19d9b1f
MD5 bf065ad086585d9c7161f8a51eaebf20
BLAKE2b-256 2ead2f3ccd6d08ae65c6c193850330006cae1105bfba5b8404f4d88450121ccf

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