Skip to content

Commit

Permalink
Merge pull request #93 from ocean-tracking-network/stamen-to-stadia
Browse files Browse the repository at this point in the history
Stamen to stadia
  • Loading branch information
CaitlinBate authored Jan 3, 2024
2 parents dbffb8f + 990db8f commit 70aaf51
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
24 changes: 12 additions & 12 deletions _episodes/05-r-telemetry-report-array.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ names(full_receivers)
#make a basemap for all of the stations, using the min/max deploy lat and longs as bounding box
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(full_receivers$stn_long),
bottom = min(full_receivers$stn_lat),
right = max(full_receivers$stn_long),
top = max(full_receivers$stn_lat)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 6)
Expand Down Expand Up @@ -84,12 +84,12 @@ We can do the same exact thing with the deployment metadata from OUR project onl
names(proj61_deploy)
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(proj61_deploy$DEPLOY_LONG),
bottom = min(proj61_deploy$DEPLOY_LAT),
right = max(proj61_deploy$DEPLOY_LONG),
top = max(proj61_deploy$DEPLOY_LAT)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 5)
Expand Down Expand Up @@ -279,12 +279,12 @@ names(teq_deploy)
#make a basemap for your stations, using the min/max deploy lat and longs as bounding box
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(teq_deploy$DEPLOY_LONG),
bottom = min(teq_deploy$DEPLOY_LAT),
right = max(teq_deploy$DEPLOY_LONG),
top = max(teq_deploy$DEPLOY_LAT)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 8)
Expand Down Expand Up @@ -495,12 +495,12 @@ names(glatos_receivers)
#make a basemap for all of the stations, using the min/max deploy lat and longs as bounding box
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(glatos_receivers$deploy_long),
bottom = min(glatos_receivers$deploy_lat),
right = max(glatos_receivers$deploy_long),
top = max(glatos_receivers$deploy_lat)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 8)
Expand Down Expand Up @@ -546,12 +546,12 @@ ggsave(plot = glatos_map, filename = "glatos_map.tiff", units="in", width=15, he
We can do the same exact thing with the deployment metadata from OUR project only! This will use metadata imported from our Workbook.

~~~
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(walleye_recievers$DEPLOY_LONG),
bottom = min(walleye_recievers$DEPLOY_LAT),
right = max(walleye_recievers$DEPLOY_LONG),
top = max(walleye_recievers$DEPLOY_LAT)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 8)
Expand Down Expand Up @@ -698,12 +698,12 @@ library(ggmap)
names(gmr_deploy)
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(gmr_deploy$DEPLOY_LONG),
bottom = min(gmr_deploy$DEPLOY_LAT),
right = max(gmr_deploy$DEPLOY_LONG),
top = max(gmr_deploy$DEPLOY_LAT)),
maptype = "terrain",
maptype = "stamen_terrain",
crop = FALSE,
zoom = 12)
Expand Down
16 changes: 8 additions & 8 deletions _episodes/06-r-telemetry-report-tagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Where were my fish observed? We will make a static map of all the receiver stati
First, we set a basemap using the aesthetics and bounding box we desire. Next, we add the detection locations onto the basemap and look at our creation!

~~~
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(proj58_matched_full_no_release$longitude),
bottom = min(proj58_matched_full_no_release$latitude),
right = max(proj58_matched_full_no_release$longitude),
top = max(proj58_matched_full_no_release$latitude)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 5)
Expand Down Expand Up @@ -349,12 +349,12 @@ Where were my fish observed? We will make a static map of all the receiver stati
First, we set a basemap using the aesthetics and bounding box we desire. Next, we add the detection locations onto the basemap and look at our creation!

~~~
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(tqcs_matched_10_11$longitude),
bottom = min(tqcs_matched_10_11$latitude),
right = max(tqcs_matched_10_11$longitude),
top = max(tqcs_matched_10_11$latitude)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 8)
Expand Down Expand Up @@ -645,12 +645,12 @@ Where were my fish observed? We will make a static map of all the receiver stati
First, we set a basemap using the aesthetics and bounding box we desire. Next, we add the detection locations onto the basemap and look at our creation!

~~~
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(all_dets$deploy_long),
bottom = min(all_dets$deploy_lat),
right = max(all_dets$deploy_long),
top = max(all_dets$deploy_lat)),
maptype = "terrain-background",
maptype = "stamen_terrain_background",
crop = FALSE,
zoom = 8)
Expand Down Expand Up @@ -913,12 +913,12 @@ Where were my fish observed? We will make a static map of all the receiver stati
First, we set a basemap using the aesthetics and bounding box we desire. Next, we add the detection locations onto the basemap and look at our creation!

~~~
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(gmr_matched_18_19_no_release$longitude),
bottom = min(gmr_matched_18_19_no_release$latitude),
right = max(gmr_matched_18_19_no_release$longitude),
top = max(gmr_matched_18_19_no_release$latitude)),
maptype = "terrain",
maptype = "stamen_terrain",
crop = FALSE,
zoom = 12)
Expand Down
4 changes: 2 additions & 2 deletions _episodes/11-act-actel.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@ actel_receivers <- actel_receivers %>% filter(Station.name %in% actel_deployment
actel_spatial_sum <- actel_spatial_sum %>% filter(Station.name %in% actel_deployments$Station.name)
base <- get_stamenmap(
base <- get_stadiamap(
bbox = c(left = min(actel_deployments$deploy_long),
bottom = min(actel_deployments$deploy_lat),
right = max(actel_deployments$deploy_long),
top = max(actel_deployments$deploy_lat)),
maptype = "toner",
maptype = "stamen_toner",
crop = FALSE,
zoom = 12)
Expand Down
2 changes: 1 addition & 1 deletion _episodes/12-basic-animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ basemap <-
bottom = min(one_fish$mean_latitude),
right = max(one_fish$mean_longitude),
top = max(one_fish$mean_latitude)),
maptype = "stamen_toner_-_lite",
maptype = "stamen_toner_lite",
crop = FALSE,
zoom = 8)
Expand Down
2 changes: 2 additions & 0 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ install.packages('lubridate')

# GGmap - complimentary to ggplot2, which is in the Tidyverse
install.packages('ggmap')
#This is a temporarily available API key you can use for plotting StadiaMaps in ggmap this workshop. You SHOULD NOT rely on this key being available after the workshop.
ggmap::register_stadiamaps("b01d1235-69e8-49ea-b3bd-c35b42424b00")

# Plotly - Interactive web-based data visualization
install.packages('plotly')
Expand Down

0 comments on commit 70aaf51

Please sign in to comment.