A library for creating insights from publicly available data on the Polish Energy Regulatory Office
Project description
Polish Energy Regulatory Office Library
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:
-
Clone the repository:
git clone https://github.com/WiktorHawrylik/polish-energy-regulatory-office.git cd polish-energy-regulatory-office
-
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies:
make install-dev -
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
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: wiktor.hawrylik@gmail.com
๐ 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polish_energy_regulatory_office-0.0.1.tar.gz.
File metadata
- Download URL: polish_energy_regulatory_office-0.0.1.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1335dee84de16e5c044d8b481cee737aee7e649f380a234b666e5e58bfeda0ae
|
|
| MD5 |
88bae05472028b9be55efebeb1154676
|
|
| BLAKE2b-256 |
c4860c942513ead9e20754c8678f99584d6f1af37811abc6479ee3b484d9e883
|
File details
Details for the file polish_energy_regulatory_office-0.0.1-py3-none-any.whl.
File metadata
- Download URL: polish_energy_regulatory_office-0.0.1-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f131478a883b1cb16f1bac6dd0a6b4ab1b25a013d5c78e67d69dbb3dd19d9b1f
|
|
| MD5 |
bf065ad086585d9c7161f8a51eaebf20
|
|
| BLAKE2b-256 |
2ead2f3ccd6d08ae65c6c193850330006cae1105bfba5b8404f4d88450121ccf
|