generated from ecohealthalliance/container-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GLW, elevation, and grazing capacity commit
- Loading branch information
Showing
7 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
get_glw <- function() { | ||
|
||
url_cattle <- "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/LHBICE#" | ||
url_cattle_out <- GET(url_cattle) | ||
unzipped_glw_cattle <- unzip(url_cattle_out) | ||
Aw_layer <- if_else(str_detect(names(unzipped_glw_cattle), "Aw")==TRUE, ) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
get_glw <- function() { | ||
|
||
url_cattle <- "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/LHBICE#" | ||
#taxa cattle sheep goat have three urls here switch function (like if_else); have the three targets | ||
url_cattle_out <- GET(url_cattle) | ||
unzipped_glw_cattle <- unzip(url_cattle_out) | ||
Aw_layer <- if_else(str_detect(names(unzipped_glw_cattle), "Aw")==TRUE, ) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
get_glw <- function() { | ||
|
||
url_cattle <- "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/LHBICE#" | ||
url_cattle_out <- GET(url_cattle) | ||
unzipped_glw_cattle <- unzip(url_cattle_out) | ||
Aw_layer <- if_else(str_detect(names(unzipped_glw_cattle), "Aw")==TRUE, ) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param bounding_boxes | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
preprocess_glw <- function(glw_layer, bounding_boxes) { | ||
|
||
extent_object <- extent(bounding_boxes) | ||
glw_layer_out <- crop(glw_layer, extent_object) | ||
return(glw_layer_out) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param bounding_boxes | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
process_elevation <- function(elevation_layer_raw, bounding_boxes) { | ||
|
||
extent_object <- extent(bounding_boxes) | ||
elevation_layer_raw_out <- crop(elevation_layer_raw, extent_object) | ||
|
||
return(elevation_layer_raw_out) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#' .. content for \description{} (no empty lines) .. | ||
#' | ||
#' .. content for \details{} .. | ||
#' | ||
#' @title | ||
#' @param bounding_boxes | ||
#' @return | ||
#' @author Whitney Bagge | ||
#' @export | ||
preprocess_glw <- function(glw_layer, bounding_boxes) { | ||
|
||
extent_object <- extent(bounding_boxes) | ||
glw_layer_out <- crop(glw_layer, extent_object) | ||
return(glw_layer_out) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters