Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e716a8

Browse files
authoredAug 3, 2022
Merge pull request #283 from openego/features/#276-improve-simple-example
Features/#276 improve simple example
2 parents fc985af + 287a96a commit 5e716a8

File tree

125 files changed

+20518
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+20518
-651
lines changed
 

‎doc/whatsnew/v0-2-0.rst

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ Changes
2828
standing times, charging demand, etc. per vehicle, whereas TracBEV provides potential charging point locations)
2929
`#174 <https://github.com/openego/eDisGo/issues/174>`_ and
3030
`#191 <https://github.com/openego/eDisGo/pull/191>`_
31-

‎edisgo/edisgo.py

+30
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,36 @@ def check_integrity(self):
20372037

20382038
logging.info("Integrity check finished. Please pay attention to warnings.")
20392039

2040+
def resample_timeseries(self, method: str = "ffill", freq: str = "15min"):
2041+
"""
2042+
Returns timeseries resampled from hourly resolution to 15 minute resolution.
2043+
2044+
Parameters
2045+
----------
2046+
method : str, optional
2047+
Method to choose from to fill missing values when upsampling. Possible
2048+
options are:
2049+
2050+
* 'ffill': propagate last valid observation forward to next valid
2051+
observation. See
2052+
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.ffill.html
2053+
'ffill' is the Default.
2054+
2055+
* 'bfill': use next valid observation to fill gap. See
2056+
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.bfill.html
2057+
2058+
* 'interpolate': Fill NaN values using an interpolation method. See
2059+
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.interpolate.html
2060+
2061+
freq : str, optional
2062+
Frequency that timeseries is resampled to. Can be any frequency up to one
2063+
hour. Offset aliases can be found here:
2064+
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
2065+
15 minutes is the default.
2066+
2067+
"""
2068+
self.timeseries.resample_timeseries(method=method, freq=freq)
2069+
20402070

20412071
def import_edisgo_from_pickle(filename, path=""):
20422072
abs_path = os.path.abspath(path)

0 commit comments

Comments
 (0)
Please sign in to comment.