Re: [R-sig-Geo] Did I correctly convert my data from UTM zone 12 to 11?

2023-08-08 Thread Alexander Ilich
If the vast majority of your data was within one UTM zone and only a small amount bled over into the adjacent UTM zone then it'd probably just be ok to choose the one that contains the majority of your data and accept that there will be some distortion. Since it's roughly 50/50 though, you

Re: [R-sig-Geo] Merge dataframe with NetCDF file

2023-05-19 Thread Alexander Ilich
The WriteRaster should be able to do it (https://stackoverflow.com/questions/50026442/writing-r-raster-stack-to-netcdf). Also, if practical, I'd recommend switching from the raster package to the terra package which has replaced it and is written by the same author. The syntax is almost

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-18 Thread Alexander Ilich
on that may help clarify a few things. https://r4ds.had.co.nz/functions.html https://r-coder.com/sapply-function-r/ ____ From: rain1...@aim.com Sent: Wednesday, May 17, 2023 3:56 PM To: Alexander Ilich ; r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Finding the h

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-17 Thread Alexander Ilich
46 30.75330 30.12109 30.38361 28.64928 30.45568 29.66190 #> [9] 31.57229 31.33907 From: rain1...@aim.com Sent: Tuesday, May 16, 2023 11:13 PM To: Alexander Ilich ; r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Finding the highest and lowest rates of increase at s

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-16 Thread Alexander Ilich
$abs_diff) to somehow evaluating to zero (which I don't see how it could) or if your dataframe is zero rows. From: rain1...@aim.com Sent: Tuesday, May 16, 2023 5:58:22 PM To: Alexander Ilich ; r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Finding the highest

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-16 Thread Alexander Ilich
in(df$abs_diff)] return(min_rate) } # Put all dataframes into a list df_list<- list(df1,df2,df3,df4,df5,df6,df7,df8,df9,df10) # Apply function across list sapply(df_list, ExtractFirstMin) From: rain1...@aim.com Sent: Tuesday, May 16, 2023 12:46 PM To: Alexander Ilic

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-16 Thread Alexander Ilich
t, ExtractFirstMin) #> [1] 29.40269 32.21546 30.75330 30.12109 30.38361 28.64928 30.45568 29.66190 #> [9] 31.57229 31.33907 From: rain1...@aim.com Sent: Monday, May 15, 2023 4:44 PM To: Alexander Ilich ; r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Findin

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-10 Thread Alexander Ilich
] 39 df %>% filter(abs_diff==min(abs_diff)) %>% pull(y) %>% mean() #Average all y values that are closest to x=1 #> [1] 36.5 From: rain1...@aim.com Sent: Wednesday, May 10, 2023 8:13 AM To: Alexander Ilich ; r-sig-geo@r-project.org Subject: Re: [R-

Re: [R-sig-Geo] Finding the highest and lowest rates of increase at specific x value across several time series in R

2023-05-09 Thread Alexander Ilich
I'm currently having a bit of difficultly following. Rather than using your actual data, perhaps you could include code to generate a smaller dataset with the same structure with clear definitions of what is contained within each (r faq - How to make a great R reproducible example - Stack

Re: [R-sig-Geo] getting data from an nc file

2023-01-06 Thread Alexander Ilich
HDF Viewer can be a good way to look at the structure of nc files to see where different information is stored in the file. From: R-sig-Geo on behalf of Nick Wray Sent: Wednesday, November 9, 2022 5:53 AM To:

Re: [R-sig-Geo] Customizing levelplot coloring scheme in r

2022-10-19 Thread Alexander Ilich
You could also try using tmap. Within the tm_raster function you can specify a color palette, what value the midpoint of the color palette should be, and even set the breaks so that you have different ranges on each side of zero (e.g go from -5 to +10 instead of -10 to +10).

Re: [R-sig-Geo] Selecting a range of values in a specific column for R ggplot

2022-10-13 Thread Alexander Ilich
x=RL45), color="red")+ xlab("One-day max (mm/day)") + ggtitle("Global one-day max Return Level (RCP 4.5)") + xlim(300, 450) ____ From: rain1...@aim.com Sent: Thursday, October 13, 2022 2:21 PM To: Alexander Ilich ; bfalevl...@gmail.com ; r

Re: [R-sig-Geo] Selecting a range of values in a specific column for R ggplot

2022-10-13 Thread Alexander Ilich
Make sure to include the comma after the numbers so that you're selecting rows x through y and all columns. For example, GEV[17:21,] not GEV[17:21] From: R-sig-Geo on behalf of rain1290--- via R-sig-Geo Sent: Thursday, October 13, 2022 1:08 PM To:

Re: [R-sig-Geo] Selecting a range of values in a specific column for R ggplot

2022-10-13 Thread Alexander Ilich
The aesthetic is looking for the name of the variable, so try subsetting the dataframe in the data portion instead. newplot <- ggplot(data = GEV[1:4,], aes(x = RL45)) + geom_density(color = "midnightblue") + xlab("Location (mm/day") + ggtitle("Global Location under RCP4.5") + xlim(300, 350)

Re: [R-sig-Geo] Raster Data Management Advice

2022-10-13 Thread Alexander Ilich
Thank you everyone for the advice. I have some things to look into. Thanks, Alex From: Michael Sumner Sent: Sunday, October 9, 2022 5:01 AM To: Alexander Ilich Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Raster Data Management Advice I would set up

[R-sig-Geo] Raster Data Management Advice

2022-10-07 Thread Alexander Ilich
Hi, I was wondering if anyone has some advice on how to organize raster data so that it is easily queryable by various attributes (e.g. find me all the rasters of data type bathymetry, collected by this organization with 10m resolution or finer ). Currently we have data on a server organized often