Commit 7e91527f authored by hazrmard's avatar hazrmard
Browse files

TODO about loading solar data by checking number of records per csv, instead...

TODO about loading solar data by checking number of records per csv, instead of just number of csv files
parent 4e7ae323
......@@ -104,6 +104,11 @@ def weeklysolardata(datafolder: str = './energyfreqanalysis/', weeks: int = 4):
Returns:
pandas.DataFrame -- Solar irradiance data in a dataframe
"""
# TODO: Instead of loading by weeks, check number of records loaded per file,
# then load additional csv files as needed. This is because main control loop
# aggregates by calendar week. So if the script was started on a sunday
# the controller would create a new file to store measurements for the week
# beginning on monday. The sunday data will belong to the earlier calandar week.
data_files = glob(os.path.join(datafolder, '*store.csv'))
flist = sorted(data_files, key=os.path.getctime, reverse=True)[:weeks]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment