diff --git a/README.md b/README.md index 28459cf..7ba9c52 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Please navigate to the section of interest to find out more. * [License](#license) ## Introduction -*POMMES* itself is a cosmos consisting of a **dispatch model**, a **data preparation routine** (stored in this repository and described here) and an **investment model** for the German wholesale power market. The model was originally developed by a group of researchers and students at the [chair of Energy and Resources Management of TU Berlin](https://www.er.tu-berlin.de/menue/home/) and is now maintained by a group of alumni and open for other contributions. +*POMMES* itself is a cosmos consisting of a [**dispatch model**](https://github.com/pommes-public/pommesdispatch/), a **data preparation routine** (stored in this repository and described here) and an [**investment model**](https://github.com/pommes-public/pommesinvest) for the German wholesale power market. The model was originally developed by a group of researchers and students at the [chair of Energy and Resources Management of TU Berlin](https://www.er.tu-berlin.de/menue/home/) and is now maintained by a group of alumni and open for other contributions. If you are interested in the actual dispatch or investment model, please find more information here: - [pommesdispatch](https://github.com/pommes-public/pommesdispatch): A bottom-up fundamental power market model for the German electricity sector @@ -23,8 +23,6 @@ If you are interested in the actual dispatch or investment model, please find mo ## Documentation The data preparation is mainly carried out in this **[jupyter notebook](https://github.com/pommes-public/pommesdata/blob/dev/pommesdata/data_preparation.ipynb)**. The data sources used as well as the calculation and transformation steps applied are described in a transparent manner. -In addition to that, there is a **[documentation of pommesdata](https://pommesdata.readthedocs.io/)** on readthedocs. -This in turn contains a documentation of the functions and classes used for data preparation. ## Installation and usage There are **two use cases** for using `pommesdata`: @@ -56,6 +54,20 @@ Activate your environment by typing conda activate pommes_data ``` +Create the result folder: + +`mkdir prepared_data` + +Download the when2heat.csv file from here: + +`wget -O raw_data_input/timeseries/when2heat.csv https://data.open-power-system-data.org/when2heat/2022-02-22/when2heat.csv` + +Switch to the pommesdata directory: + +`cd pommesdata` + +And execute the `data_preparation.ipynb` in jupyterlab or vscode with your newly created conda environment. + ## Contributing Every kind of contribution or feedback is warmly welcome.
We use the GitHub issue management as well as pull requests for collaboration. diff --git a/pommesdata/data_prep/tools.py b/pommesdata/data_prep/tools.py index 2356c36..455baa1 100644 --- a/pommesdata/data_prep/tools.py +++ b/pommesdata/data_prep/tools.py @@ -291,7 +291,7 @@ def load_entsoe_generation_data( end="2017-12-31 23:45:00", freq="15min", ) - df = df.resample("H").mean() + df = df.resample("H").mean(numeric_only=True) elif len(df) == 8760 + 1: df.drop( @@ -344,7 +344,7 @@ def load_entsoe_german_generation_data( end=f"{year}-12-31 23:45:00", freq="15min", ) - generation = generation.resample("H").mean() + generation = generation.resample("H").mean(numeric_only=True) generation = generation[ [ diff --git a/pommesdata/data_preparation.ipynb b/pommesdata/data_preparation.ipynb index 8ebcf56..369d112 100644 --- a/pommesdata/data_preparation.ipynb +++ b/pommesdata/data_preparation.ipynb @@ -1225,7 +1225,7 @@ "conv_de_new.loc[:,['country_geographical', 'country']] = 'DE'\n", "conv_de_new['status'] = 'operating'\n", "conv_de_new['eeg'] = 'no'\n", - "conv_de_new['commissioned_last'] = conv_de_new['commissioned'].astype(int)" + "conv_de_new['commissioned_last'] = conv_de_new['commissioned'].fillna(0).astype(int)" ] }, {