diff --git a/DataCleaningScripts/update_ndvi.R b/DataCleaningScripts/update_ndvi.R index 2c8d2c10..14d2b275 100644 --- a/DataCleaningScripts/update_ndvi.R +++ b/DataCleaningScripts/update_ndvi.R @@ -30,7 +30,7 @@ create_portal_area <- function(centroid = c(-109.08029, 31.937769), #transform to NAD83(NSRS2007)/California Albers center_transform <- sf::st_as_sf(center) %>% sf::st_transform(3488) portal_area_transform <- suppressWarnings(as(sf::st_buffer(center_transform, 1000, ), 'Spatial')) - portal_area <- sf::st_transform(portal_area_transform, sf::st_crs("+proj=utm +zone=12 + portal_area <- sp::spTransform(portal_area_transform, sp::CRS("+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 ")) return(portal_area) diff --git a/install-packages.R b/install-packages.R index eb54084b..50ca6925 100644 --- a/install-packages.R +++ b/install-packages.R @@ -1,18 +1,35 @@ -# Install pacman if it isn't already installed - -if ("pacman" %in% rownames(installed.packages()) == FALSE) install.packages("pacman") - remove.packages("stringi") remove.packages("stringr") -install.packages(c("Rcpp","stringi","stringr","RCurl","curl","Hmisc", "EML", "sf","rgdal","lwgeom", "git2r","remotes"), type="source", repos="https://cran.rstudio.com") +install.packages(c("curl", + "EML", + "git2r", + "Hmisc", + "lwgeom", + "Rcpp", + "RCurl", + "remotes", + "rgdal", + "stringi", + "stringr", + "sf"), type="source", repos="https://cran.rstudio.com") install.packages('terra', repos='https://rspatial.r-universe.dev') remotes::install_github("htmltab/htmltab") # Install analysis packages using pacman +if ("pacman" %in% rownames(installed.packages()) == FALSE) install.packages("pacman") -# pacman::p_load(units, sf, rgdal, lwgeom, shiny, stringi, stringr, Hmisc, dplyr, git2r, openxlsx, lubridate, htmltab, -# lunar, jsonlite, devtools, sp, sqldf, raster, RCurl, EML, testthat, zoo, tidyr, semver, yaml) - - -pacman::p_load(units, shiny, dplyr, openxlsx, lubridate, htmltab, - lunar, jsonlite, devtools, sp, sqldf, raster, testthat, zoo, tidyr, semver, yaml) +pacman::p_load(devtools, + dplyr, + jsonlite, + lubridate, + lunar, + openxlsx, + semver, + shiny, + sp, + sqldf, + testthat, + tidyr, + units, + yaml, + zoo)