diff --git a/DESCRIPTION b/DESCRIPTION index 30837da7f..48538a9a4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: gcamfaostat Type: Package Title: Prepare, process, and synthesize FAOSTAT data for global agroeconomic and multisector dynamic modeling -Version: 1.1 +Version: 1.0.0 Date: 2023-05-06 Authors@R: c(person("Xin", "Zhao", email = "xin.zhao@pnnl.gov", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-1801-4393")), person("Maksym", "Chepeliev", role = "aut"), diff --git a/README.md b/README.md index 4f4bbf1c4..42b4889b3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -[![codecov](https://codecov.io/gh/JGCRI/gcamdata/branch/main/graph/badge.svg)](https://codecov.io/gh/JGCRI/gcamdata) -![R-CMD](https://github.com/JGCRI/gcamdata/workflows/R-CMD/badge.svg) -![coverage-test](https://github.com/JGCRI/gcamdata/workflows/coverage-test/badge.svg) +# gcamfaostat +**gcamfaostat** is an R package to prepare, process, and synthesize FAOSTAT data for global agroeconomic and multisector dynamic modeling. The Food and Agriculture Organization Statistical Database ([FAOSTAT](https://www.fao.org/faostat/en/#data)) provdes open access data on country-level agricultural production, trade, food, nutrients, prices, land use, etc, servering as the most important data source for global agroeconomic and multisector dynamic models. **gcamfaostat** aims to shorten the distance between the FAOSTAT raw data to economic modeling. + +# gcamfaostat and gcamdata +**gcamfaostat** is built based on an existing R package, **[gcamdata](https://jgcri.github.io/gcamdata/index.html)**, which has similar functions to**gcamfaostat** though **gcamdata** includes broader aspects of data inputs and is designed for the global multisector dynamic model **GCAM**. **gcamfaostat** utilizes the robust, reproducible and transparent data processing systems built in **[gcamdata](https://github.com/JGCRI/gcam-core)**. The two packages are consistent, while **gcamfaostat** focuses on agroeconomic data processing and can provide input data for **gcamdata** (and thus GCAM) and other models that rely on FAOSTAT data. + -# gcamdata-faostat -Functions in this R package (**gcamdata-faostat**) download, clean, processe, connect, and visualize data from FAOSTAT for global economic and integrated assessment modeling. The package is built based on the existing gcamdata package structure for consistency, transparency, and traceability. The goals of this version are: (1) Check FAOSTAT data updates and download necessary datasets @@ -13,6 +14,45 @@ The goals of this version are: (3) Apply the new method of primary equivalent aggregation to aggregating FAO ~500 SUA (SCL) items to ~100 primary equivalent items in FAO Food Balance Sheet (FBS). (4) Compare the balanced data compiled using different methods and visualize the difference. +# User Guide +The package is documented in the [online manual](https://realxinzhao.github.io/gcamfaostat/index.html) + + +# Download and install: + +```r +install.packages("devtools") +devtools::install_github("realxinzhao/gcamfaostat") +``` +# Loading and run the gcamdata package + +Open the `gcamfaostat.Rproj` file in the `gcamfaostat` folder. RStudio should open the project. + +To load the `gcamdata` package, enter: + +```{r eval = FALSE} +devtools::load_all() +``` + +## Run the driver +There are two ways to run the driver: +1. +```{r eval = FALSE} +driver_drake() +``` +`driver_drake()` runs the driver and stores the outputs in a hidden cache. When you run `driver_drake()` again it will skip steps that are up-to-date. This is useful if you will be adjusting the data inputs and code and running the data system multiple times. For this reason, we almost always recommend using `driver_drake()`. More details can be found in the [vignette](https://jgcri.github.io/gcamdata/articles/driverdrake_vignette.html). + +2. +```{r eval = FALSE} +driver() +``` +See [the documentation](https://jgcri.github.io/gcamdata/reference/driver.html) for more options when running the driver, such as what outputs to generate or when to stop. + +## Output files + +Users can specify the output directory (`DIR_OUTPUT_CSV`) that stores the output csv files in `constants.R`. The default directory is `outputs/CSV`. The the file will be exported when `OUTPUT_Export_CSV == TRUE` (an option in `constants.R`). +Users can also make use of the functions to trace the processing by step, when`driver_drake()` is employed. + diff --git a/_pkgdown.yml b/_pkgdown.yml index 30b6a77e2..a19d7319c 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -15,12 +15,21 @@ navbar: left: - icon: fa-home href: index.html - - text: "Getting Started" - href: articles/getting-started/getting-started.html - text: "Vignettes" + icon: fas fa-book + menu: + - text: "getting started" + href: articles/getting-started.html + - text: "User Modification Functions" + href: articles/usermod_vignette.html - icon: fa-file-code-o text: "Reference" href: reference/index.html + - icon: fa-newspaper-o + text: "News" + href: articles/news.html + + reference: - title: Running gcamfaostat diff --git a/docs/404.html b/docs/404.html index dc8a02de6..f119083ba 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -44,16 +44,36 @@ + -
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 62feedfc9..9447917bc 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/articles/getting-started/getting-started.html b/docs/articles/getting-started.html similarity index 83% rename from docs/articles/getting-started/getting-started.html rename to docs/articles/getting-started.html index 4bb3a4605..56b83fe23 100644 --- a/docs/articles/getting-started/getting-started.html +++ b/docs/articles/getting-started.html @@ -5,13 +5,13 @@ -Getting Started with gcamdata • gcamfaostat +Getting Started with gcamfaostat • gcamfaostat - - + + - - + + @@ -55,9 +73,11 @@

    Articles

    All vignettes

    -
    Introduction to gcamfaostat
    +
    Getting Started with gcamfaostat
    +
    +
    news
    -
    Getting Started with gcamdata
    +
    How to Write a User Modification Chunk
    diff --git a/docs/articles/gcamfaostat.html b/docs/articles/news.html similarity index 74% rename from docs/articles/gcamfaostat.html rename to docs/articles/news.html index cf4620c59..6c70fcfa4 100644 --- a/docs/articles/gcamfaostat.html +++ b/docs/articles/news.html @@ -5,13 +5,13 @@ -Introduction to gcamfaostat • gcamfaostat +news • gcamfaostat - + + + + + + +gcamfaostat udpates • gcamfaostat + + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +

    gcamfaostat 1.0.0 +

    +

    First release TBD The first release of gcamfaostat +1.0.0 includes the data generated for the Global Change Analysis Model +v7.0 GCAM +v7.0. The source data downloaded from FAOSTAT is archived at a Zenodo repository.

    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.0.7.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/articles/usermod_vignette.html b/docs/articles/usermod_vignette.html new file mode 100644 index 000000000..1cb03daec --- /dev/null +++ b/docs/articles/usermod_vignette.html @@ -0,0 +1,244 @@ + + + + + + + +How to Write a User Modification Chunk • gcamfaostat + + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +

    Introduction +

    +

    Users may want to change the default gcamdata behavior by either +modifying input assumptions or changing intermediate chunks. They can +now write a “user modification” chunk that can be “plugged in” to the +data system. This new chunk can modify any objects that are used or +created in gcamdata and pass the modified object to all dependent +chunks.

    +

    User-modification chunks have a format similar to other data chunks +in gcamdata, except that instead of producing a new output, it returns a +modified data object that replaces the original data object in the data +system. These new chunks can be added to driver_drake() or +driver() using the new arguments +user_modifications and xml_suffix, which tell +gcamdata which modification function to use and what suffix to add to +all impacted downstream xmls.

    +
    +
    +

    Example: Modify Shareweight +

    +

    Below we show an example user-modification chunk to change a +shareweight in an input csv file.

    +
    +

    User Modification Chunk +

    +

    Here we load in two csv files, “energy/A322.subsector_shrwt.csv” and +“common/GCAM_region_names.csv”. We modify A322.subsector_shrwt, so we +list it under driver.DECLARE_MODIFY, but do not modify +GCAM_region_names, so it is listed under +driver.DECLARE_INPUTS. Then, we set the shareweight column +of the first row of A322.subsector_shrwt to NEW.SHWT. +Finally, we use a new return_modified() function to return +the modified A322.subsector_shrwt (note that we have to include the path +for input files).

    +
    +usermod_fert <- function(command, ...) {
    +  if(command == driver.DECLARE_MODIFY) {
    +    return(c(FILE = "energy/A322.subsector_shrwt"))
    +  } else if(command == driver.DECLARE_INPUTS) {
    +    # In addition to the objects users want to modify we can also ask for any other
    +    # inputs we need to do our operations but won't be modified
    +    return(c(FILE = "common/GCAM_region_names"))
    +  } else if(command == driver.MAKE) {
    +    all_data <- list(...)[[1]]
    +    GCAM_region_names <- get_data(all_data, "common/GCAM_region_names")
    +    A322.subsector_shrwt <- get_data(all_data, "energy/A322.subsector_shrwt")
    +
    +    # Users could also read in additional files that exist outside of the data system
    +    # They should do that manually instead of through the driver.DECLARE_INPUTS so as to
    +    # avoid mixing user's custom files with Core files
    +    # A23.globaltech_eff.mine <- read_csv("/path/to/my/custom/A23.globaltech_eff_with_random_changes.csv")
    +    
    +    # Make some changes...
    +    A322.subsector_shrwt <- A322.subsector_shrwt %>%
    +      mutate(share.weight = as.double(share.weight),
    +             year = as.integer(year))
    +    A322.subsector_shrwt[1,"share.weight"] <- NEW.SHWT
    +    
    +    # NOTE: we have to match the original object name we asked for in driver.DECLARE_MODIFY, 
    +    # which means including the file path for input files
    +    # i.e. "energy/A322.subsector_shrwt" not "A322.subsector_shrwt"  
    +    # Other objects can be listed out just like for `return_data`
    +    return_modified("energy/A322.subsector_shrwt" = A322.subsector_shrwt)
    +
    +  } else {
    +    stop("Unknown command")
    +  }
    +}
    +
    +
    +

    Run usermod_fert once +

    +

    To include our modification, we include this new chunk in our call to +driver_drake() and also include a suffix to append to any +affected objects (currently mandatory to include suffix).

    +

    Because we used the constant NEW.SHWT to assign the new +value in our function, we first need to set it here.

    +
    +NEW.SHWT <- 0.5
    +
    +driver_drake(user_modifications = c("usermod_fert"),
    +        xml_suffix = "__1") # output xml will be saved as ORIGINALNAME_001.xml
    +
    +
    +

    Run usermod_fert multiple times +

    +

    We can also generate multiple modified xmls using +driver_drake(). To do this, we simply need to change the +value of NEW.SHWT and ensure that each different value is +associated with a different xml_suffix. As well, we need to +clear the usermod_fert object from drake’s cache using +drake::clean() as drake is not aware of the change to +NEW.SHWT. If you do not include this call, drake may assume +that all downstream objects/xmls do not need to be updated.

    +
    +# Multiple shareweights to use
    +shareweights <- seq(0.2, 1, 0.1)
    +
    +for (i in 1:length(shareweights)){
    +  drake::clean(list="usermod_fert") # Ensures that drakes knows to run usermod_fert
    +  
    +  NEW.SHWT <- shareweights[i]
    +  
    +  driver_drake(user_modifications = c("usermod_fert"),
    +               xml_suffix = paste0("__", i))
    +}
    +
    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.0.7.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/authors.html b/docs/authors.html index 56c9dfd3d..46c3ea57d 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • @@ -88,13 +106,13 @@

    Citation

    Zhao X, Chepeliev M, Patel P, Narayan K, Wise M (2023). gcamfaostat: Prepare, process, and synthesize FAOSTAT data for global agroeconomic and multisector dynamic modeling. -R package version 1.1. +R package version 1.0.0.

    @Manual{,
       title = {gcamfaostat: Prepare, process, and synthesize FAOSTAT data for global agroeconomic and multisector dynamic modeling},
       author = {Xin Zhao and Maksym Chepeliev and Pralit Patel and Kanishka Narayan and Marshall Wise},
       year = {2023},
    -  note = {R package version 1.1},
    +  note = {R package version 1.0.0},
     }
    diff --git a/docs/index.html b/docs/index.html index 64287eca2..84c8e9e43 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -45,16 +45,36 @@ + -
  • Reference +
  • +
  • + + + + News +
  • @@ -70,13 +90,51 @@
    -
    - +
    +

    gcamfaostat and gcamdata +

    +

    gcamfaostat is built based on an existing R package, gcamdata, which has similar functions togcamfaostat though gcamdata includes broader aspects of data inputs and is designed for the global multisector dynamic model GCAM. gcamfaostat utilizes the robust, reproducible and transparent data processing systems built in gcamdata. The two packages are consistent, while gcamfaostat focuses on agroeconomic data processing and can provide input data for gcamdata (and thus GCAM) and other models that rely on FAOSTAT data.

    The goals of this version are: (1) Check FAOSTAT data updates and download necessary datasets (2) Develop a new method of primary equivalent aggregation to aggregate supply-utilization-accounting (SUA) data for items along the supply chain (e.g., wheat flour, bran, and germ to wheat-primary-equivalent). The method preserves balance across space (trade balance), time (storage carryover), supply-utilization, and the combination of these dimensions with minimal adjustments. (3) Apply the new method of primary equivalent aggregation to aggregating FAO ~500 SUA (SCL) items to ~100 primary equivalent items in FAO Food Balance Sheet (FBS). (4) Compare the balanced data compiled using different methods and visualize the difference.

    +
    +
    +

    User Guide +

    +

    The package is documented in the online manual

    +
    +
    +

    Download and install: +

    +
    +install.packages("devtools")
    +devtools::install_github("realxinzhao/gcamfaostat")
    +
    +
    +

    Loading and run the gcamdata package +

    +

    Open the gcamfaostat.Rproj file in the gcamfaostat folder. RStudio should open the project.

    +

    To load the gcamdata package, enter:

    +

    {r eval = FALSE} devtools::load_all()

    +
    +

    Run the driver +

    +

    There are two ways to run the driver: 1. {r eval = FALSE} driver_drake() driver_drake() runs the driver and stores the outputs in a hidden cache. When you run driver_drake() again it will skip steps that are up-to-date. This is useful if you will be adjusting the data inputs and code and running the data system multiple times. For this reason, we almost always recommend using driver_drake(). More details can be found in the vignette.

    +
      +
    1. +{r eval = FALSE} driver() See the documentation for more options when running the driver, such as what outputs to generate or when to stop.
    2. +
    +
    +
    +

    Output files +

    +

    Users can specify the output directory (DIR_OUTPUT_CSV) that stores the output csv files in constants.R. The default directory is outputs/CSV. The the file will be exported when OUTPUT_Export_CSV == TRUE (an option in constants.R).
    +Users can also make use of the functions to trace the processing by step, whendriver_drake() is employed.

    Copyright 2019 Battelle Memorial Institute; see the LICENSE file.

    +
    diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 0adaceac5..44c785939 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,9 +2,10 @@ pandoc: 3.1.1 pkgdown: 2.0.7 pkgdown_sha: ~ articles: - gcamfaostat: gcamfaostat.html - getting-started: getting-started/getting-started.html -last_built: 2023-08-19T04:05Z + getting-started: getting-started.html + news: news.html + usermod_vignette: usermod_vignette.html +last_built: 2023-08-19T06:45Z urls: reference: https://realxinzhao.github.io/gcamfaostat/reference article: https://realxinzhao.github.io/gcamfaostat/articles diff --git a/docs/reference/FAOSTAT_AREA_RM_NONEXIST.html b/docs/reference/FAOSTAT_AREA_RM_NONEXIST.html index e298fac19..b982e0382 100644 --- a/docs/reference/FAOSTAT_AREA_RM_NONEXIST.html +++ b/docs/reference/FAOSTAT_AREA_RM_NONEXIST.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0
    @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FAOSTAT_load_raw_data.html b/docs/reference/FAOSTAT_load_raw_data.html index 76a410d02..e791bb5ce 100644 --- a/docs/reference/FAOSTAT_load_raw_data.html +++ b/docs/reference/FAOSTAT_load_raw_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FAOSTAT_metadata.html b/docs/reference/FAOSTAT_metadata.html index a9d72291a..b2413cf3e 100644 --- a/docs/reference/FAOSTAT_metadata.html +++ b/docs/reference/FAOSTAT_metadata.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • @@ -89,7 +107,7 @@

    Examples

    #> } #> return(metadata) #> } -#> <bytecode: 0x0000000044036138> +#> <bytecode: 0x0000000047b65140> #> <environment: namespace:gcamfaostat> diff --git a/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION.html b/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION.html index b164904ab..fba43cbbc 100644 --- a/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION.html +++ b/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION_ALL.html b/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION_ALL.html index d8e8a4793..e130cbdd7 100644 --- a/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION_ALL.html +++ b/docs/reference/FAO_AREA_DISAGGREGATE_HIST_DISSOLUTION_ALL.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_FILL_NUMERATOR_DENOMINATOR.html b/docs/reference/FF_FILL_NUMERATOR_DENOMINATOR.html index f7bdef953..2bd42e4fe 100644 --- a/docs/reference/FF_FILL_NUMERATOR_DENOMINATOR.html +++ b/docs/reference/FF_FILL_NUMERATOR_DENOMINATOR.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_check_count_plot.html b/docs/reference/FF_check_count_plot.html index 9d886a16a..5efd35bd2 100644 --- a/docs/reference/FF_check_count_plot.html +++ b/docs/reference/FF_check_count_plot.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_download_faostat_bulk.html b/docs/reference/FF_download_faostat_bulk.html index 4e9515790..2c119867e 100644 --- a/docs/reference/FF_download_faostat_bulk.html +++ b/docs/reference/FF_download_faostat_bulk.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_join_checkmap.html b/docs/reference/FF_join_checkmap.html index 3a1994ff0..0dba0112c 100644 --- a/docs/reference/FF_join_checkmap.html +++ b/docs/reference/FF_join_checkmap.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_rawdata_info.html b/docs/reference/FF_rawdata_info.html index 44dc4e6de..0e53d1aaf 100644 --- a/docs/reference/FF_rawdata_info.html +++ b/docs/reference/FF_rawdata_info.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/FF_summary.html b/docs/reference/FF_summary.html index 19efa537e..da644afe1 100644 --- a/docs/reference/FF_summary.html +++ b/docs/reference/FF_summary.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/GCAM_DATA_MAP.html b/docs/reference/GCAM_DATA_MAP.html index 483286518..e7696b8f1 100644 --- a/docs/reference/GCAM_DATA_MAP.html +++ b/docs/reference/GCAM_DATA_MAP.html @@ -22,7 +22,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -33,16 +33,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/GROSS_TRADE_ADJUST.html b/docs/reference/GROSS_TRADE_ADJUST.html index babab4339..b053ee0c8 100644 --- a/docs/reference/GROSS_TRADE_ADJUST.html +++ b/docs/reference/GROSS_TRADE_ADJUST.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/Moving_average.html b/docs/reference/Moving_average.html index aa8695a4a..6098bbfa1 100644 --- a/docs/reference/Moving_average.html +++ b/docs/reference/Moving_average.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/PREBUILT_DATA.html b/docs/reference/PREBUILT_DATA.html index a9de5cd3a..8753c3847 100644 --- a/docs/reference/PREBUILT_DATA.html +++ b/docs/reference/PREBUILT_DATA.html @@ -26,7 +26,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -37,16 +37,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/SUA_bal_adjust.html b/docs/reference/SUA_bal_adjust.html index 1ef1a5b46..67e3f4330 100644 --- a/docs/reference/SUA_bal_adjust.html +++ b/docs/reference/SUA_bal_adjust.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_column_types_header_line.html b/docs/reference/add_column_types_header_line.html index f6a16e988..c520c3eeb 100644 --- a/docs/reference/add_column_types_header_line.html +++ b/docs/reference/add_column_types_header_line.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_comments.html b/docs/reference/add_comments.html index eee87fbfb..2b78a47c6 100644 --- a/docs/reference/add_comments.html +++ b/docs/reference/add_comments.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_data.html b/docs/reference/add_data.html index 2ab8ff227..c2ff25542 100644 --- a/docs/reference/add_data.html +++ b/docs/reference/add_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_flags.html b/docs/reference/add_flags.html index e58c91fc5..db06f4383 100644 --- a/docs/reference/add_flags.html +++ b/docs/reference/add_flags.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_legacy_name.html b/docs/reference/add_legacy_name.html index a25ac2c4e..18a4ab836 100644 --- a/docs/reference/add_legacy_name.html +++ b/docs/reference/add_legacy_name.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_precursors.html b/docs/reference/add_precursors.html index 4cab37771..ff0c839af 100644 --- a/docs/reference/add_precursors.html +++ b/docs/reference/add_precursors.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_reference.html b/docs/reference/add_reference.html index cde763cd2..98d52b481 100644 --- a/docs/reference/add_reference.html +++ b/docs/reference/add_reference.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_title.html b/docs/reference/add_title.html index 858576392..ce7ac86c0 100644 --- a/docs/reference/add_title.html +++ b/docs/reference/add_title.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/add_units.html b/docs/reference/add_units.html index 86a2a253b..9783a90b4 100644 --- a/docs/reference/add_units.html +++ b/docs/reference/add_units.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/approx_fun.html b/docs/reference/approx_fun.html index 63c76073d..ce565dcc3 100644 --- a/docs/reference/approx_fun.html +++ b/docs/reference/approx_fun.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/approx_fun_constant.html b/docs/reference/approx_fun_constant.html index 2e87a2bd0..e77221df1 100644 --- a/docs/reference/approx_fun_constant.html +++ b/docs/reference/approx_fun_constant.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/assert_FBS_balance.html b/docs/reference/assert_FBS_balance.html index 2bb18f131..ca39259a9 100644 --- a/docs/reference/assert_FBS_balance.html +++ b/docs/reference/assert_FBS_balance.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/change_iso_code.html b/docs/reference/change_iso_code.html index 3ef536a96..afffd0a4f 100644 --- a/docs/reference/change_iso_code.html +++ b/docs/reference/change_iso_code.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/check_chunk_outputs.html b/docs/reference/check_chunk_outputs.html index 9d572f8c1..d6bb46544 100644 --- a/docs/reference/check_chunk_outputs.html +++ b/docs/reference/check_chunk_outputs.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/chunk_inputs.html b/docs/reference/chunk_inputs.html index 0665e6a74..df95f46b3 100644 --- a/docs/reference/chunk_inputs.html +++ b/docs/reference/chunk_inputs.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/chunk_outputs.html b/docs/reference/chunk_outputs.html index 8ec833e4a..f855f7f47 100644 --- a/docs/reference/chunk_outputs.html +++ b/docs/reference/chunk_outputs.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/chunk_readylist.html b/docs/reference/chunk_readylist.html index 6d4b748a1..2199f5c72 100644 --- a/docs/reference/chunk_readylist.html +++ b/docs/reference/chunk_readylist.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/create_datamap_from_cache.html b/docs/reference/create_datamap_from_cache.html index 0d1ee868b..9cbe84e51 100644 --- a/docs/reference/create_datamap_from_cache.html +++ b/docs/reference/create_datamap_from_cache.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/downscale_FAO_country.html b/docs/reference/downscale_FAO_country.html index dc2957f51..ff5575e3c 100644 --- a/docs/reference/downscale_FAO_country.html +++ b/docs/reference/downscale_FAO_country.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/driver.html b/docs/reference/driver.html index 392491883..062dbbdf9 100644 --- a/docs/reference/driver.html +++ b/docs/reference/driver.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/driver_drake.html b/docs/reference/driver_drake.html index cc61f7e53..58bae6ab8 100644 --- a/docs/reference/driver_drake.html +++ b/docs/reference/driver_drake.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/dstrace.html b/docs/reference/dstrace.html index 19990f4ee..bb1f57226 100644 --- a/docs/reference/dstrace.html +++ b/docs/reference/dstrace.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/dstrace_chunks.html b/docs/reference/dstrace_chunks.html index 29a178740..197c8afdb 100644 --- a/docs/reference/dstrace_chunks.html +++ b/docs/reference/dstrace_chunks.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/dstrace_plot.html b/docs/reference/dstrace_plot.html index e25dbb4a1..b39921bb2 100644 --- a/docs/reference/dstrace_plot.html +++ b/docs/reference/dstrace_plot.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/empty_data.html b/docs/reference/empty_data.html index 6c9f4181b..46a09a166 100644 --- a/docs/reference/empty_data.html +++ b/docs/reference/empty_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/extract_header_info.html b/docs/reference/extract_header_info.html index 8a71c5905..613202c42 100644 --- a/docs/reference/extract_header_info.html +++ b/docs/reference/extract_header_info.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/extract_prebuilt_data.html b/docs/reference/extract_prebuilt_data.html index e7af85dd4..1641c17ce 100644 --- a/docs/reference/extract_prebuilt_data.html +++ b/docs/reference/extract_prebuilt_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/fast_left_join.html b/docs/reference/fast_left_join.html index 162925df9..aeca7a9e3 100644 --- a/docs/reference/fast_left_join.html +++ b/docs/reference/fast_left_join.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/find_chunks.html b/docs/reference/find_chunks.html index 67e89232c..6d901d570 100644 --- a/docs/reference/find_chunks.html +++ b/docs/reference/find_chunks.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/find_csv_file.html b/docs/reference/find_csv_file.html index 9a26c739c..4fc8502d7 100644 --- a/docs/reference/find_csv_file.html +++ b/docs/reference/find_csv_file.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/find_header.html b/docs/reference/find_header.html index a2e37dfed..f0738947f 100644 --- a/docs/reference/find_header.html +++ b/docs/reference/find_header.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/gather_years.html b/docs/reference/gather_years.html index 83a40842b..eaf1a48bd 100644 --- a/docs/reference/gather_years.html +++ b/docs/reference/gather_years.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/gdp_deflator.html b/docs/reference/gdp_deflator.html index bb8fc5e6c..8c6f9c59b 100644 --- a/docs/reference/gdp_deflator.html +++ b/docs/reference/gdp_deflator.html @@ -22,7 +22,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -33,16 +33,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/get_comments.html b/docs/reference/get_comments.html index e80d7588d..70f164a5d 100644 --- a/docs/reference/get_comments.html +++ b/docs/reference/get_comments.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/get_data.html b/docs/reference/get_data.html index a60241c17..8b71ea059 100644 --- a/docs/reference/get_data.html +++ b/docs/reference/get_data.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/get_data_list.html b/docs/reference/get_data_list.html index 9512a4ef6..a6fa9c919 100644 --- a/docs/reference/get_data_list.html +++ b/docs/reference/get_data_list.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/get_flags.html b/docs/reference/get_flags.html index 98ec228d4..f289cb4df 100644 --- a/docs/reference/get_flags.html +++ b/docs/reference/get_flags.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/get_relative_to_workdir.html b/docs/reference/get_relative_to_workdir.html index c6cbbfde7..39f010750 100644 --- a/docs/reference/get_relative_to_workdir.html +++ b/docs/reference/get_relative_to_workdir.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/graph_chunks.html b/docs/reference/graph_chunks.html index 98815a736..39bc4b6f5 100644 --- a/docs/reference/graph_chunks.html +++ b/docs/reference/graph_chunks.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/index.html b/docs/reference/index.html index 1a0c49767..95c5758e0 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/info.html b/docs/reference/info.html index e69976297..7e84d772a 100644 --- a/docs/reference/info.html +++ b/docs/reference/info.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/inputs_of.html b/docs/reference/inputs_of.html index 92e62f06e..7080af27e 100644 --- a/docs/reference/inputs_of.html +++ b/docs/reference/inputs_of.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/is_data_list.html b/docs/reference/is_data_list.html index 0dba0e3c4..97d9933cb 100644 --- a/docs/reference/is_data_list.html +++ b/docs/reference/is_data_list.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/left_join_error_no_match.html b/docs/reference/left_join_error_no_match.html index eb7774306..9d6732dc4 100644 --- a/docs/reference/left_join_error_no_match.html +++ b/docs/reference/left_join_error_no_match.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/left_join_keep_first_only.html b/docs/reference/left_join_keep_first_only.html index 1b61cb578..22f61bdff 100644 --- a/docs/reference/left_join_keep_first_only.html +++ b/docs/reference/left_join_keep_first_only.html @@ -24,7 +24,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -35,16 +35,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/load_csv_files.html b/docs/reference/load_csv_files.html index bd020eefb..240bc3800 100644 --- a/docs/reference/load_csv_files.html +++ b/docs/reference/load_csv_files.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/load_from_cache.html b/docs/reference/load_from_cache.html index eea6f2b6f..cce4cca8a 100644 --- a/docs/reference/load_from_cache.html +++ b/docs/reference/load_from_cache.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/missing_data.html b/docs/reference/missing_data.html index 707a1afc8..c42b027e9 100644 --- a/docs/reference/missing_data.html +++ b/docs/reference/missing_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_aglu_L100.FAO_SUA_PrimaryEquivalent.html b/docs/reference/module_aglu_L100.FAO_SUA_PrimaryEquivalent.html index f70aeb752..eb0f19824 100644 --- a/docs/reference/module_aglu_L100.FAO_SUA_PrimaryEquivalent.html +++ b/docs/reference/module_aglu_L100.FAO_SUA_PrimaryEquivalent.html @@ -21,7 +21,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -32,16 +32,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc1_QCL.html b/docs/reference/module_xfaostat_L101_RawDataPreProc1_QCL.html index f1f1a30c1..121de8df9 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc1_QCL.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc1_QCL.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc2_PP_PD_OA.html b/docs/reference/module_xfaostat_L101_RawDataPreProc2_PP_PD_OA.html index 3e9318d71..3510d45c1 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc2_PP_PD_OA.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc2_PP_PD_OA.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc3_SCL_FBS.html b/docs/reference/module_xfaostat_L101_RawDataPreProc3_SCL_FBS.html index 6155c90b5..325bdd594 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc3_SCL_FBS.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc3_SCL_FBS.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc4_FBSH_CB.html b/docs/reference/module_xfaostat_L101_RawDataPreProc4_FBSH_CB.html index 78cad179a..2ac6d7416 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc4_FBSH_CB.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc4_FBSH_CB.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc5_TCL.html b/docs/reference/module_xfaostat_L101_RawDataPreProc5_TCL.html index 0421e45a2..0ca68ea3b 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc5_TCL.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc5_TCL.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc6_TM.html b/docs/reference/module_xfaostat_L101_RawDataPreProc6_TM.html index a6862886d..0fc917d15 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc6_TM.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc6_TM.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc7_FO.html b/docs/reference/module_xfaostat_L101_RawDataPreProc7_FO.html index 8700516da..6059e6627 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc7_FO.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc7_FO.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L101_RawDataPreProc8_RL_RFN.html b/docs/reference/module_xfaostat_L101_RawDataPreProc8_RL_RFN.html index 7a60d46a8..a6293e66c 100644 --- a/docs/reference/module_xfaostat_L101_RawDataPreProc8_RL_RFN.html +++ b/docs/reference/module_xfaostat_L101_RawDataPreProc8_RL_RFN.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L102_ProductionArea.html b/docs/reference/module_xfaostat_L102_ProductionArea.html index aef7bfe0e..26940ddfe 100644 --- a/docs/reference/module_xfaostat_L102_ProductionArea.html +++ b/docs/reference/module_xfaostat_L102_ProductionArea.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L103_ProducerPrices.html b/docs/reference/module_xfaostat_L103_ProducerPrices.html index 4bb0c30c7..0ae7d85db 100644 --- a/docs/reference/module_xfaostat_L103_ProducerPrices.html +++ b/docs/reference/module_xfaostat_L103_ProducerPrices.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L104_ProductionAreaAddFodder.html b/docs/reference/module_xfaostat_L104_ProductionAreaAddFodder.html index 1f42ccd74..cf598e10f 100644 --- a/docs/reference/module_xfaostat_L104_ProductionAreaAddFodder.html +++ b/docs/reference/module_xfaostat_L104_ProductionAreaAddFodder.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L105_DataConnectionToSUA.html b/docs/reference/module_xfaostat_L105_DataConnectionToSUA.html index a66a1fd89..f2aa2576e 100644 --- a/docs/reference/module_xfaostat_L105_DataConnectionToSUA.html +++ b/docs/reference/module_xfaostat_L105_DataConnectionToSUA.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L106_FoodMacroNutrient.html b/docs/reference/module_xfaostat_L106_FoodMacroNutrient.html index 8c4704594..74d0d6731 100644 --- a/docs/reference/module_xfaostat_L106_FoodMacroNutrient.html +++ b/docs/reference/module_xfaostat_L106_FoodMacroNutrient.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L199_ExportCSV.html b/docs/reference/module_xfaostat_L199_ExportCSV.html index 4f2524888..ac23f73aa 100644 --- a/docs/reference/module_xfaostat_L199_ExportCSV.html +++ b/docs/reference/module_xfaostat_L199_ExportCSV.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L201_Forestry.html b/docs/reference/module_xfaostat_L201_Forestry.html index 4c5e6451d..a624df80f 100644 --- a/docs/reference/module_xfaostat_L201_Forestry.html +++ b/docs/reference/module_xfaostat_L201_Forestry.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L301_LandCover.html b/docs/reference/module_xfaostat_L301_LandCover.html index 86b6278c5..f8cbb591a 100644 --- a/docs/reference/module_xfaostat_L301_LandCover.html +++ b/docs/reference/module_xfaostat_L301_LandCover.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/module_xfaostat_L401_Fertilizer.html b/docs/reference/module_xfaostat_L401_Fertilizer.html index 4b3615064..6448e8645 100644 --- a/docs/reference/module_xfaostat_L401_Fertilizer.html +++ b/docs/reference/module_xfaostat_L401_Fertilizer.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/normalize_files.html b/docs/reference/normalize_files.html index b453fa881..afe2515e6 100644 --- a/docs/reference/normalize_files.html +++ b/docs/reference/normalize_files.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/output_csv_data.html b/docs/reference/output_csv_data.html index 3767ad575..a567aaa9a 100644 --- a/docs/reference/output_csv_data.html +++ b/docs/reference/output_csv_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/outputs_of.html b/docs/reference/outputs_of.html index 549a70dd5..4dc06e0cf 100644 --- a/docs/reference/outputs_of.html +++ b/docs/reference/outputs_of.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/parse_csv_header.html b/docs/reference/parse_csv_header.html index e6320baad..419431336 100644 --- a/docs/reference/parse_csv_header.html +++ b/docs/reference/parse_csv_header.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/protect_integer_cols.html b/docs/reference/protect_integer_cols.html index 4a2e0dbb1..45272bb88 100644 --- a/docs/reference/protect_integer_cols.html +++ b/docs/reference/protect_integer_cols.html @@ -20,7 +20,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -31,16 +31,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/remove_data.html b/docs/reference/remove_data.html index cd801fda4..f0d6e9b31 100644 --- a/docs/reference/remove_data.html +++ b/docs/reference/remove_data.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/repeat_add_columns.html b/docs/reference/repeat_add_columns.html index 0531dfeb4..4fd042bce 100644 --- a/docs/reference/repeat_add_columns.html +++ b/docs/reference/repeat_add_columns.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/return_data.html b/docs/reference/return_data.html index 2e6f26775..254ee5f62 100644 --- a/docs/reference/return_data.html +++ b/docs/reference/return_data.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/return_modified.html b/docs/reference/return_modified.html index 07ee9a3a7..5cda09c76 100644 --- a/docs/reference/return_modified.html +++ b/docs/reference/return_modified.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/rm_accent.html b/docs/reference/rm_accent.html index 3c5173782..440658fa0 100644 --- a/docs/reference/rm_accent.html +++ b/docs/reference/rm_accent.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/run_chunk.html b/docs/reference/run_chunk.html index 4844c23d1..64560c47b 100644 --- a/docs/reference/run_chunk.html +++ b/docs/reference/run_chunk.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/same_attributes_as.html b/docs/reference/same_attributes_as.html index 00766c602..ffa4eec2e 100644 --- a/docs/reference/same_attributes_as.html +++ b/docs/reference/same_attributes_as.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/same_precursors_as.html b/docs/reference/same_precursors_as.html index 5c5d0da47..96c2c1ca4 100644 --- a/docs/reference/same_precursors_as.html +++ b/docs/reference/same_precursors_as.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/save_chunkdata.html b/docs/reference/save_chunkdata.html index f91247eee..f3efc03f5 100644 --- a/docs/reference/save_chunkdata.html +++ b/docs/reference/save_chunkdata.html @@ -19,7 +19,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -30,16 +30,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/screen_forbidden.html b/docs/reference/screen_forbidden.html index 8223b90a5..93d1a1d94 100644 --- a/docs/reference/screen_forbidden.html +++ b/docs/reference/screen_forbidden.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/standardize_iso.html b/docs/reference/standardize_iso.html index c247da864..f8f2386f1 100644 --- a/docs/reference/standardize_iso.html +++ b/docs/reference/standardize_iso.html @@ -18,7 +18,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -29,16 +29,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/tibbelize_outputs.html b/docs/reference/tibbelize_outputs.html index 2ebd954c9..3c6d0dcce 100644 --- a/docs/reference/tibbelize_outputs.html +++ b/docs/reference/tibbelize_outputs.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/verify_identical_prebuilt.html b/docs/reference/verify_identical_prebuilt.html index b9800c9b7..afad6cea1 100644 --- a/docs/reference/verify_identical_prebuilt.html +++ b/docs/reference/verify_identical_prebuilt.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/warn_data_injects.html b/docs/reference/warn_data_injects.html index 2bd5fc4d4..d7554ef99 100644 --- a/docs/reference/warn_data_injects.html +++ b/docs/reference/warn_data_injects.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/warn_datachunk_bypass.html b/docs/reference/warn_datachunk_bypass.html index 7ddc5e167..b3506858f 100644 --- a/docs/reference/warn_datachunk_bypass.html +++ b/docs/reference/warn_datachunk_bypass.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/warn_mismarked_fileinputs.html b/docs/reference/warn_mismarked_fileinputs.html index fd852a4fa..24895c51e 100644 --- a/docs/reference/warn_mismarked_fileinputs.html +++ b/docs/reference/warn_mismarked_fileinputs.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/reference/write_to_all_regions.html b/docs/reference/write_to_all_regions.html index 48856aa3d..214acfedf 100644 --- a/docs/reference/write_to_all_regions.html +++ b/docs/reference/write_to_all_regions.html @@ -17,7 +17,7 @@ gcamfaostat - 1.1 + 1.0.0 @@ -28,16 +28,34 @@ -
  • - Getting Started -
  • - +
  • Reference +
  • +
  • + + + + News +
  • diff --git a/docs/sitemap.xml b/docs/sitemap.xml index d7ccb08b8..602ecae72 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,13 +4,19 @@ https://realxinzhao.github.io/gcamfaostat/404.html - https://realxinzhao.github.io/gcamfaostat/articles/gcamfaostat.html + https://realxinzhao.github.io/gcamfaostat/articles/getting-started.html - https://realxinzhao.github.io/gcamfaostat/articles/getting-started/getting-started.html + https://realxinzhao.github.io/gcamfaostat/articles/index.html - https://realxinzhao.github.io/gcamfaostat/articles/index.html + https://realxinzhao.github.io/gcamfaostat/articles/news/NEWS.html + + + https://realxinzhao.github.io/gcamfaostat/articles/news.html + + + https://realxinzhao.github.io/gcamfaostat/articles/usermod_vignette.html https://realxinzhao.github.io/gcamfaostat/authors.html diff --git a/vignettes/gcamfaostat.Rmd b/vignettes/gcamfaostat.Rmd deleted file mode 100644 index 398cb672f..000000000 --- a/vignettes/gcamfaostat.Rmd +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Introduction to gcamfaostat" -output: rmarkdown::html_vignette -vignette: > - %\VignetteIndexEntry{Introduction to gcamfaostat} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- - -```{r, include = FALSE} -knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>" -) -``` - - - - - -```{r setup} -library(gcamdata) -``` diff --git a/vignettes/getting-started/getting-started.Rmd b/vignettes/getting-started.Rmd similarity index 97% rename from vignettes/getting-started/getting-started.Rmd rename to vignettes/getting-started.Rmd index 0e43bbfe1..51ad34769 100644 --- a/vignettes/getting-started/getting-started.Rmd +++ b/vignettes/getting-started.Rmd @@ -1,9 +1,9 @@ --- -title: "Getting Started with gcamdata" +title: "Getting Started with gcamfaostat" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{Getting Started with gcamdata} + %\VignetteIndexEntry{Getting Started with gcamfaostat} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- diff --git a/vignettes/news.Rmd b/vignettes/news.Rmd new file mode 100644 index 000000000..3959c4796 --- /dev/null +++ b/vignettes/news.Rmd @@ -0,0 +1,26 @@ +--- +title: "news" +date: "`r Sys.Date()`" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{news} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(gcamfaostat) +``` + +# gcamfaostat 1.0.0 + +**First release TBD** +The first release of gcamfaostat 1.0.0 includes the data generated for the Global Change Analysis Model v7.0 [GCAM v7.0](https://github.com/JGCRI/gcam-core/releases/tag/gcam-v7.0). The source data downloaded from FAOSTAT is archived at a [Zenodo repository]( https://zenodo.org/deposit/8260225). + diff --git a/vignettes/usermod_vignette.Rmd b/vignettes/usermod_vignette.Rmd new file mode 100644 index 000000000..a474d0376 --- /dev/null +++ b/vignettes/usermod_vignette.Rmd @@ -0,0 +1,95 @@ +--- +title: "How to Write a User Modification Chunk" +date: "`r Sys.Date()`" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{usermod_chunks} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +library(devtools) +devtools::load_all() +``` + +## Introduction +Users may want to change the default gcamdata behavior by either modifying input assumptions or changing intermediate chunks. They can now write a "user modification" chunk that can be "plugged in" to the data system. This new chunk can modify any objects that are used or created in gcamdata and pass the modified object to all dependent chunks. + +User-modification chunks have a format similar to other data chunks in gcamdata, except that instead of producing a new output, it returns a modified data object that replaces the original data object in the data system. These new chunks can be added to `driver_drake()` or `driver()` using the new arguments `user_modifications` and `xml_suffix`, which tell gcamdata which modification function to use and what suffix to add to all impacted downstream xmls. + +## Example: Modify Shareweight +Below we show an example user-modification chunk to change a shareweight in an input csv file. + +### User Modification Chunk +Here we load in two csv files, "energy/A322.subsector_shrwt.csv" and "common/GCAM_region_names.csv". We modify A322.subsector_shrwt, so we list it under `driver.DECLARE_MODIFY`, but do not modify GCAM_region_names, so it is listed under `driver.DECLARE_INPUTS`. Then, we set the shareweight column of the first row of A322.subsector_shrwt to `NEW.SHWT`. Finally, we use a new `return_modified()` function to return the modified A322.subsector_shrwt (note that we have to include the path for input files). + + +``` {r} +usermod_fert <- function(command, ...) { + if(command == driver.DECLARE_MODIFY) { + return(c(FILE = "energy/A322.subsector_shrwt")) + } else if(command == driver.DECLARE_INPUTS) { + # In addition to the objects users want to modify we can also ask for any other + # inputs we need to do our operations but won't be modified + return(c(FILE = "common/GCAM_region_names")) + } else if(command == driver.MAKE) { + all_data <- list(...)[[1]] + GCAM_region_names <- get_data(all_data, "common/GCAM_region_names") + A322.subsector_shrwt <- get_data(all_data, "energy/A322.subsector_shrwt") + + # Users could also read in additional files that exist outside of the data system + # They should do that manually instead of through the driver.DECLARE_INPUTS so as to + # avoid mixing user's custom files with Core files + # A23.globaltech_eff.mine <- read_csv("/path/to/my/custom/A23.globaltech_eff_with_random_changes.csv") + + # Make some changes... + A322.subsector_shrwt <- A322.subsector_shrwt %>% + mutate(share.weight = as.double(share.weight), + year = as.integer(year)) + A322.subsector_shrwt[1,"share.weight"] <- NEW.SHWT + + # NOTE: we have to match the original object name we asked for in driver.DECLARE_MODIFY, + # which means including the file path for input files + # i.e. "energy/A322.subsector_shrwt" not "A322.subsector_shrwt" + # Other objects can be listed out just like for `return_data` + return_modified("energy/A322.subsector_shrwt" = A322.subsector_shrwt) + + } else { + stop("Unknown command") + } +} +``` + +### Run usermod_fert once +To include our modification, we include this new chunk in our call to `driver_drake()` and also include a suffix to append to any affected objects (currently mandatory to include suffix). + +Because we used the constant `NEW.SHWT` to assign the new value in our function, we first need to set it here. +``` {r eval=FALSE} +NEW.SHWT <- 0.5 + +driver_drake(user_modifications = c("usermod_fert"), + xml_suffix = "__1") # output xml will be saved as ORIGINALNAME_001.xml +``` + + +### Run usermod_fert multiple times +We can also generate multiple modified xmls using `driver_drake()`. To do this, we simply need to change the value of `NEW.SHWT` and ensure that each different value is associated with a different `xml_suffix`. As well, we need to clear the usermod_fert object from drake's cache using `drake::clean()` as drake is not aware of the change to `NEW.SHWT`. If you do not include this call, drake may assume that all downstream objects/xmls do not need to be updated. + +``` {r eval=FALSE} +# Multiple shareweights to use +shareweights <- seq(0.2, 1, 0.1) + +for (i in 1:length(shareweights)){ + drake::clean(list="usermod_fert") # Ensures that drakes knows to run usermod_fert + + NEW.SHWT <- shareweights[i] + + driver_drake(user_modifications = c("usermod_fert"), + xml_suffix = paste0("__", i)) +} +```