Published January 24, 2023
| Version v0.1.39
Software
Open
MatthewHeun/Recca: v0.1.39
Creators
Description
Recca 0.1.39 (2023-01-24)
- Tests once again all passing on all test rigs of GitHub Actions. Tests had been failing due to new code that correctly detects unit errors (inhomogeneity) for some upstream swim calculations with services as the last stage in an ECC.
- Move tests associated with
verify_cols_missing()
from theRecca
package tomatsindf
. Those tests didn't belong inRecca
, becauseverify_cols_missing()
is no longer inRecca
. - Eliminated data frame rows for a couple tests
that were producing
NA
values due to unit inhomogeneity. - Switched to simpler formulas derived by MKH
for
new_R_ps()
. - Eliminated
tidyselect
warnings. write_ecc_to_excel()
now ensures that columns of U and rows of V are the same, even if it means adding zero columns to U or zero rows to V. This change makes further Excel calculations easier.chopR()
now checks for the ability to swim downstream with R_prime = R to re-create the original energy conversion chain, thereby bringing consistency withchopY()
. This approach identifies numerical precision errors before they cause a problem.chopR()
now usescalc_io_mats(direction = "downstream")
, thereby consistently usingcalc_io_mats()
for both upstream and downstream swims.calc_io_mats()
gains new argumentdirection
that tells whether the input-output matrices are for "upstream" or "downstream" swims.finaldemand_aggregates()
now produces true0
instead of a 1x1 matrix without row or column labels when no columns names of U_EIOU or Y matchfd_sectors
.- Fixed two bugs in
new_Y()
. There were compensatory formula errors that only appeared in some edge cases. - Aggregations are now optional (on by default)
in
chop_R()
andchop_Y()
. - Renamed
effects_aggregates()
andfootprint_aggregates()
tochop_R()
andchop_Y()
. - New function
effects_aggregates()
swims downstream from the R matrix to final demand for each column (energy carrier) in the R matrix and calculates primary and final demand aggregates. footprint_aggregates()
now checks that the chopped ECCs sum to the original ECC on every calculation.region_aggregates()
now correctly eliminates thefew_colname
when the incoming data frame has no rows.footprint_aggregates()
now also includes the*_prime_colname
matrices in the nested data frame.calc_io_mats()
andcalc_L()
gainmethod
andtol
arguments to control matrix inversion.calc_eta_pfd()
now includes columns of names of efficiencies in its output. This feature will assist pivoting on efficiencies later.- New function
footprint_aggregates()
calculates primary and final demand aggregates for each isolated row and column in Y. new_Y()
now also produced matrices U_feed, U_eiou, and r_eiou in its output.- W matrix no longer included in the output of
new_Y()
. W can always be calculated from V^T - U. - New function
write_ecc_to_excel()
stores ECCs in spatial format in Excel. All ECC matrices are written to the Excel file: R, U, V, Y, U_feed, U_eiou, r_eiou, and S_units. primary_aggregates()
andfinaldemand_aggregates()
no longer requirep_industries
andfd_sectors
to be present in the incoming list or data frame. Rather,p_industries
andfd_sectors
are treated as parameters that apply to all items in the incoming list or rows in the incoming data frame. This change brings consistency with other functions that usematsindf::matsindf_apply()
internally.- New function
group_aggregates()
that aggregates PSUT matrices according to an aggregation map. - New function
despecified_aggregates()
that aggregates PSUT matrices to a piece of row and column labels. - New argument
add_net_gross_cols
onprimary_aggregates()
that tells whether to add both net and gross primary energy columns. (Net and gross primary energy aggregate columns will contain identical values, but the presence of both net and gross columns may make it easier to mesh with results from thefinaldemand_aggregates()
function, which produces net and gross columns that are different.) aggregate_regions()
now returns an empty data frame with the expected columns if the input data frame has no rows.- Many new tests for new features.
- Now up to 672 tests, all passing.
- Test coverage remains at 100 %.
Files
MatthewHeun/Recca-v0.1.39.zip
Files
(10.8 MB)
Name | Size | Download all |
---|---|---|
md5:dc05adf2d382262c7ae604145b9fdb1d
|
10.8 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/MatthewHeun/Recca/tree/v0.1.39 (URL)