Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change output format of queries with 'curve' as type #27

Open
mabijkerk opened this issue Apr 25, 2023 · 1 comment
Open

Change output format of queries with 'curve' as type #27

mabijkerk opened this issue Apr 25, 2023 · 1 comment
Assignees

Comments

@mabijkerk
Copy link
Member

If the scenario tools are run for a scenario to obtain query results, using pipenv run scenario_from-csv query_only local, the output looks like this:

,test_scen,nl2019_present,unit
query_1,query_1_value_future,query_1_value_present,query_1_unit,
query_2,query_2_value_future,query_2_value_present,query_2_unit,
...
query_n,query_n_value_future,query_n_value_present,query_n_unit

When the query type is a curve however, the entire curve is pasted as a list in the output:

,test_scen,nl2019_present,unit
hourly_co2_intensity_of_electricity_production,"[412.94503653494974, 411.78823033221573,...,489.87239458403224]",[],

Retrieving the query results then becomes a hassle, as you have to process two types of output within a single output CSV. To improve this, we can separate the output into two files. One CSV file that shows query results for queries with the type 'value' and another for the type 'curve'. The 'curve' type output may look like this:

query_1_future_curve,value_hour_1,value_hour_2,...,value_hour_8760,
query_2_future_curve,value_hour_1,value_hour_2,...,value_hour_8760

@redekok what do you think about this format suggestion?

@redekok
Copy link
Contributor

redekok commented May 1, 2023

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants