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

Improve reporting tutorial based on 2019-10-04 feedback #239

Closed
khaeru opened this issue Oct 4, 2019 · 5 comments · Fixed by #628
Closed

Improve reporting tutorial based on 2019-10-04 feedback #239

khaeru opened this issue Oct 4, 2019 · 5 comments · Fixed by #628
Assignees
Labels
docs Documentation
Milestone

Comments

@khaeru
Copy link
Member

khaeru commented Oct 4, 2019

During the 2–4 October 2019 workshop, we identified some issues with the westeros_reporting.ipynb tutorial:

  • For the moment, this tutorial requires installing the master branch of both ixmp and the message_ix; the tutorial should provide or refer to instructions on how to do this. as of 2021-05-24, no longer necessary.
  • messageix-dl does not download the tutorials from the master branch in some cases. fixed in Adjust to use ixmp.config and .cli #256.
  • The [reporting] extra dependencies (i.e. pyam-iamc) must also be installed in order to run the tutorial.
  • Some typos.

Please leave a comment with any additional issues.

@jkikstra
Copy link
Contributor

jkikstra commented Oct 8, 2019

EDIT: this was caused by also having a 0.2.0 version of ixmp installed (which apparently does not have check_keys), which was then being called, rather than the master version. Removing the ixmp package folders and reinstalling by pip install --editable . solves the issue.


After installing ixmp and subsequently message_ix and pyam (see IAMconsortium/pyam#259) from source, I ran into the following issue with westeros_reporting.pynb:

AttributeError                            Traceback (most recent call last)
<ipython-input-12-20b6f6717002> in <module>
      1 # Create a reporter from the existing Scenario
----> 2 rep = Reporter.from_scenario(scen)
      3 
      4 # Reporter uses the Python pint to handle units. '-', used in the Westeros
      5 # tutorial, is not a defined SI unit. We tell the Reporter to replace it with

~\AppData\Local\Continuum\anaconda3\lib\site-packages\message_ix\reporting\__init__.py in from_scenario(cls, scenario, **kwargs)
    144             key += ':pyam'
    145             try:
--> 146                 rep.as_pyam(qty, year_dim, key, collapse=collapse_cb)
    147             except KeyError as e:
    148                 log.info(f'{e.args[0]} not in scenario → not adding {key}')

~\AppData\Local\Continuum\anaconda3\lib\site-packages\message_ix\reporting\__init__.py in as_pyam(self, quantities, year_time_dim, key, drop, collapse)
    195         if isinstance(quantities, (str, Key)):
    196             quantities = [quantities]
--> 197         quantities = self.check_keys(*quantities)
    198 
    199         keys = []

AttributeError: 'Reporter' object has no attribute 'check_keys' ```

@jkikstra
Copy link
Contributor

jkikstra commented Oct 8, 2019

Near the end of the westeros_reporting.ipynb tutorial, the plotnine package is imported, however this does not automatically get installed with Anaconda, hence the user needs to first install it before being able to run the last plotting part.

So I would suggest to add a line about doing pip install plotnine

@khaeru
Copy link
Member Author

khaeru commented Jan 14, 2021

Postponed to v3.3 (or later).

@khaeru khaeru modified the milestones: 3.2, 3.3 Jan 14, 2021
@khaeru khaeru self-assigned this May 24, 2021
@khaeru
Copy link
Member Author

khaeru commented May 27, 2021

Postponed 'til after 3.3. Some of the items have already been resolved, as noted in the description above.

@khaeru khaeru modified the milestones: 3.3, 3.4 May 27, 2021
@khaeru khaeru modified the milestones: 3.4, 3.5 Jan 11, 2022
@khaeru khaeru modified the milestones: 3.5, 3.6 Apr 25, 2022
@khaeru
Copy link
Member Author

khaeru commented Apr 25, 2022

Postponed, as no time to complete this week.

khaeru added a commit that referenced this issue Jul 18, 2022
khaeru added a commit that referenced this issue Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants