https://github.com/ailich/wfs_multibeam_metadata
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.0%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: ailich
- Language: R
- Default Branch: main
- Size: 87.7 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created about 5 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
README.Rmd
---
title: "WFS Multibeam Metadata Sheet"
author: "Alexander Ilich"
date: "`r format(Sys.time(), '%B %d, %Y %H:%M')`"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE) #Default chunk options
```
This compilation of West Florida Shelf Multibeam data is largely for internal usage of the [C-SCAMP](https://www.marine.usf.edu/scamp/) and [COMIT](https://www.marine.usf.edu/comit/) groups at the University of South Florida College of Marine Science. This is a living document that will change as more data is collected, discovered, and reprocessed. The metadata csv/xlsx miles and the GIS vector files (shp and gpkg files) may be useful for others to understand the nature and location of various data sets that exist. The Server_Path represents the location of the data on the C-SCAMP/COMIT servers and are therefore not directly accessible to those outside the organization. In the long term, these data sets collected by C-SCAMP and COMIT will be made publicly available via [NCEI](https://www.ncei.noaa.gov/maps/bathymetry/). In the mean time, these data sets can be requested by emailing comit-data@usf.edu. Data sets collected by external groups may be available by at the specified URL in the metadata spreadsheet.
```{r include=FALSE}
library(tidyverse)
library(writexl)
library(terra)
library(sf)
mb_df<- read_csv("input_filepaths_sorted.csv")
if(file.exists("Multibeam_metadata.csv")){
mb_old<- read_csv("Multibeam_metadata.csv") %>% select(ID, Server_Location)
} else{
mb_old<- tibble(ID=NA_real_, Server_Location=NA_character_, .rows = 0)
}
names(mb_old)[2]<- "Old_Server_Location"
mb_df<- bind_cols(mb_df[,1:which(names(mb_df)=="Type")],
tibble(Resolution=NA_real_, Units= NA_character_, Projection_Description=NA_character_, Projection=NA_character_, Ellipsoid=NA_character_, .rows = nrow(mb_df)),
mb_df[,(which(names(mb_df)=="Type")+1):ncol(mb_df)]) #Add columns to fill in with new information
mb_df<- mb_df %>% left_join(mb_old, by="ID")
mb_df<- st_sf(cbind(mb_df, st_sf(geometry = st_sfc(lapply(1:nrow(mb_df), function(x) st_multipolygon()))))) #Make spatial
st_crs(mb_df)<- "EPSG:4326" #Add projection
if(file.exists("Multibeam_metadata.gpkg")){
mb_shp<- st_read("Multibeam_metadata.gpkg",quiet=TRUE)
for (i in 1:nrow(mb_df)) {
if(isTRUE(mb_df$Server_Location[i]==mb_df$Old_Server_Location[i])){
curr_geom<- st_geometry(mb_shp[which(mb_shp$Server_Location == mb_df$Server_Location[i]),])
if(!st_is_empty(curr_geom)){
mb_df$geometry[i]<- curr_geom
}
}
}
} # Use existing footprints if file has already been created
for (i in 1:nrow(mb_df)) {
if(!is.na(mb_df$Server_Location[i])){
if(str_detect(mb_df$Server_Location[i], "^NFWF")){
prefix<-"Z://"
} else if(str_detect(mb_df$Server_Location[i], "^comit_wrk")){
prefix<- "Y://"
} else{
warning(paste0(mb_df$Server_Location[i], "not on NFWF or comit_wrk server"))
prefix<- ""
} #NFWF mapped to Z and comit_wrk mapped to Y
f_name<- paste0(prefix, str_remove(str_remove(mb_df$Server_Location[i], "^NFWF/"), "^comit_wrk/"))
if(!file.exists(f_name)){stop("Error: File does not exist")}
r<- rast(f_name)
if(st_is_empty(mb_df[i,])){
shp<- (r < Inf) %>%
as.polygons(dissolve=TRUE, values=FALSE, na.rm=TRUE) %>%
fillHoles() %>%
st_as_sf() %>%
st_transform("EPSG:4326")
mb_df$geometry[i]<- st_geometry(shp)
} # Only generate footprints if it doesn't exist
proj_string<- as.character(crs(r, proj=TRUE))
Projection<- suppressWarnings(str_extract(proj_string, regex("(?<=proj=)[[:alpha:]]+")))
Zone<-suppressWarnings(str_extract(proj_string, regex("(?<=zone=)[[:digit:]]+")))
Ellipsoid<-suppressWarnings(str_extract(proj_string, regex("(?<=datum=)[[:alnum:]]+")))
if(is.na(Ellipsoid)){
Ellipsoid<- suppressWarnings(str_extract(proj_string, regex("(?<=ellps=)[[:alnum:]]+")))
}
if(is.na(Ellipsoid)){
Ellipsoid<- paste(unlist(str_extract_all(proj_string, "\\+((rf)|(f)|(a)|(b))=[^ ]+")), collapse = " ")
}
if(!is.na(Zone)){
Projection<- paste(Projection, Zone)
}
Units<- suppressWarnings(str_extract(proj_string, regex("(?<=units=)[[:alpha:]]+")))
mb_df$Filename[i]<- basename(mb_df$Server_Location[i])
mb_df$Resolution[i]<- xres(r)
mb_df$Units[i]<- Units
mb_df$Projection_Description[i]<- as.character(crs(r, describe=TRUE, parse=TRUE)[1])
mb_df$Projection[i]<- Projection
mb_df$Ellipsoid[i]<- Ellipsoid
}}
mb_df<- mb_df %>% select(-Old_Server_Location) # drop column
write_csv(st_drop_geometry(mb_df), "Multibeam_metadata.csv", append=FALSE)
write_xlsx(st_drop_geometry(mb_df), "Multibeam_metadata.xlsx")
st_write(mb_df, "Multibeam_metadata.gpkg", append = FALSE)
st_write(mb_df, "Multibeam_metadata.shp", append = FALSE)
write_csv(st_drop_geometry(mb_df), "Z://2_Projects/GIS/Multibeam_Metadata_And_Footprints_AI/Multibeam_metadata.csv", append=FALSE)
write_xlsx(st_drop_geometry(mb_df), "Z://2_Projects/GIS/Multibeam_Metadata_And_Footprints_AI/Multibeam_metadata.xlsx")
st_write(mb_df, "Z://2_Projects/GIS/Multibeam_Metadata_And_Footprints_AI/Multibeam_metadata.gpkg", append = FALSE)
st_write(mb_df, "Z://2_Projects/GIS/Multibeam_Metadata_And_Footprints_AI/Multibeam_metadata.shp", append = FALSE)
```
```{r}
options(knitr.kable.NA = '')
knitr::kable(st_drop_geometry(mb_df), format = "pipe", digits = 5, align = "c")
```
Owner
- Name: Alex
- Login: ailich
- Kind: user
- Repositories: 5
- Profile: https://github.com/ailich
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 8
- Total pull requests: 0
- Average time to close issues: 9 months
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 0
- Average comments per issue: 0.38
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ailich (7)
- 7yl4r (1)
Pull Request Authors
Top Labels
Issue Labels
documentation (2)