Create the Sources table
Usage
create_sources(
L0_flat,
SourceCode,
Organization,
SourceDescription,
SourceLink = NULL,
ContactName,
Phone,
Email,
Address,
City,
State,
ZipCode,
Citation
)
Arguments
- L0_flat
(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details).
- SourceCode
(character) Column in
L0_flat
containing the code which identifies the organization that created the data.- Organization
(character) Column in
L0_flat
containing the name of the organization that collected the data.- SourceDescription
(character) Column in
L0_flat
containing the full text description of the source of the data.- SourceLink
(character) Column in
L0_flat
containing the link to the original data file of the data source.- ContactName
(character) Column in
L0_flat
containing the name of the contact person for the data source.- Phone
(character) Column in
L0_flat
containing the phone number for the contact person.(character) Column in
L0_flat
containing the email address for the contact person.- Address
(character) Column in
L0_flat
containing the street address for the contact person.- City
(character) Column in
L0_flat
containing the city in which the contact person is located.- State
(character) Column in
L0_flat
containing the state in which the contact person is located.- ZipCode
(character) Column in
L0_flat
containing the US Zip Code or country postal code.- Citation
(character) Column in
L0_flat
containing the Text string that gives the citation to be used when the data from each source are referenced.
Details
This function appends columns to the L0_flat
table and
returns the augmented table.
"flat" format refers to the fully joined source L0 dataset in "wide" form with the exception of the core observation variables, which are in "long" form (i.e. using the variable_name, value, unit columns of the observation table). This "flat" format is the "widest" an L1 hymetDP dataset can be consistently spread due to the frequent occurrence of L0 source datasets with > 1 core observation variable.#'
See also
Other create required tables:
create_data_values()
,
create_methods()
,
create_quality_control()
,
create_series_catalog()
,
create_sites()
,
create_variables()
Examples
flat <- hymet_L0_flat
Sources <- hymetDP::create_sources(
L0_flat = flat,
SourceCode = "SourceCode",
Organization = "Organization",
SourceDescription = "SourceDescription",
SourceLink = "SourceLink",
ContactName = "ContactName",
Phone = "Phone",
Email = "Email",
Address = "Address",
City = "City",
State = "State",
ZipCode = "ZipCode",
Citation = "Citation")
Sources
#> # A tibble: 1 × 12
#> SourceCode Organization SourceDescripti… SourceLink ContactName Phone Email
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 1 McMurdo Dry Va… As part of the … https://d… McMurdo Dr… Unkn… im@m…
#> # … with 5 more variables: Address <chr>, City <chr>, State <chr>,
#> # ZipCode <chr>, Citation <chr>