Skip to main content

Uses the EPIAS API to fetch electricity data for Turkey. The package also cleans and structures the data to be used in forecasting models.

Project description

Turkey Day Ahead Market Electricity Price Data Fetching

Brief Description

This project fetches Turkey's day-ahead market electricity price data along with balancing market prices, forecasted demand, and supply data. The data is extracted from EPIAS' publicly available APIs and processed into a structured format for further analysis.

Installation Instructions

To install the package, use the following command:

pip install electricity_data_fetching_tr

Usage Examples

Below are examples of how to use the classes provided in this package to fetch and process the data.

To create a new dataset, use the code below. Give the desired date range. If you do not provide a file name, a file will be created with the name in the format: dataset_electricity_<start_date>_<end_date>.csv

from electricity_data_fetching_tr import GetData
# Give start and end dates to create a new CSV with the data in that range.
data = GetData()
data.get_data('2017-01-01', '2024-06-18')

You can provide a file name, do not include the file extension.:

data = GetData()
data.get_data('2017-01-01', '2024-06-18', 'data')

If you want the dataset to be saved someplace else that the current directory, you can provide the path:

data = GetData(dataset_dir='path/to/dataset')
# The same can be used in UpdateData
data.get_data('2017-01-01', '2024-06-18', 'data')

Please note that the data before 2017 may contains duplicate timestamp indexes because of the summer-winter time transitions.

Use the code below to update your existing dataset with recent information. This code fills the dataset with new data, starting from the last date in the dataset until the current day. If you pass the optional argument replace_last_day as True, the script will delete the last day's data from the dataset and re-fetch it. This is useful because Day-Ahead Market Prices are announced at 14.00 every day, and data can be fetched before that to perform forecasts. That in the next day, empty columns will be filled if you use this.

from electricity_data_fetching_tr import UpdateData

data = UpdateData('data')
data.get_data()
# Or, preferably:
data = UpdateData('data')
data.get_data(replace_last_day=True)

License Information

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

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

electricity_data_fetching_tr-0.1.5.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file electricity_data_fetching_tr-0.1.5.tar.gz.

File metadata

File hashes

Hashes for electricity_data_fetching_tr-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c655ad9b4487dd09ddec5a0247b1706407222af33bf313c73d8a00829dbf4d16
MD5 362662200dc3a2b6a3aed0c443b43f5e
BLAKE2b-256 2e72919c8ef112019a97a6481ebec64673f136a1a79772eb88b30bf6f29120aa

See more details on using hashes here.

File details

Details for the file electricity_data_fetching_tr-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for electricity_data_fetching_tr-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 14a3c6ecee7186af65a6292a6f04cb7ef99982d4892882aec1cb5d317f0df841
MD5 c9e31e35e6a1901bc557ccb5876c6d79
BLAKE2b-256 24c67da8089e954f22eb0b8e93b38124de4db5a2292efbec979a069b761bf201

See more details on using hashes here.

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