EnergyEconomyDecoupling / PFUPipeline

Primary, Final, and Useful energy and exergy for 1960-2019
https://energyeconomydecoupling.github.io/PFUPipeline/
Other
3 stars 0 forks source link

Number of rows in FU Allocations template #1

Closed ZekeMarshall closed 4 years ago

ZekeMarshall commented 4 years ago

Hi Matt,

When mapping 'Machine' and 'Eu.product' combinations to each 'Destination' and 'Ef.product' combination in a FU Allocations template there are often more than 3 rows required. For large templates manually adding these additional rows can be quite time-cosuming depending on the number of additional rows required.

Would you be able to add the ability to generate a template with any desired number of rows per 'Destination' and 'Ef.product' combination when calling the 'generate_fu_allocation_template' function in the Drake workflow?

Many thanks,

Zeke

MatthewHeun commented 4 years ago

What would you like the default number of rows to be?

ZekeMarshall commented 4 years ago

Hi Matt,

Four seems like a good balance!

Thanks again,

Zeke

MatthewHeun commented 4 years ago

The function generate_fu_allocation_template() now has an argument named n_allocation_rows with a default value of 4. The value of this argument is passed to IEATools::fu_allocation_template(). Users can pull a fresh copy of this repository to get the new version of the generate_fu_allocation_template () function. Be sure to source init.R to use the new version of the function.

As an aside, I also changed the default value for n_allocation_rows to 4 for IEATools::fu_allocation_template(), which will be available at the next release of IEATools. But users of the PFU-Databse repo don't need to wait for a new version of IEATools to get the new functionality.