set_config: Initialize the Configuration File

View source: R/set_config.R

set_configR Documentation

Initialize the Configuration File

Description

Creates a configuration file in the specified directory of the generated database (config/config.json). If the specified directory does not exist but its parent directory does, it will be created.

Usage

set_config(
  path,
  regions,
  source,
  start = "2020-01-01",
  resol,
  scale = NULL,
  limit = 10000,
  verbose = TRUE
)

Arguments

path

[mandatory] (character) The path to the root directory of the generated database. This must be a writable, non-temporary directory. Avoid using the home directory (~), the current working directory, or the package directory.

regions

[mandatory] (character) ISO 3166-1 alpha-2 country codes or ISO 3166-2 subdivision codes.

source

[mandatory] (list) Description of Google Earth Engine (GEE) datasets of interest (the complete data catalog of GEE is accessible at: https://developers.google.com/earth-engine/datasets/catalog). It is a nested list with three levels:

names

(list) Datasets of interest (e.g., "MODIS/061/MOD13A1").

bands

(list) Bands of interest (e.g., "NDVI").

zonal_stats

(character) Statistics of interest (options: "mean", "median", "min", "max", "sd").

start

[optional] (date) First date of the data collection (default: "2020-01-01").

resol

[mandatory] (integer) Resolution of the H3 bin.

scale

[optional] (integer) Specifies the nominal resolution (in meters) for image processing. If left as NULL (the default), a resolution of 1000 is used.

limit

[optional] (integer) In "local" mode, 'limit / dates' sets batch size; in "drive" mode, 'limit' is the max features per export (default: 10000).

verbose

[optional] (logical) Display messages (default: TRUE).

Value

No return value, called for side effects.

Examples

## Not run: 
  set_config(path = tempdir(),
             regions = c("SO", "YM"),
             source = list(
              "MODIS/061/MOD13A1" = list(
                "NDVI" = c("mean", "sd")
             )
            ),
            resol = 3)

## End(Not run)

geeLite documentation built on Aug. 9, 2025, 1:08 a.m.