An R6 Class representing a data source with comprehensive validation. Only for use in dev-mode (using devtools::load_all).
Methods
Method new()
Create a new Source object
Usage
Source$new(
source_name,
source_version,
license,
website_url,
spatial_extent,
temporal_resolution,
citation_keys = NA_character_,
aws_bucket = NA_character_,
aws_region = NA_character_,
download_url = NA_character_,
prio_mirror = NA_character_,
tags = NA_character_,
reference_keys = NA_character_,
bib_path = "inst/REFERENCES.bib"
)Arguments
source_nameString. Full name of the source
source_versionString. Version of the source
licenseString. Data license
website_urlString. URL to landing page
spatial_extentString. One of predefined spatial extents
temporal_resolutionString. One of predefined temporal resolutions
citation_keysString. Optional. Bibkey(s) of citations
aws_bucketString. Optional. Amazon S3 bucket
aws_regionString. Optional. Amazon S3 region
download_urlString. Optional. URL to data file
prio_mirrorString. Optional. Alternative download location
tagsString. Optional. Comma-separated tags
reference_keysString. Optional. Other relevant bibkeys
bib_pathString. Path to bibliography.
Examples
new_source <- Source$new(
source_name = "my new source",
source_version = "v1.0",
license = "CC BY 4.0",
website_url = "www.example.com",
spatial_extent = "World",
temporal_resolution = "Yearly",
citation_keys = "doeNewSource2025",
download_url = "www.example.com/path/to/my/new/source/file.csv",
tags = "test"
)
new_source # gives warning that doeNewSource2025 does not exist in the bibliographyExamples
## ------------------------------------------------
## Method `Source$new`
## ------------------------------------------------
new_source <- Source$new(
source_name = "my new source",
source_version = "v1.0",
license = "CC BY 4.0",
website_url = "www.example.com",
spatial_extent = "World",
temporal_resolution = "Yearly",
citation_keys = "doeNewSource2025",
download_url = "www.example.com/path/to/my/new/source/file.csv",
tags = "test"
)
#> Error: object 'Source' not found
new_source # gives warning that doeNewSource2025 does not exist in the bibliography
#> Error: object 'new_source' not found