Skip to content

Commit

Permalink
Fix reporting
Browse files Browse the repository at this point in the history
Add link ot dashboard
  • Loading branch information
romainsacchi committed Sep 30, 2023
1 parent 0d0e593 commit 9b96b09
Show file tree
Hide file tree
Showing 7 changed files with 33,974 additions and 84 deletions.
2 changes: 1 addition & 1 deletion dev/Untitled.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion dev/Untitled1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
33 changes: 0 additions & 33 deletions dev/Untitled2.ipynb

This file was deleted.

34,007 changes: 33,962 additions & 45 deletions dev/test_premise.ipynb

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ Provided a decryption key (ask the maintainers_), the following IAM scenarios ar

CarbonBrief_ wrote a good article explaining the meaning of the SSP/RCP system.

Additionally, we provided a summary of the main characteristics of each scenario in a spreadsheet_.

.. _spreadsheet: https://github.com/polca/premise/raw/master/docs/scenario_report_2023-05-02.xlsx
Additionally, we provided a summary of the main characteristics of each scenario `here <https://premisedash-6f5a0259c487.herokuapp.com/>`_.


.. _CarbonBrief: https://www.carbonbrief.org/explainer-how-shared-socioeconomic-pathways-explore-future-climate-change
Expand Down
8 changes: 8 additions & 0 deletions premise/data_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,14 @@ def __get_iam_data(

dataframe = dataframe.rename(columns={"variable": "variables"})

# make a list of headers that are integer

headers = [x for x in dataframe.columns if isinstance(x, int)]

# convert the values in these columns to numeric
dataframe[headers] = dataframe[headers].apply(pd.to_numeric, errors="coerce")


array = (
dataframe.melt(
id_vars=["region", "variables", "unit"],
Expand Down
2 changes: 1 addition & 1 deletion premise/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def generate_summary_report(scenarios: list, filename: Path) -> None:
if scenario_idx > 0:
col = last_col_used + metadata[sector]["offset"]

row += 2
row = 3

worksheet.cell(
column=col,
Expand Down

0 comments on commit 9b96b09

Please sign in to comment.