Assess attributes

New submissions made through the web editor should have attributes created by the submitter. If there are no attributes, or if they are incomplete, please use the email template to correspond with the submitter to ask for attributes.

Additionally, the web editor will not allow for the creation of custom units. submitters should select other/none in the editor unit dropdown if they cannot find their desired unit. In the EML document, these will result in dimensionless units. Accordingly, new submissions should be checked for dimensionless units. This can be done with the following code. Note that this only applies if there is more than one otherEntity.

dim_units <- sapply(doc$dataset$otherEntity, function(x) {
      i <- datamgmt::which_in_eml(x$attributeList$attribute, "standardUnit", as("dimensionless", "standardUnit"))
      
      out <- sapply(i, function(j){
         list(entityName = x$entityName,
               attributeName = x$attributeList$attribute[[j]]$attributeName,
               attributeLabel = x$attributeList$attribute[[j]]$attributeLabel,
               attributeDefinition = x$attributeList$attribute[[j]]$attributeDefinition)
      })
      
  return(out)  
})
dim_units <- data.frame(t(do.call(cbind, dim_units)))

dim_units

If dimensionless units are found, first check the attributeDefinition, attributeLabel, and attributeName to see if dimensionless seems to be an appropriate unit for the attribute. If there is any question about whether or not dimensionless seems appropriate, ask another member of the data team. If there is still any question about what the unit should be, reach out to the submitter and ask for clarification.