# 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:
```bash
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`
```python
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.:
```python
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:
```python
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.
```python
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](LICENSE) file for more details.
Raw data
{
"_id": null,
"home_page": "https://github.com/rojenarda/electricity_data_fetching_tr",
"name": "electricity-data-fetching-tr",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "electricity data_fetching",
"author": "Rojen Arda \u015ee\u015fen",
"author_email": "sesen19@itu.edu.tr",
"download_url": "https://files.pythonhosted.org/packages/2e/72/919c8ef112019a97a6481ebec64673f136a1a79772eb88b30bf6f29120aa/electricity_data_fetching_tr-0.1.5.tar.gz",
"platform": null,
"description": "\n# Turkey Day Ahead Market Electricity Price Data Fetching\n\n## Brief Description\nThis 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.\n\n## Installation Instructions\nTo install the package, use the following command:\n```bash\npip install electricity_data_fetching_tr\n```\n\n## Usage Examples\nBelow are examples of how to use the classes provided in this package to fetch and process the data.\n\nTo 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`\n```python\nfrom electricity_data_fetching_tr import GetData\n# Give start and end dates to create a new CSV with the data in that range.\ndata = GetData()\ndata.get_data('2017-01-01', '2024-06-18')\n```\n\nYou can provide a file name, do not include the file extension.:\n```python\ndata = GetData()\ndata.get_data('2017-01-01', '2024-06-18', 'data')\n```\nIf you want the dataset to be saved someplace else that the current directory, you can provide the path:\n```python\ndata = GetData(dataset_dir='path/to/dataset')\n# The same can be used in UpdateData\ndata.get_data('2017-01-01', '2024-06-18', 'data')\n```\n\nPlease note that the data before 2017 may contains duplicate timestamp indexes because of the summer-winter time transitions. \n\nUse 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. \n```python\nfrom electricity_data_fetching_tr import UpdateData\n\ndata = UpdateData('data')\ndata.get_data()\n# Or, preferably:\ndata = UpdateData('data')\ndata.get_data(replace_last_day=True)\n```\n\n## License Information\nThis project is licensed under the GNU General Public License v3.0. See the [LICENSE](LICENSE) file for more details.\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "Uses the EPIAS API to fetch electricity data for Turkey. The package also cleans and structures the data to be used in forecasting models.",
"version": "0.1.5",
"project_urls": {
"Bug Tracker": "https://github.com/yourusername/electricity_data_fetching_tr/issues",
"Homepage": "https://github.com/rojenarda/electricity_data_fetching_tr",
"Source Code": "https://github.com/yourusername/electricity_data_fetching_tr"
},
"split_keywords": [
"electricity",
"data_fetching"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "24c67da8089e954f22eb0b8e93b38124de4db5a2292efbec979a069b761bf201",
"md5": "c9e31e35e6a1901bc557ccb5876c6d79",
"sha256": "14a3c6ecee7186af65a6292a6f04cb7ef99982d4892882aec1cb5d317f0df841"
},
"downloads": -1,
"filename": "electricity_data_fetching_tr-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c9e31e35e6a1901bc557ccb5876c6d79",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 25625,
"upload_time": "2024-06-29T19:33:07",
"upload_time_iso_8601": "2024-06-29T19:33:07.381624Z",
"url": "https://files.pythonhosted.org/packages/24/c6/7da8089e954f22eb0b8e93b38124de4db5a2292efbec979a069b761bf201/electricity_data_fetching_tr-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2e72919c8ef112019a97a6481ebec64673f136a1a79772eb88b30bf6f29120aa",
"md5": "362662200dc3a2b6a3aed0c443b43f5e",
"sha256": "c655ad9b4487dd09ddec5a0247b1706407222af33bf313c73d8a00829dbf4d16"
},
"downloads": -1,
"filename": "electricity_data_fetching_tr-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "362662200dc3a2b6a3aed0c443b43f5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21969,
"upload_time": "2024-06-29T19:33:08",
"upload_time_iso_8601": "2024-06-29T19:33:08.994697Z",
"url": "https://files.pythonhosted.org/packages/2e/72/919c8ef112019a97a6481ebec64673f136a1a79772eb88b30bf6f29120aa/electricity_data_fetching_tr-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-29 19:33:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rojenarda",
"github_project": "electricity_data_fetching_tr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "forex-python",
"specs": []
},
{
"name": "workalendar",
"specs": []
}
],
"lcname": "electricity-data-fetching-tr"
}