Skip to content

Commit

Permalink
Clean-up of the docs (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Aug 11, 2023
1 parent c902b2c commit 3d02f8d
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ When importing an xlsx file created with pyam < 2.0, which has an "exclude" colu

- [#763](https://github.com/IAMconsortium/pyam/pull/763) Implement a fix against carrying over unused levels when initializing from an indexed pandas object
- [#759](https://github.com/IAMconsortium/pyam/pull/759) Excise "exclude" column from meta and add a own attribute
- [#747](https://github.com/IAMconsortium/pyam/pull/747) Drop support for Python 3.7 #747
- [#747](https://github.com/IAMconsortium/pyam/pull/747) Drop support for Python 3.7

# Release v1.9.0

Expand Down
2 changes: 1 addition & 1 deletion docs/R_tutorials/pyam_R_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
"## Query data from an IIASA data resource\n",
"\n",
"The IIASA *Energy, Climate, and Environment* Program hosts a suite of **Scenario Explorer** instances and related infrastructure to support analysis of integrated-assessment pathways in IPCC reports and model comparison projects. \n",
"High-profile use cases include the [IAMC 1.5°C Scenario Explorer hosted by IIASA](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer) supporting the *IPCC Special Report on Global Warming of 1.5°C* (SR15) and the Horizon 2020 project [CD-LINKS](https://data.ene.iiasa.ac.at/cd-links).\n",
"High-profile use cases include the [IAMC 1.5°C Scenario Explorer hosted by IIASA](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer) supporting the *IPCC Special Report on Global Warming of 1.5°C* (SR15) and the Horizon 2020 project [CD-LINKS](https://data.ece.iiasa.ac.at/cd-links).\n",
"\n",
"The **pyam** package can retrieve scenario data directly from any **Scenario Explorer** database instance\n",
"hosted by IIASA for use in your processing and analysis workflows."
Expand Down
2 changes: 1 addition & 1 deletion docs/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ of any scenario data provided in this format.
.. figure:: _static/iamc_template.png

Illustrative example of IAMC-format timeseries data |br|
via the `IAMC 1.5°C Scenario Explorer`_ (:cite:`Huppmann:2019:scenario-data`)
via the `IAMC 1.5°C Scenario Explorer`_

.. _`IAMC 1.5°C Scenario Explorer`: https://data.ece.iiasa.ac.at/iamc-1.5c-explorer

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/plot_sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#
# .. _SR15: http://ipcc.ch/sr15/
#
# .. _`IAMC 1.5°C Scenario Explorer and Data hosted by IIASA` : https://data.ene.iiasa.ac.at/iamc-1.5c-explorer
# .. _`IAMC 1.5°C Scenario Explorer and Data hosted by IIASA` : https://data.ece.iiasa.ac.at/iamc-1.5c-explorer
#
# .. _License : https://data.ene.iiasa.ac.at/iamc-1.5c-explorer/#/license
# .. _License : https://data.ece.iiasa.ac.at/iamc-1.5c-explorer/#/license
#
# If you haven't cloned the **pyam** GitHub repository to your machine,
# you can download the data file from
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ a timeseries format for *yearly data* developed and used by the
.. figure:: _static/iamc_template.png

Illustrative example of IAMC-format timeseries data |br|
via the `IAMC 1.5°C Scenario Explorer`_ (:cite:`Huppmann:2019:scenario-data`)
via the `IAMC 1.5°C Scenario Explorer`_

.. _`IAMC 1.5°C Scenario Explorer`: https://data.ene.iiasa.ac.at/iamc-1.5c-explorer
.. _`IAMC 1.5°C Scenario Explorer`: https://data.ece.iiasa.ac.at/iamc-1.5c-explorer

Subannual time resolution
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/iiasa_dbs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# Read directly from IIASA data resources\n",
"\n",
"The IIASA *Energy, Climate, and Environment* Program hosts a suite of **Scenario Explorer** instances and related infrastructure to support analysis of integrated-assessment pathways in IPCC reports and model comparison projects. \n",
"High-profile use cases include the [IAMC 1.5°C Scenario Explorer hosted by IIASA](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer) supporting the *IPCC Special Report on Global Warming of 1.5°C* (SR15) and the Horizon 2020 project [CD-LINKS](https://data.ene.iiasa.ac.at/cd-links).\n",
"High-profile use cases include the [IAMC 1.5°C Scenario Explorer hosted by IIASA](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer) supporting the *IPCC Special Report on Global Warming of 1.5°C* (SR15) and the Horizon 2020 project [CD-LINKS](https://data.ece.iiasa.ac.at/cd-links).\n",
"\n",
"IIASA's [modeling platform infrastructure](http://software.ene.iiasa.ac.at/ixmp-server) and the Scenario Explorer UI is not only a great resource on its own, but it also allows the underlying datasets to be directly queried.\n",
"**pyam** takes advantage of this ability to allow you to easily pull data and work with it in your Python data processing and analysis workflow."
Expand Down Expand Up @@ -61,7 +61,7 @@
"metadata": {},
"source": [
"In this example, we will be retrieving data from the *IAMC 1.5°C Scenario Explorer hosted by IIASA*\n",
"([link](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer)),\n",
"([link](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer)),\n",
"which provides the quantitative scenario ensemble underpinning\n",
"the *IPCC Special Report on Global Warming of 1.5C* (SR15).\n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/pyam_first_steps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"\n",
"The timeseries data used in this tutorial is a partial snapshot of the scenario ensemble\n",
"compiled for the IPCC's *Special Report on Global Warming of 1.5°C* ([SR15](http://ipcc.ch/sr15/)).\n",
"The complete scenario ensemble data is publicly available from the [IAMC 1.5°C Scenario Explorer and Data hosted by IIASA](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer). \n",
"The complete scenario ensemble data is publicly available from the [IAMC 1.5°C Scenario Explorer and Data hosted by IIASA](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer). \n",
"\n",
"Please read the [License](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer/#/license) page of the IAMC 1.5°C Scenario Explorer before using the full scenario data for scientific analysis or other work.\n",
"Please read the [License](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer/#/license) page of the IAMC 1.5°C Scenario Explorer before using the full scenario data for scientific analysis or other work.\n",
"\n",
"<img style=\"float: right; margin: 10px;\" src=\"_static/cdlinks_logo.png\">\n",
"\n",
Expand All @@ -61,7 +61,7 @@
" - the \"Faster Transition Scenario\" from the IEA's [World Energy Outlook 2017](https://www.oecd-ilibrary.org/energy/world-energy-outlook-2017_weo-2017-en),\n",
" - the \"1.0\" scenario submitted by the GENeSYS-MOD team ([Löffler et al., 2017](https://doi.org/10.3390/en10101468))\n",
"\n",
"Please refer to the [About](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer/#/about) page of the *IAMC 1.5°C Scenario Explorer* for references and additional information.\n",
"Please refer to the [About](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer/#/about) page of the *IAMC 1.5°C Scenario Explorer* for references and additional information.\n",
"\n",
"<div class=\"alert alert-warning\">\n",
"\n",
Expand All @@ -75,7 +75,7 @@
"> D. Huppmann, E. Kriegler, V. Krey, K. Riahi, J. Rogelj, K. Calvin, F. Humpenoeder, A. Popp, S. K. Rose, J. Weyant, et al. \n",
"> *IAMC 1.5°C Scenario Explorer and Data hosted by IIASA* (release 2.0) \n",
"> Integrated Assessment Modeling Consortium & International Institute for Applied Systems Analysis, 2019. \n",
"> doi: [10.5281/zenodo.3363345](https://doi.org/10.5281/zenodo.3363345) | url: [data.ene.iiasa.ac.at/iamc-1.5c-explorer](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer)\n",
"> doi: [10.5281/zenodo.3363345](https://doi.org/10.5281/zenodo.3363345) | url: [data.ece.iiasa.ac.at/iamc-1.5c-explorer](https://data.ece.iiasa.ac.at/iamc-1.5c-explorer)\n",
"\n",
"***"
]
Expand Down
37 changes: 18 additions & 19 deletions pyam/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,18 +615,17 @@ def pivot_table(
Parameters
----------
index : str or list of str
rows for Pivot table
Rows for Pivot table
columns : str or list of str
columns for Pivot table
values : str, default 'value'
dataframe column to aggregate or count
aggfunc : str or function, default 'count'
function used for aggregation,
accepts 'count', 'mean', and 'sum'
fill_value : scalar, default None
value to replace missing values with
style : str, default None
output style for pivot table formatting
Columns for Pivot table
values : str, optional
Dataframe column to aggregate or count
aggfunc : str or function, optional
Function used for aggregation, accepts 'count', 'mean', and 'sum'
fill_value : scalar, optional
Value to replace missing values
style : str, optional
Output style for pivot table formatting,
accepts 'highlight_not_max', 'heatmap'
"""
index = [index] if isstr(index) else index
Expand Down Expand Up @@ -768,7 +767,7 @@ def as_pandas(self, meta_cols=True):
Parameters
----------
meta_cols : list, default None
meta_cols : list, optional
join `data` with all `meta` columns if True (default)
or only with columns in list, or return copy of `data` if False
"""
Expand Down Expand Up @@ -1449,7 +1448,7 @@ def check_aggregate(
----------
variable : str or list of str
Variable(s) checked for matching aggregation of sub-categories.
components : list of str, default None
components : list of str, optional
List of variables to aggregate, defaults to sub-categories of `variable`.
method : func or str, optional
Method to use for aggregation,
Expand Down Expand Up @@ -2865,15 +2864,15 @@ def filter_by_meta(data, df, join_meta=False, **kwargs):
Parameters
----------
data : pandas.DataFrame
:class:`pandas.DataFrame` to which meta columns are to be joined,
data : :class:`pandas.DataFrame`
Data to which meta columns are to be joined,
index or columns must include `['model', 'scenario']`
df : IamDataFrame
df : :class:`IamDataFrame`
IamDataFrame from which meta columns are filtered and joined (optional)
join_meta : bool, default False
join_meta : bool, optional
join selected columns from `df.meta` on `data`
kwargs
meta columns to be filtered/joined, where `col=...` applies filters
Meta columns to be filtered/joined, where `col=...` applies filters
with the given arguments (using :meth:`utils.pattern_match`).
Using `col=None` joins the column without filtering (setting col
to nan if `(model, scenario)` not in `df.meta.index`)
Expand Down Expand Up @@ -2923,7 +2922,7 @@ def compare(
----------
left, right : IamDataFrames
two :class:`IamDataFrame` instances to be compared
left_label, right_label : str, default `left`, `right`
left_label, right_label : str, optional
column names of the returned :class:`pandas.DataFrame`
drop_close : bool, optional
remove all data where `left` and `right` are close
Expand Down
4 changes: 2 additions & 2 deletions pyam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ def find_depth(data, s="", level=None):
IAMC-style variables
s : str, default ''
remove leading `s` from any variable in `data`
level : int or str, default None
if None, return depth (number of ``|``); else, return list of booleans
level : int or str, optional
If None, return depth (number of ``|``); else, return list of booleans
whether depth satisfies the condition (equality if level is int,
>= if ``.+``, <= if ``.-``)
"""
Expand Down

0 comments on commit 3d02f8d

Please sign in to comment.