Skip to content

Commit

Permalink
conflict merge
Browse files Browse the repository at this point in the history
Merge branch 'main' of https://github.com/marinebon/aquamaps-downscaled

# Conflicts:
#	sp-map/functions.R
  • Loading branch information
bbest committed Oct 10, 2023
2 parents c7fd22d + d9e00f0 commit ab3dfa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sp-map/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ get_sp_info <- function(sp_key, verbose = F){
# - look at speciesoccursum_r.StockDefs multiple stock definitions / lifestage per sp?
# tbl(am_db, "speciesoccursum_r")

sp_key_is_numeric <- !grepl("\\D", sp_key)
if (sp_key_is_numeric)
sp_key <- as.numeric(sp_key)

if (is.numeric(sp_key)){
d_hspen <- tbl(am_db, "hspen_r") |>
filter(Speccode == !!sp_key) |>
Expand Down Expand Up @@ -275,6 +279,7 @@ get_sp_info <- function(sp_key, verbose = F){
"PrefMax" , 1,
"Max" , 0)

# browser()
d_env <- d_hspen |>
select(starts_with(vars_yes)) |>
select(!ends_with("YN")) |>
Expand Down
6 changes: 6 additions & 0 deletions sp-map/global.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# RESOLUTION ----
# 1 decimal degree = 111 km (or 60 nautical miles) at equator
# AquaMaps at 0.5 ° :1/2 ° = 55.5 km
# GEBCO at 15 arc-second :1/240 ° = 0.4625 km
# sdmpredictors: Bio-ORACLE at 5 arc-minute :1/12 ° = 9.25 km

Sys.setenv(
EARTHENGINE_GCLOUD = "/usr/bin/gcloud",
EARTHENGINE_PYTHON = "/opt/venv/rgee/bin/python",
Expand Down

0 comments on commit ab3dfa6

Please sign in to comment.