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

Add plotting and summary features #211

Merged
merged 10 commits into from
Dec 29, 2021
Merged

Add plotting and summary features #211

merged 10 commits into from
Dec 29, 2021

Conversation

davide-f
Copy link
Member

This branch enables the use of plot_network and make_summary features:

  • plot_network: enables plotting the nominal power of the generation assets [p_nom attribute]
  • make_summary: creates csv fles and useful statistics for the results

Other than plot_network and make_summary rules, the following rules have also been introduced:

  • plot_all_p_nom: generates the plots for all countries and extensions in formats pdf and png
  • make_country_summaries: automatically generates summaries for each country
  • make_all_summaries: generates summary for the countries as a whole (the aggregation of the countries)

@davide-f
Copy link
Member Author

@pz-max any comments? otherwise I merge (first this then the restyler)
As a little comment, now we have rules make_all_summaries and make_all_country_summaries, one focusing on all countries as a whole and the latter that iterate on all countries; we may merge them, however, for the case NG+BJ it leads to errors due to missing values, this shall be adjusted.

@pz-max
Copy link
Member

pz-max commented Dec 29, 2021

Hi Davide,
If you merge the restyler to this PR then the restyle PR will be closed anyways (maybe less git history?)
You can do this as it is suggested at the Restyler PR (212) by simply typing this in the console of your current #211 PR

git remote add upstream https://github.com/pypsa-meets-africa/pypsa-africa.git
git fetch upstream pull/<PR number of Restyler>/head                   
git merge --ff-only FETCH_HEAD
git push

@davide-f davide-f merged commit 3d30293 into pypsa-meets-earth:main Dec 29, 2021
@pz-max
Copy link
Member

pz-max commented Dec 29, 2021

@pz-max any comments? otherwise I merge (first this then the restyler) As a little comment, now we have rules make_all_summaries and make_all_country_summaries, one focusing on all countries as a whole and the latter that iterate on all countries; we may merge them, however, for the case NG+BJ it leads to errors due to missing values, this shall be adjusted.

I know that some stuff was previously breaking with plot and summaries. Hope you tested it a bit :)
Some of the PyPSA-Eur-Sec colleagues were also mentioning that the sector coupled plotting library is more updated. Maybe good to add and adjust some of their features that they work here as well. Do you want to create an issue?

@davide-f
Copy link
Member Author

Yes, obviously I tested it and on the NG+BJ plot worked and make_summary as well, with the exception of BJ. In fact, there is the need to improve it, however, the problems on BJ may be due to problems inherited by he workflow. However, when no data are available no error shall be generated, rather zeros shall be shown. I add an issue

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

Successfully merging this pull request may close these issues.

None yet

2 participants