Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add function for creating standard metadata #38

Open
7 tasks done
collinschwantes opened this issue Jul 24, 2024 · 4 comments
Open
7 tasks done

add function for creating standard metadata #38

collinschwantes opened this issue Jul 24, 2024 · 4 comments

Comments

@collinschwantes
Copy link
Collaborator

collinschwantes commented Jul 24, 2024

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

  • Field Name - name of field from column
  • Field description - free text description of a property of the data for human consumption
  • Field type - one of https://schema.org/DataType or a more specific R class (unlikely as all data products will be CSVs)
  • Field units - unit of measure for a field. For species count data (e.g. number of mosquitos) use https://dwc.tdwg.org/list/#dwc_individualCount if applicable.
  • Data standard - Name of data standard used for field * this is captured by term uri so maybe not needed?
  • Term URI - Uniform Resource Identifier for a term, should be provided by the data standard. e.g uri for individualCount provided above
  • Comments - Additional context for the field.
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
Copy link
Collaborator Author

collinschwantes commented Aug 15, 2024

  • Must be able to pull in fields from ODK template
    • Think about how to handle the binary versions of multiple select
  • See data agreements for descriptive metadata components

@collinschwantes
Copy link
Collaborator Author

collinschwantes commented Aug 23, 2024

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
Copy link
Collaborator Author

collinschwantes commented Aug 23, 2024

  • create vignette work updating frictionless datapackage.json files from this standard

@collinschwantes
Copy link
Collaborator Author

collinschwantes commented Aug 27, 2024

  • add function for building up frictionless metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant