View source: R/create_time_series.R
create_time_series | R Documentation |
Create Time Series
create_time_series( rasters, x = 3.57, y = 50.35, years, start_week = 1, end_week = 52 )
rasters |
An output from |
x |
An x coordinate (longitude) |
y |
A y coordinate (latitude) |
years |
A vector stating for which years the time series will be extracted |
start_week |
A number of first week in the output RasterStack. The default is 1 |
end_week |
A number of last week in the output RasterStack. The default is 52 |
A data.frame with three columns: time, value, variable.
## Not run: Path <- "C:/Google Drive/Corvus Geostat - Jakub Nowosad/" Path <- "../corvus_dynamic_outputs/" input_file <- paste0(Path,"NetCDF/DxResults_Cc_2010-2015.nc") AllYears <- extract_data_list(input_file, "Weekly Growth Index", years = 2000:2014) rasters <- create_raster_stack(AllYears, years = 2000:2014) cts <- create_time_series(rasters, years = 2000:2014, x = 3.57, y = 50.35) library(ggplot2) ggplot(cts, aes(time, value)) + geom_line() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.