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

Update sample network analysis notebook #96

Merged

Conversation

mt7180
Copy link
Contributor

@mt7180 mt7180 commented Nov 26, 2024

With this PR the sample_network_analysis.ipynb notebook is updated.

Changes made:

  • fix plot for hourly dispatch in sample_network_analysis notebook (grid withdrawal and supply are balanced now)
  • add a link to the YouTube tutorial
  • remove old import: from _helpers import sets_path_to_root (raised an error)
  • resolve FutureWarning for .groupby() with axis=1
  • replace n.statistics._parent with just printing n (raises an AttributeError for newer versions of pypsa)

Closes #95

@mt7180
Copy link
Contributor Author

mt7180 commented Nov 27, 2024

Hi @ekatef, just adding this comment to let you know that I opened the discussed PR. Just let me know if there is anything to change/improve :)

@ekatef
Copy link
Member

ekatef commented Nov 27, 2024

Hi @ekatef, just adding this comment to let you know that I opened the discussed PR. Just let me know if there is anything to change/improve :)

Hello @mt7180, thanks a lot for the contribution! That is indeed a very needed improvement, and I love the implementation you have developed for the dispatch plot.

I wonder if you could please re-run the notebook from a "clean" state to make sure that all the results are consistent? I see that you have used a more memory-saving approach which has allowed to avoid changing the fragments which haven't been changed by this PR. However, it has lead to some inconsistencies in numbering cells which could be probably misleading for beginner users. Does it make sense for you?

As a little technical comment, it would be great to ensure that we are using same quotes everywhere (that is relevant in particular for the fragment dealing with the dispatch plot). I recognise that it has been inherited from the original implementation, but if you would be willing to improve it, that would be much appreciated!

Otherwise, looks great and basically ready to merge 😄

@mt7180
Copy link
Contributor Author

mt7180 commented Nov 27, 2024

Hello @ekatef, of course, you're absolutely right!
Thank you for your kind review :)

Additional changes in sample_network_analysis notebook:

  • made quotes consistent
  • all notebook cells have been re-run from top to bottom

@ekatef ekatef merged commit cff1059 into pypsa-meets-earth:main Nov 27, 2024
2 checks passed
@ekatef
Copy link
Member

ekatef commented Nov 27, 2024

Hello @ekatef, of course, you're absolutely right! Thank you for your kind review :)

Additional changes in sample_network_analysis notebook:

  • made quotes consistent
  • all notebook cells have been re-run from top to bottom

Awesome, thank you so much! Merged 😄
Congratulations with getting done an amazing contribution! 🎉 🎉 🎉

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.

fix plot for hourly dispatch in sample_network_analysis notebook
2 participants