API for Project-Handling in GeoRegions.jl
Setting up GeoRegions.jl in a Project
GeoRegions.setupGeoRegions Function
setupGeoRegions(;
path :: AbstractString = pwd(),
overwrite :: Bool = false
) -> nothingSetup the directory specified by path with files for custom GeoRegions. If overwrite = true, then any preexisting files are overwritten.
Keyword Arguments
path: The path where the template list of custom GeoRegions will be copied to. Defaults to the current working directorypwd().overwrite: If template files exist in this folder, overwrite?
GeoRegions.deleteGeoRegions Function
deleteGeoRegions(;
path :: AbstractString = pwd(),
recursive :: Bool = false,
) -> nothingReset all the files containing GeoRegion information back to the default. If recursive = true, delete the entire directory.
Keyword Arguments
path: The path where the list of custom GeoRegions will be retrieved from. Defaults to the current working directorypwd().recursive: If true, then delete the hidden.georegionsfolder entirely.
Handling custom lists of GeoRegions.jl
GeoRegions.loadGeoRegions Function
loadGeoRegions(;
path :: AbstractString = pwd(),
custom :: Bool = true,
giorgi :: Bool = false,
srex :: Bool = false,
ar6 :: Bool = false,
) -> gvec :: Vector{<:GeoRegion}Extract information for all custom GeoRegions in the project defined by defined by path.
Arguments
path: Path where all custom GeoRegions for the project are saved into.custom: Iftrue, custom, user-defined list of GeoRegions will be displayed.giorgi: IftrueANDpredefined = true, display predefined GF GeoRegions. Default isfalse.srex: IftrueANDpredefined = true, display predefined SREX GeoRegions. Default isfalse.ar6: IftrueANDpredefined = true, display predefined IPCC AR6 GeoRegions. Default isfalse.
Returns
gvec: Vector containing all the GeoRegions in the directory defined bypath.
GeoRegions.addGeoRegions Function
addGeoRegions(
src :: AbstractString,
dst :: AbstractString = pwd();
overwrite :: Bool = false,
verbose :: Bool = false,
dogeopath :: Bool = true
) -> nothingCopy all custom GeoRegions from the project directory defined by src into a new project directory defined by dst.
Arguments
src: The project path where the list of custom GeoRegions will be copied from.dst: The project path where the list of custom GeoRegions will be copied into.
Keyword Arguments
overwrite: Iftrue, override any custom GeoRegions that have the sameIDs as those in the filefname.verbose: Verbose logging for ease of monitoring? Default isfalse.dogeopath: Iftrue, then the appends.georegionsto the end ofsrcif it isn't already specified. Default istrue