Skip to content

Commit

Permalink
updating stac
Browse files Browse the repository at this point in the history
  • Loading branch information
jzwart committed Feb 8, 2024
1 parent 67d7166 commit 305c911
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 680 deletions.
6 changes: 4 additions & 2 deletions catalog/noaa_forecasts/noaa_forecasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ noaa_description_create <- data.frame(site_id = 'For forecasts that are not on a
noaa_theme_df <- arrow::open_dataset(arrow::s3_bucket(paste0(config$noaa_forecast_bucket,"stage2/parquet/0/2023-08-01/feea"), endpoint_override = config$noaa_endpoint, anonymous = TRUE))


noaa_theme_dates <- arrow::open_dataset(arrow::s3_bucket(paste0(config$noaa_forecast_bucket,"stage2/parquet/"), endpoint_override = config$noaa_endpoint, anonymous = TRUE)) |>
noaa_theme_dates <- arrow::open_dataset(arrow::s3_bucket(paste0(config$driver_bucket,"/gefs-v12/stage2"),
endpoint_override = config$endpoint,
anonymous = TRUE)) |>
dplyr::summarise(min(datetime),max(datetime)) |>
collect()
noaa_min_date <- noaa_theme_dates$`min(datetime)`
Expand Down Expand Up @@ -75,7 +77,7 @@ stac4cast::build_forecast_scores(table_schema = noaa_theme_df,
## BUILD VARIABLE GROUPS
## find group sites
find_noaa_sites <- read_csv(config$site_table) |>
distinct(field_site_id)
distinct(site_id)

for (i in 1:length(config$noaa_forecast_groups)){ ## organize variable groups
print(config$noaa_forecast_groups[i])
Expand Down
61 changes: 9 additions & 52 deletions catalog/sites/build_sites_page.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,17 @@ config <- yaml::read_yaml('challenge_configuration.yaml')
catalog_config <- config$catalog_config

## CREATE table for column descriptions
site_description_create <- data.frame(field_domain_id = 'domain identifier',
field_site_id = 'site identifier',
field_site_name = 'site name',
terrestrial = 'binary indicator for variable group',
aquatics = 'binary indicator for variable group',
phenology = 'binary indicator for variable group',
ticks = 'binary indicator for variable group',
beetles = 'binary indicator for variable group',
phenocam_code = 'code used for phenocam',
phenocam_roi = 'phenocam region of interest',
phenocam_vegetation = 'phenocam vegetation type',
field_site_type = 'site type',
field_site_subtype = 'site subtype',
field_colocated_site = 'sites that are colocated',
field_site_host = 'host site',
field_site_url = 'host site url',
field_nonneon_research_allowed = 'is non-neon research allowed',
field_access_details = 'details for accessing the site',
field_neon_field_operations_office = 'operations office for neon site',
site_description_create <- data.frame(site_id = 'site identifier',
project_id = 'forecast challenge identifier',
agency_cd = 'organization / agency responsible for site monitoring',
site_no = 'National Water Information System stream gage identifier',
station_nm = 'National Water Information System station long name',
site_tp_cd = 'National Water Information System site type code; https://maps.waterdata.usgs.gov/mapper/help/sitetype.html',
latitude = 'site latitude',
longitude = 'site longitude',
field_geodetic_datum = 'geodetic coordinates for site',
field_utm_northing = 'northing utm for site',
field_utm_easting = 'easting utm for site',
field_utm_zone = 'utm zone for site',
field_site_county = 'county where site is located',
field_site_state = 'state where site is located',
field_site_country = 'country where site is located',
field_mean_elevation_m = 'mean site elevation in meters',
field_minimum_elevation_m = 'minimum site elevation in meters',
field_maximum_elevation_m = 'maximum site elevation in meters',
field_mean_annual_temperature_C = 'annual temperature of site in degrees C',
field_mean_annual_precipitation_mm = 'mean annual precipitation at site in mm',
field_dominant_wind_direction = 'dominant wind direction at site',
field_mean_canopy_height_m = 'mean canopy height at site',
field_dominant_nlcd_classes = 'dominant nlcd classes at site',
field_domint_plant_species = 'dominant plant species at site',
field_usgs_huc = 'USGS Hyrdrologic Unit Code (HUC) for site',
field_watershed_name = 'watershed name for site',
field_watershed_size_km2 = 'watershed size for site in square kilometers',
field_lake_depth_mean_m = 'mean lake depth at site in meters',
field_lake_depth_max_m = 'maximum lake depth in meters',
field_tower_height_m = 'tower height at site in meters',
field_usgs_geology_unit = 'USGS geology unit for site',
field_megapit_soil_family = 'magapit soil family at site',
field_soil_subgroup = 'soil subgroup at site',
field_avg_number_of_green_days = 'average number of green days at site',
field_avg_grean_increase_doy = 'average green increase for day of year',
field_avg_green_max_doy = 'average green maximum for day of year',
field_avg_green_decrease_doy = 'average green decrease for day of year',
field_avg_green_min_doy = 'average green minimum for day of year',
field_phenocams = 'phenocam details for site',
field_number_tower_levels = 'number of tower levels at site',
neon_url = 'neon URL for site')
site_url = 'National Water Information System URL for monitoring site',
colocated = '', # TODO: what is colocated?
queryTime = 'timestamp when site metadata was retrieved')

#inventory_theme_df <- arrow::open_dataset(glue::glue("s3://{config$inventory_bucket}/catalog/forecasts/project_id={config$project_id}"), endpoint_override = config$endpoint, anonymous = TRUE) #|>

Expand Down
277 changes: 0 additions & 277 deletions catalog/summaries/Aquatics/Daily_Dissolved_oxygen/collection.json

This file was deleted.

Loading

0 comments on commit 305c911

Please sign in to comment.