View source: R/define_source.R
define_source | R Documentation |
Define a hymetDP source
define_source( L0_flat, eml = eml, Organization = NULL, SourceDescription = NULL, SourceLink = NULL, ContactName = NULL, Phone = NULL, Email = NULL, Address = NULL, City = NULL, State = NULL, ZipCode = NULL, Citation = NULL )
L0_flat |
(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). |
eml |
('xml_document' 'xml_node') EML metadata. |
Organization |
(character) Name of the organization that collected the data. |
SourceDescription |
(character) Full text description of the source of the data. If not provided, will default to the abstract from the EML document. |
SourceLink |
(character) Optional. Full text description of the source of the data. If not provided, will default to the DOI in the EML document. |
ContactName |
(character) Name of the contact person for the data source. If not provided, all contact information will default to the first contact listed in the EML document. |
Phone |
(character) Phone number for the contact person. |
Email |
(character) Email addresss for the contact person. |
Address |
(character) Street address for the contact person. |
City |
(character) City in which the contact person is located. |
State |
(character) State in which the contact person is located. Use two letter abbreviations for US. For other countries give the full country name. |
ZipCode |
(character) US Zip Code or country postal code. |
Citation |
(character) Text string that gives the citation to be used when the data from each source are referenced. If not provided, will default to the Citation that appears (or that would appear) on the EDI Data Portal for the EML document. |
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.
(tbl_df, tbl, data.frame) An augmented version of the original flat table, with all of the original columns plus additional columns for the Source information.
flat <- hymet_L0_flat[1:30] eml <- read_metadata('knb-lter-mcm.9003.11') flat <- define_source( L0_flat = flat, eml = eml)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.