-
Notifications
You must be signed in to change notification settings - Fork 28
What's New
November 16, 2017
There's a new helper function available, gather_years(value_col = "value"), that handles gathering (reshaping) year columns and coercing the resulting year column to be integer. So instead of
gather(year, value, matches(YEAR_PATTERN)) %>%
mutate(year = as.integer(year))you can simply write
gather_years %>%If the value column needs another name, do gather_years("coefficient") for example.
November 13, 2017
The driver now enforces that all year columns in data objects must be numeric. A warning is issued if not.
September 24, 2017
The oldnew test now verifies that the GCAM_DATA_MAP object, a new internal data object encapsulated with the gcamdata package, is up-to-date, i.e. that it reflects the current dependency structure of the package. (More detail can be found in PR 751.) This is only tested on Travis. So if your PR passes all tests on your machine, but fails oldnew on Travis, you probably need to re-run data-raw/generate-package-data.R, which will automatically update and save GCAM_DATA_MAP.
We now have a gcamusa.STATES definition in constants.R. Please use when comparing/testing states.
September 19, 2017
Note that dplyr 0.7 has a number of different behaviors than the 0.5 version we've been using. One example: select has gotten more flexible, so instead of having to write select(one_of(c("x", "y"))) you can simply write select("x", "y"). (See https://github.com/JGCRI/gcamdata/issues/745.)
HOWEVER following the principle of not switching horses midstream, please continue to use the 0.5 syntax for now, which also runs fine under v0.7.
May 15, 2017
New "Hints for Speed" wiki page: https://github.com/JGCRI/gcamdata/wiki/Hints-for-speed
April 21, 2017
A new get_water_inputs_for_mapping function is available for all water-related code chunks (now named set_water_input_name). Use in a pipeline by
x %>% mutate(y = set_water_input_name(water_sector, water_type, water_mapping, GLU)) # GLU is optionalApril 14, 2017
We have a new gdp_deflator(year, base_year) function that replaces all the conv_xxxx_xxxx_USD constants for dollar conversions. See https://github.com/JGCRI/gcamdata/issues/243.
April 5, 2017
New information on using temporary 'data injection' data: https://github.com/JGCRI/gcamdata/wiki/Chunk-Inputs-and-Globals.
April 3, 2017
New pipeline helper functions: change_iso_code and standardize_iso.
March 31, 2017
We have a new function repeat_add_vector that should be used in place of repeat_and_add_vector in the original data system.
April 14, 2017 - repeat_add_columns is now the function for repeat_and_add_vector. See name that function for more information.
The DSR function left_join_error_no_match should be used if you want to look up data in b based on data in a, and there should be exactly one match for each entry in a.
March 29, 2017
We now have a wiki page describing how to handle common function calls (both R and data system specific). Please edit as you hit new ones: https://github.com/JGCRI/gcamdata/wiki/Name-That-Function.
March 27, 2017
All output data has been added to the OLD data system, making it easier to run those scripts. Please pull ("Sync" in GitHub Desktop) your local repository.
Make sure (packageVersion("roxygen2")) your roxygen2 package is updated to version 6.0.1.