CSV table multiplication in python
Budget: €8 – €30 EUR
Target is to generate a CSV table of scenarios with annual production and income for 30 years for each scenario.
*** Input ***
As input for all scenarios:
- 2023-02-28_el_pricing_30years.csv
This file contains:
hourly data sets for 30 years consisting of
timestamp
hour spot price [øre/kWh]
degradation factor
in the subfolder "h", there is an examplary selection of files showing the result of the initial production. These have all the same format. The number of files can vary. Each file represents one scenario.
These files contain hourly data sets for one year. The production is shown in column 6 "Yf" in "kWh/kWp/day".
*** Output ***
The function required shall generate a CSV file with a table, containing one row (one data set) for each file in the subdirectory "h" with:
scenarioID;data_type;year01;year02; <year..>
where
- scenarioID is the filename in the "h" directory
- datatype is "production [kWh/kWp/year]" or "income [€/kWp/year]"
- the following columns contain the annual productions for each year
- the income shall be shown in €/MWh
- the conversion factor between øre and € shall be 1€ = 745øre. It shall be hard coded as a variable in the beginning of the code.
*** functionality ***
for each hour of the 2023-02-28_el_pricing_30years.csv, the production "Yf" of the related hour in the scenario shall be multiplied with the "degradation factor". This will result in the production figures for the output. Multiplying these values with the "hour spot price" will result in the income. All this needs to be done taking conversion factors for currency and production units into account.
The resulting table of 8760*30 data sets (in case of a 30 year period) shall then be summed up to annual values that are then written to the output table in one column each. See "2023-02-28_example_output.csv" as example.
The pricing file and the directory with scenarios shall be configurable on the command line. default values shall be hard coded in the beginning of the script.
*** Input ***
As input for all scenarios:
- 2023-02-28_el_pricing_30years.csv
This file contains:
hourly data sets for 30 years consisting of
timestamp
hour spot price [øre/kWh]
degradation factor
in the subfolder "h", there is an examplary selection of files showing the result of the initial production. These have all the same format. The number of files can vary. Each file represents one scenario.
These files contain hourly data sets for one year. The production is shown in column 6 "Yf" in "kWh/kWp/day".
*** Output ***
The function required shall generate a CSV file with a table, containing one row (one data set) for each file in the subdirectory "h" with:
scenarioID;data_type;year01;year02; <year..>
where
- scenarioID is the filename in the "h" directory
- datatype is "production [kWh/kWp/year]" or "income [€/kWp/year]"
- the following columns contain the annual productions for each year
- the income shall be shown in €/MWh
- the conversion factor between øre and € shall be 1€ = 745øre. It shall be hard coded as a variable in the beginning of the code.
*** functionality ***
for each hour of the 2023-02-28_el_pricing_30years.csv, the production "Yf" of the related hour in the scenario shall be multiplied with the "degradation factor". This will result in the production figures for the output. Multiplying these values with the "hour spot price" will result in the income. All this needs to be done taking conversion factors for currency and production units into account.
The resulting table of 8760*30 data sets (in case of a 30 year period) shall then be summed up to annual values that are then written to the output table in one column each. See "2023-02-28_example_output.csv" as example.
The pricing file and the directory with scenarios shall be configurable on the command line. default values shall be hard coded in the beginning of the script.