chart_annual_by | R Documentation |
Please don't use in production code yet! Thank you! The pollutant-faceting feature of chart_annual_emissions_by()
, in particular, may change.
chart_annual_quantities_by()
is the workhorse function. It will
auto-detect the first variable in data
that ends with _qty
, unless you
supply an explicit qty_var
. It relies on a default scale_x_annual()
,
which you can tweak by supplying year_breaks
, year_limits
, and/or
year_expand
. You can use it to chart arbitrary annual quantities, like
cf_qty
(control factors), ef_qty
(emission factors), or fee_qty
(fees).
chart_annual_emissions_by()
is a specialized variant. It expects to
find ems_qty
and ems_unit
in data
. It relies on scale_y_emissions()
for the y-axis, and displays both quantities and units in flagged values. It
also facets the resulting chart by pollutant, relying on pol_abbr
by
default.
chart_annual_throughputs_by(...)
tries to avoid double-counting. If
there are variables beginning with pol_
or ems_
in your data, it will
first issue a warning. Then, it will try to replace data
with something
very much like distinct(data, year, ..., tput_qty, tput_unit)
.
chart_annual_growth_by()
is a specialized variant. Like
chart_annual_quantities_by()
, it will try to find a variable ending with
_qty
in your data
, unless you supply an explicit qty_var
. It relies on
scale_y_percentage()
for the y-axis, and formats flagged values using
format_percent_change()
.
chart_annual_control_factors_by(data, ...) chart_annual_emission_factors_by(data, ...) chart_annual_emissions_by(data, ...) chart_annual_growth_by(data, ..., base_year) chart_annual_quantities_by(data, ...) chart_annual_throughputs_by(data, ...)
data |
tabular, with a column |
... |
variables to chart by. Must be present in |
geom |
"line", "point", "col", or "area" |
year_limits |
like |
year_breaks |
like |
year_expand |
see |
flag_years |
if provided, will display actual values at these years. |
flag_labels |
controls the information displayed in flags. See
|
base_year |
required for |
title |
passed to |
subtitle |
passed to |
caption |
passed to |
verbose |
display messages |
chart_annual_control_factors_by()
: Chart annual control factors.
chart_annual_emission_factors_by()
: Chart annual emission factors.
chart_annual_emissions_by()
: Chart annual emissions.
chart_annual_growth_by()
: Chart annual growth, relative to some base year.
chart_annual_quantities_by()
: Chart an arbitrary annual quantity.
chart_annual_throughputs_by()
: Chart annual throughputs.
In chart_annual_growth_by()
, base_year
serves to index the reference year for normalization.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.