ecohealthalliance / ohcleandat

One Health Data Cleaning and Quality Checking Package
https://ecohealthalliance.github.io/ohcleandat/
MIT License
0 stars 0 forks source link

add function for creating standard metadata #38

Open collinschwantes opened 1 month ago

collinschwantes commented 1 month ago

Each dataset will require descriptive and structural metadata.

Descriptive metadata will likely be captured in the repository metadata. This can be created from the {deposits} package Who - creators and contributors What - description of the data Where - where were the data collected/processed Why - description of the project When - date created Funder - who supported this work

Structural metadata will need to be created for each dataset. This could likely be captured in a CSV

create_metadata_from_template <- function(data){

# create empty data frame 
metadata <- tibble(
    name  = character(),
    description = character(),
    type = character(),
    units = character(),
    term_uri = character(),
    comments = character()
    )

# get fields
metadata$name = names(data)
# get classes 
metadata$type <- purrr:map_chr(data,function(){
### map classes to types
})

return(metadata)

}
collinschwantes commented 4 weeks ago
collinschwantes commented 3 weeks ago

Descriptive metadata components will be handled by metadata created for the {deposits} workflow.

Name and type components of the structural metadata are automatically captured in the frictionless workflow in {deposits}

collinschwantes commented 2 weeks ago
collinschwantes commented 2 weeks ago