Smithsonian / CCN-Data-Library

The Coastal Carbon Network Data Library: An open-source database featuring carbon data from tidal wetlands around the world
https://serc.si.edu/coastalcarbon
5 stars 2 forks source link

Investigate conflicting Site IDs #55

Closed mlonneman closed 2 years ago

mlonneman commented 4 years ago

The Atlas application indicates there may be some issues in mismatching/missing site- and study IDs between the core and depthseries table. All synthesis tables need to be examined to see what the issue might be.

From the Atlas repo:

# The vast majority of the data does not have study and site ID data attached
# Yet this information should be included based on the CCRCN guidance. 
# Since the data type generation script also uses this information, I'll add it to the depth series script here 

CCRCN_depthseries <- CCRCN_depthseries %>%
  select(-site_id)

# Merge study ID from core to depth series 
ids <- CCRCN_cores %>%
  select(core_id, study_id, site_id) 
CCRCN_depthseries <- merge(CCRCN_depthseries, ids, by=c("study_id", "core_id"), all.x=TRUE, all.y=FALSE)

See related issue https://github.com/Smithsonian/CCRCN-Data-Library-Map/issues/145

jaxinewolfe commented 3 years ago

@mlonneman Is this still a current problem with the updated Atlas?

jaxinewolfe commented 2 years ago

We've been through some hook script revisions since this was posted. I ran this code snippet and there doesn't appear to be any mismatches anymore.