Source | R Documentation |
An R6 Class representing a data source with comprehensive validation. Only for use in dev-mode (using devtools::load_all).
Boolean vector
character vector
character vector
tibble
text in console
new()
Create a new Source object
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" )
source_name
String. Full name of the source
source_version
String. Version of the source
license
String. Data license
website_url
String. URL to landing page
spatial_extent
String. One of predefined spatial extents
temporal_resolution
String. One of predefined temporal resolutions
citation_keys
String. Optional. Bibkey(s) of citations
aws_bucket
String. Optional. Amazon S3 bucket
aws_region
String. Optional. Amazon S3 region
download_url
String. Optional. URL to data file
prio_mirror
String. Optional. Alternative download location
tags
String. Optional. Comma-separated tags
reference_keys
String. Optional. Other relevant bibkeys
bib_path
String. Path to bibliography.
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 bibliography
save_url_files()
Saves url-files provided as a text-file with urls
Source$save_url_files()
get_existing_tags()
Get tags from source data
Source$get_existing_tags()
get_existing_licenses()
Get licenses from source data
Source$get_existing_licenses()
to_tibble()
Converts source to a single row tibble
Source$to_tibble()
print()
Prints validation report of source.
Source$print()
clone()
The objects of this class are cloneable with this method.
Source$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## 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"
)
new_source # gives warning that doeNewSource2025 does not exist in the bibliography
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.