This file contains hidden or 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
| import sys, os, glob, winsound | |
| import arcpy | |
| from arcpy.sa import * | |
| from arcpy import env | |
| arcpy.CheckOutExtension('spatial') | |
| arcpy.env.overwriteOutput = True | |
| ## List of rasters to project/sample to that of raster list 2 | |
| dataPath1 = r"I:\Data\USDM\GRACE_Grid" | |
| dataPath2 = r"I:\Data\NLDAS\Reclassify\Levels\ewp" |
This file contains hidden or 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
| library(car) | |
| library(MASS) | |
| library(ggplot2) | |
| library(viridisLite) | |
| setwd("C:/Users/mpodebradska2/Desktop/School/Thesis/Indices_analysis/VegDRI") | |
| VegDRI <- read.csv("VegDRI.csv", header = TRUE) | |
| names(VegDRI) <- c( "2009", "2010", "2011", "2012", "2013","2014", "2015", "2016") | |
| Productivity <- read.csv("prod_anomaly.csv", header = TRUE) | |
| Productivity <- Productivity[-480,-c(1,2,3,4,5,6,7,8,9)] |
This file contains hidden or 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
| library(car) | |
| library(MASS) | |
| library(ggplot2) | |
| library(viridisLite) | |
| setwd("/Users/marketa/Library/Mobile Documents/com~apple~CloudDocs/School/Thesis/SPI") | |
| SPI6m <- read.csv("SPI6m.csv", header = TRUE) | |
| names(SPI6m) <- c("2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013","2014", "2015", "2016") | |
| Productivity <- read.csv("prod_anomaly.csv", header = TRUE) | |
| names(Productivity) <- c("2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013","2014", "2015", "2016") |
This file contains hidden or 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
| setwd("C:/Users/mpodebradska2/Desktop") | |
| all_content <- readLines("data.csv") | |
| skip_second <- all_content[-2] | |
| my_data <- read.csv(textConnection(skip_second), header = TRUE, stringsAsFactors = FALSE) | |
| my_data$TF <- my_data$X.1>=my_data$State..WWDT. |
This file contains hidden or 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
| in_table = 'C:\Users\mpodebradska2\Documents\ArcGIS\Thesis_New\Table.dbf' | |
| field_names = ['Plan_Name', 'Plan_Nam_1', 'Plan_Nam_2', 'Plan_Nam_3'] | |
| all_values = [] | |
| with arcpy.da.SearchCursor(in_table,field_names) as cursor: | |
| for row in cursor: | |
| all_values.extend(list(row)) | |
| unique_values = set(all_values) | |
| print unique_values |
This file contains hidden or 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
| install.packages("ncdf4") | |
| install.packages("purrr") | |
| library(ncdf4) | |
| library(purrr) | |
| setwd("/Users/marketa/Library/Mobile Documents/com~apple~CloudDocs/School/Thesis") | |
| #reading the NetCDF file and getting specific variables | |
| f <- nc_open("20180527_1441_historic_SPI_6_month.nc") | |
| time <- ncdf4::ncvar_get(f, varid = "time") |
NewerOlder