Skip to content

Enable scenario ordering for diff plots #93

@jayfuhrman

Description

@jayfuhrman

I am able to use factor() to set the scenario or chart order successfully with regular plots. However, the diff plots default to alphabetical order, and when I attempt to use factor() to set the order explicitly, I get the following error:

prim_en_map <- prim_en_map %>%
+     mutate(scenario = factor(scenario, levels = c("2015 primary energy","GCAM-core","dynamic CCS","growth rate constraints")))
> rmap::map(data=prim_en_map,
+           folder = dir,
+           palette = "pal_hot",
+           scenRef = "2015 primary energy",
+           paletteDiff = 'pal_div_RdBl',
+           scenDiff = c("GCAM-core","dynamic CCS","growth rate constraints"),
+           ncol=1,
+           diffOnly=T,
+           title = 'Difference in 2050 Fossil Primary Energy Fraction relative to 2015') -> b
Starting map...
scenRef chosen: 2015 primary energy is not in any of the available scenarios:
3, 1, 2, 4
Setting scenRef to first scenario: 3.
None of the scenDiff are in any of the available scenarios:
1, 2, 4
Skipping Diff.
map run completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions