SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Environmental analysis of crop trials
       using weather data
            Jacob van Etten
            Alberto Labarga
weatherData
This package helps us to:

1. Get data from weather stations

2. Interpolate weather data for any location
Get the packages
install.packages("weatherData", repos="http://R-
Forge.R-project.org")
library(weatherData)
install.packages(“cropData", repos="http://R-
Forge.R-project.org")
library(cropData)
OR:
http://dl.dropbox.com/u/18619554/cropData_1.0.zip
http://dl.dropbox.com/u/18619554/weatherData_1.0.zip
Get additional packages
install.packages(c(“maps”, “vegan”,
“reshape”))

library(maps)
library(vegan)
library(reshape)
Get the script
http://dl.dropbox.com/u/18619554/maizeCA.R

http://goo.gl/Y6h7m
Get the data
We will use the Global Summary of Day (GSOD)
data of NCDC.
ftp://ftp.ncdc.noaa.gov/pub/data/gsod/

Downloading takes a lot of time.
However, we can selectively download part of the
data, in an automatic way.
We will show how to do it with a toy example.
Then we will use data from disk to continue.
Selecting stations first
Select stations within a geographic extent
data(stations)
locsExtent <-c(0,20,40,60)
stationsSelected <- stationsExtent(locsExtent, stations)

Show on a map
plot(stationsSelected[c("LON","LAT")], pch=3, cex=.5)
library(maps)
map("world",add=TRUE, interior=F)
Download the data
Make a working directory first.
setwd(“yourFolder”)

Now download the files to this working directory.
downloadGSOD(2010, 2010, stations = stationsSelected,
silent = FALSE, tries = 2, overwrite = FALSE)

After a few downloads, kill the process by pressing “Esc”.

Inspect what you have in “yourFolder” and delete the
downloaded files.
Read the data into R
Copy the data we have provided you into
“yourFolder”.

The following lines will make a table and remove
missing observations.

weather <- makeTableGSOD()
weather <- na.omit(weather)
fix(weather)
Getting some trial data
The idea is to link weather data to crop trial data.
We get some trial data that was incorporated in
the package.

trial <-
read.csv(system.file("external/trialsCA.csv",
package="cropData"))
locs <-
read.csv(system.file("external/locationsCA.csv",
package="cropData"))
Make a quick map
stationsSelected <- stationsExtent(c(-110,-
60,5,25), stations)

plot(stationsSelected[c("LON","LAT")], pch=3,
cex=.5)
points(locs[c("LON","LAT")], pch=15)
map("world",add=TRUE, interior=F)
Interpolation
We have already seen interpolation at work.

Now we use interpolation to estimate weather
variables for the trial locations.

The function interpolateDailyWeather()
automatically interpolates the weather
surface for each day and extracts the values
for each trial location.
Interpolate
Interpolate weather for the years 2003, 2004 and
2005.
ipW2003 <- interpolateDailyWeather(
tableGSOD = weatherCA,
locations = locs[c("ID", "LON", "LAT", "ALT")],
startDate="2003-5-15",
endDate="2003-9-25",
stations = stationsSelected)
Repeat for the other years and then combine:
ipW <- rbind(ipW2003,ipW2004,ipW2005)
Thermal stress

                   Minimum is          Duration of
                   assumed to          T > 30 °C =
                   be at sunrise.      4.8 h
Temperature (°C)




                                            Maximum is
                                            assumed to
                                            be 2 h after
                                            solar noon.




                                    Time
Derive ecophysiological vars
?thermalStressDaily
Run the example to see how this works.
Then:
TEMPSTRESS30 <- thermalStressSeasonal(30,
ipW, trial, locs)
PREC <- precipitationSeasonal(ipW, trial)
RADIATION <- radiationSeasonal(ipW, trial, locs)

trial <- cbind(trial, TEMPSTRESS30, PREC,
RADIATION)
Do RDA on residuals
Instead of a normal PCA, we constrain the
axes of the PCA with linear combinations of
the ecophysiological variables.

This type of constrained PCA is called
redundancy analysis (RDA)
Do ANOVA
m <- lm(Yield ~ Variety + Location + Plant.m2,
data=tr2005)
G + GxE are left over, the rest is filtered out

tr2005$Yield <- residuals(m)
tr2005 <-
tr2005[,c("Variety","Location","Yield")]
Make table ready for RDA
tr2005 <- melt(tr2005)
tr2005 <- acast(tr2005, Location ~ Variety)

env2005 <- trial[trial$Year == 2005, c("Location",
"TEMPSTRESS30", "PRECSUM", "PRECCV",
"RADIATION")]
env2005 <- unique(env2005)
rownames(env2005) <- env2005$Location
env2005 <- env2005[,-1]
RDA
rda2005 <- rda(tr2005, env2005)
summary(rda2005)
plot(rda2005)
Putting GxE on map
It is possible to use the resulting RDA model to
predict for any locations.
The steps would be:
1. Interpolate weather variables for new
     location
2. Derive ecophysiological variables
3. Predict yield value for this new location
     (not taking into account additive
     environmental effect)
Final remarks
Trial data are often noisy – extracting the
signal from the data is the objective

Many environmental variables are difficult to
measure, but can be taken to be “random” in
the analysis

Many statistical tools exist to link weather
data to crop trial data.

Weitere ähnliche Inhalte

Was ist angesagt?

FxUG@東京 第157回 ANE 20分/*くらい*/クッキング
FxUG@東京 第157回 ANE 20分/*くらい*/クッキングFxUG@東京 第157回 ANE 20分/*くらい*/クッキング
FxUG@東京 第157回 ANE 20分/*くらい*/クッキングHiiragi3
 
IoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLIoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLBlaine Carter
 
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...Claudia Vitolo
 
Climate data in r with the raster package
Climate data in r with the raster packageClimate data in r with the raster package
Climate data in r with the raster packageAlberto Labarga
 
Pig TPC-H Benchmark and Performance Tuning
Pig TPC-H Benchmark and Performance TuningPig TPC-H Benchmark and Performance Tuning
Pig TPC-H Benchmark and Performance TuningJie Li
 
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]Accumulo Summit
 
Postgres performance for humans
Postgres performance for humansPostgres performance for humans
Postgres performance for humansCraig Kerstiens
 

Was ist angesagt? (9)

FxUG@東京 第157回 ANE 20分/*くらい*/クッキング
FxUG@東京 第157回 ANE 20分/*くらい*/クッキングFxUG@東京 第157回 ANE 20分/*くらい*/クッキング
FxUG@東京 第157回 ANE 20分/*くらい*/クッキング
 
IoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLIoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQL
 
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...
Data Assimilation for the Lorenz (1963) Model using Ensemble and Extended Kal...
 
Climate data in r with the raster package
Climate data in r with the raster packageClimate data in r with the raster package
Climate data in r with the raster package
 
Pig TPC-H Benchmark and Performance Tuning
Pig TPC-H Benchmark and Performance TuningPig TPC-H Benchmark and Performance Tuning
Pig TPC-H Benchmark and Performance Tuning
 
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
 
Postgres performance for humans
Postgres performance for humansPostgres performance for humans
Postgres performance for humans
 
Test code
Test codeTest code
Test code
 
R and cpp
R and cppR and cpp
R and cpp
 

Andere mochten auch

Taller de visualización de datos - Gephi
Taller de visualización de datos - GephiTaller de visualización de datos - Gephi
Taller de visualización de datos - GephiAlberto Labarga
 
Gephi Tutorial Visualization
Gephi Tutorial VisualizationGephi Tutorial Visualization
Gephi Tutorial VisualizationGephi Consortium
 
El Sociograma Presentacion
El Sociograma PresentacionEl Sociograma Presentacion
El Sociograma Presentaciondeborabarest
 
Ejemplo de sociograma
Ejemplo de sociogramaEjemplo de sociograma
Ejemplo de sociogramaJuanitoaragon
 
Facebook Network Analysis using Gephi
Facebook Network Analysis using GephiFacebook Network Analysis using Gephi
Facebook Network Analysis using GephiSarah Joy Murray
 

Andere mochten auch (7)

Taller de visualización de datos - Gephi
Taller de visualización de datos - GephiTaller de visualización de datos - Gephi
Taller de visualización de datos - Gephi
 
Gephi Tutorial Layouts
Gephi Tutorial LayoutsGephi Tutorial Layouts
Gephi Tutorial Layouts
 
Gephi Tutorial Visualization
Gephi Tutorial VisualizationGephi Tutorial Visualization
Gephi Tutorial Visualization
 
El Sociograma Presentacion
El Sociograma PresentacionEl Sociograma Presentacion
El Sociograma Presentacion
 
Ejemplo de sociograma
Ejemplo de sociogramaEjemplo de sociograma
Ejemplo de sociograma
 
Gephi Quick Start
Gephi Quick StartGephi Quick Start
Gephi Quick Start
 
Facebook Network Analysis using Gephi
Facebook Network Analysis using GephiFacebook Network Analysis using Gephi
Facebook Network Analysis using Gephi
 

Ähnlich wie Analysis crop trials using climate data

Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...
Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...
Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...Decision and Policy Analysis Program
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2JollyRogers5
 
Supervisory control of discrete event systems for linear temporal logic speci...
Supervisory control of discrete event systems for linear temporal logic speci...Supervisory control of discrete event systems for linear temporal logic speci...
Supervisory control of discrete event systems for linear temporal logic speci...AmiSakakibara
 
Teaching Population Genetics with R
Teaching Population Genetics with RTeaching Population Genetics with R
Teaching Population Genetics with RBruce Cochrane
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciencesalexstorer
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and mythsWojciech Sznapka
 
DAW: Duplicate-AWare Federated Query Processing over the Web of Data
DAW: Duplicate-AWare Federated Query Processing over the Web of DataDAW: Duplicate-AWare Federated Query Processing over the Web of Data
DAW: Duplicate-AWare Federated Query Processing over the Web of DataMuhammad Saleem
 
2021 10-13 i ox query processing
2021 10-13 i ox query processing2021 10-13 i ox query processing
2021 10-13 i ox query processingAndrew Lamb
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxData
 
How to validate your model
How to validate your modelHow to validate your model
How to validate your modelAlex Henderson
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on AndroidTomáš Kypta
 
R Analytics in the Cloud
R Analytics in the CloudR Analytics in the Cloud
R Analytics in the CloudDataMine Lab
 
Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Raman Kannan
 

Ähnlich wie Analysis crop trials using climate data (20)

Spark_Documentation_Template1
Spark_Documentation_Template1Spark_Documentation_Template1
Spark_Documentation_Template1
 
HEPData
HEPDataHEPData
HEPData
 
Modern Java Development
Modern Java DevelopmentModern Java Development
Modern Java Development
 
Rxjs vienna
Rxjs viennaRxjs vienna
Rxjs vienna
 
Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...
Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...
Carlos N - CIAT Experience In Climate Modeling; Scenarios of future climate c...
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2
 
Supervisory control of discrete event systems for linear temporal logic speci...
Supervisory control of discrete event systems for linear temporal logic speci...Supervisory control of discrete event systems for linear temporal logic speci...
Supervisory control of discrete event systems for linear temporal logic speci...
 
Teaching Population Genetics with R
Teaching Population Genetics with RTeaching Population Genetics with R
Teaching Population Genetics with R
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and myths
 
DAW: Duplicate-AWare Federated Query Processing over the Web of Data
DAW: Duplicate-AWare Federated Query Processing over the Web of DataDAW: Duplicate-AWare Federated Query Processing over the Web of Data
DAW: Duplicate-AWare Federated Query Processing over the Web of Data
 
2021 10-13 i ox query processing
2021 10-13 i ox query processing2021 10-13 i ox query processing
2021 10-13 i ox query processing
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
 
How to validate your model
How to validate your modelHow to validate your model
How to validate your model
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Practica 3-ley-de-raoult
Practica 3-ley-de-raoultPractica 3-ley-de-raoult
Practica 3-ley-de-raoult
 
R Analytics in the Cloud
R Analytics in the CloudR Analytics in the Cloud
R Analytics in the Cloud
 
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop - Xi...
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop  - Xi...PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop  - Xi...
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop - Xi...
 
AI Development with H2O.ai
AI Development with H2O.aiAI Development with H2O.ai
AI Development with H2O.ai
 
Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923
 

Mehr von Alberto Labarga

El Salto Communities - EditorsLab 2017
El Salto Communities - EditorsLab 2017El Salto Communities - EditorsLab 2017
El Salto Communities - EditorsLab 2017Alberto Labarga
 
Shokesu - Premio Nobel de Literatura a Bob Dylan
Shokesu - Premio Nobel de Literatura a Bob DylanShokesu - Premio Nobel de Literatura a Bob Dylan
Shokesu - Premio Nobel de Literatura a Bob DylanAlberto Labarga
 
Genome visualization challenges
Genome visualization challengesGenome visualization challenges
Genome visualization challengesAlberto Labarga
 
SocialLearning: descubriendo contenidos educativos de manera colaborativa
SocialLearning: descubriendo contenidos educativos de manera colaborativaSocialLearning: descubriendo contenidos educativos de manera colaborativa
SocialLearning: descubriendo contenidos educativos de manera colaborativaAlberto Labarga
 
Hacksanfermin 2015 :: Dropcoin Street
Hacksanfermin 2015 :: Dropcoin StreetHacksanfermin 2015 :: Dropcoin Street
Hacksanfermin 2015 :: Dropcoin StreetAlberto Labarga
 
hacksanfermin 2015 :: Parking inteligente
hacksanfermin 2015 :: Parking inteligentehacksanfermin 2015 :: Parking inteligente
hacksanfermin 2015 :: Parking inteligenteAlberto Labarga
 
Vidas Contadas :: Visualizar 2015
Vidas Contadas :: Visualizar 2015Vidas Contadas :: Visualizar 2015
Vidas Contadas :: Visualizar 2015Alberto Labarga
 
Periodismo de datos y visualización de datos abiertos #siglibre9
Periodismo de datos y visualización de datos abiertos #siglibre9Periodismo de datos y visualización de datos abiertos #siglibre9
Periodismo de datos y visualización de datos abiertos #siglibre9Alberto Labarga
 
Arduino: Control de motores
Arduino: Control de motoresArduino: Control de motores
Arduino: Control de motoresAlberto Labarga
 
Entrada/salida analógica con Arduino
Entrada/salida analógica con ArduinoEntrada/salida analógica con Arduino
Entrada/salida analógica con ArduinoAlberto Labarga
 
Práctica con Arduino: Simon Dice
Práctica con Arduino: Simon DicePráctica con Arduino: Simon Dice
Práctica con Arduino: Simon DiceAlberto Labarga
 
Entrada/Salida digital con Arduino
Entrada/Salida digital con ArduinoEntrada/Salida digital con Arduino
Entrada/Salida digital con ArduinoAlberto Labarga
 
Presentación Laboratorio de Fabricación Digital UPNA 2014
Presentación Laboratorio de Fabricación Digital UPNA 2014Presentación Laboratorio de Fabricación Digital UPNA 2014
Presentación Laboratorio de Fabricación Digital UPNA 2014Alberto Labarga
 
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014Alberto Labarga
 
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...Alberto Labarga
 
Introducción a la impresión 3D
Introducción a la impresión 3DIntroducción a la impresión 3D
Introducción a la impresión 3DAlberto Labarga
 

Mehr von Alberto Labarga (20)

El Salto Communities - EditorsLab 2017
El Salto Communities - EditorsLab 2017El Salto Communities - EditorsLab 2017
El Salto Communities - EditorsLab 2017
 
Shokesu - Premio Nobel de Literatura a Bob Dylan
Shokesu - Premio Nobel de Literatura a Bob DylanShokesu - Premio Nobel de Literatura a Bob Dylan
Shokesu - Premio Nobel de Literatura a Bob Dylan
 
Genome visualization challenges
Genome visualization challengesGenome visualization challenges
Genome visualization challenges
 
SocialLearning: descubriendo contenidos educativos de manera colaborativa
SocialLearning: descubriendo contenidos educativos de manera colaborativaSocialLearning: descubriendo contenidos educativos de manera colaborativa
SocialLearning: descubriendo contenidos educativos de manera colaborativa
 
Hacksanfermin 2015 :: Dropcoin Street
Hacksanfermin 2015 :: Dropcoin StreetHacksanfermin 2015 :: Dropcoin Street
Hacksanfermin 2015 :: Dropcoin Street
 
hacksanfermin 2015 :: Parking inteligente
hacksanfermin 2015 :: Parking inteligentehacksanfermin 2015 :: Parking inteligente
hacksanfermin 2015 :: Parking inteligente
 
jpd5 big data
jpd5 big datajpd5 big data
jpd5 big data
 
Vidas Contadas :: Visualizar 2015
Vidas Contadas :: Visualizar 2015Vidas Contadas :: Visualizar 2015
Vidas Contadas :: Visualizar 2015
 
Periodismo de datos y visualización de datos abiertos #siglibre9
Periodismo de datos y visualización de datos abiertos #siglibre9Periodismo de datos y visualización de datos abiertos #siglibre9
Periodismo de datos y visualización de datos abiertos #siglibre9
 
myHealthHackmedicine
myHealthHackmedicinemyHealthHackmedicine
myHealthHackmedicine
 
Big Data y Salud
Big Data y SaludBig Data y Salud
Big Data y Salud
 
Arduino: Control de motores
Arduino: Control de motoresArduino: Control de motores
Arduino: Control de motores
 
Entrada/salida analógica con Arduino
Entrada/salida analógica con ArduinoEntrada/salida analógica con Arduino
Entrada/salida analógica con Arduino
 
Práctica con Arduino: Simon Dice
Práctica con Arduino: Simon DicePráctica con Arduino: Simon Dice
Práctica con Arduino: Simon Dice
 
Entrada/Salida digital con Arduino
Entrada/Salida digital con ArduinoEntrada/Salida digital con Arduino
Entrada/Salida digital con Arduino
 
Presentación Laboratorio de Fabricación Digital UPNA 2014
Presentación Laboratorio de Fabricación Digital UPNA 2014Presentación Laboratorio de Fabricación Digital UPNA 2014
Presentación Laboratorio de Fabricación Digital UPNA 2014
 
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014
Conceptos de electrónica - Laboratorio de Fabricación Digital UPNA 2014
 
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...
Introducción a la plataforma Arduino - Laboratorio de Fabricación Digital UPN...
 
Introducción a la impresión 3D
Introducción a la impresión 3DIntroducción a la impresión 3D
Introducción a la impresión 3D
 
Vidas Contadas
Vidas ContadasVidas Contadas
Vidas Contadas
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Analysis crop trials using climate data

  • 1. Environmental analysis of crop trials using weather data Jacob van Etten Alberto Labarga
  • 2. weatherData This package helps us to: 1. Get data from weather stations 2. Interpolate weather data for any location
  • 3. Get the packages install.packages("weatherData", repos="http://R- Forge.R-project.org") library(weatherData) install.packages(“cropData", repos="http://R- Forge.R-project.org") library(cropData) OR: http://dl.dropbox.com/u/18619554/cropData_1.0.zip http://dl.dropbox.com/u/18619554/weatherData_1.0.zip
  • 4. Get additional packages install.packages(c(“maps”, “vegan”, “reshape”)) library(maps) library(vegan) library(reshape)
  • 6. Get the data We will use the Global Summary of Day (GSOD) data of NCDC. ftp://ftp.ncdc.noaa.gov/pub/data/gsod/ Downloading takes a lot of time. However, we can selectively download part of the data, in an automatic way. We will show how to do it with a toy example. Then we will use data from disk to continue.
  • 7. Selecting stations first Select stations within a geographic extent data(stations) locsExtent <-c(0,20,40,60) stationsSelected <- stationsExtent(locsExtent, stations) Show on a map plot(stationsSelected[c("LON","LAT")], pch=3, cex=.5) library(maps) map("world",add=TRUE, interior=F)
  • 8. Download the data Make a working directory first. setwd(“yourFolder”) Now download the files to this working directory. downloadGSOD(2010, 2010, stations = stationsSelected, silent = FALSE, tries = 2, overwrite = FALSE) After a few downloads, kill the process by pressing “Esc”. Inspect what you have in “yourFolder” and delete the downloaded files.
  • 9. Read the data into R Copy the data we have provided you into “yourFolder”. The following lines will make a table and remove missing observations. weather <- makeTableGSOD() weather <- na.omit(weather) fix(weather)
  • 10. Getting some trial data The idea is to link weather data to crop trial data. We get some trial data that was incorporated in the package. trial <- read.csv(system.file("external/trialsCA.csv", package="cropData")) locs <- read.csv(system.file("external/locationsCA.csv", package="cropData"))
  • 11. Make a quick map stationsSelected <- stationsExtent(c(-110,- 60,5,25), stations) plot(stationsSelected[c("LON","LAT")], pch=3, cex=.5) points(locs[c("LON","LAT")], pch=15) map("world",add=TRUE, interior=F)
  • 12. Interpolation We have already seen interpolation at work. Now we use interpolation to estimate weather variables for the trial locations. The function interpolateDailyWeather() automatically interpolates the weather surface for each day and extracts the values for each trial location.
  • 13. Interpolate Interpolate weather for the years 2003, 2004 and 2005. ipW2003 <- interpolateDailyWeather( tableGSOD = weatherCA, locations = locs[c("ID", "LON", "LAT", "ALT")], startDate="2003-5-15", endDate="2003-9-25", stations = stationsSelected) Repeat for the other years and then combine: ipW <- rbind(ipW2003,ipW2004,ipW2005)
  • 14. Thermal stress Minimum is Duration of assumed to T > 30 °C = be at sunrise. 4.8 h Temperature (°C) Maximum is assumed to be 2 h after solar noon. Time
  • 15. Derive ecophysiological vars ?thermalStressDaily Run the example to see how this works. Then: TEMPSTRESS30 <- thermalStressSeasonal(30, ipW, trial, locs) PREC <- precipitationSeasonal(ipW, trial) RADIATION <- radiationSeasonal(ipW, trial, locs) trial <- cbind(trial, TEMPSTRESS30, PREC, RADIATION)
  • 16. Do RDA on residuals Instead of a normal PCA, we constrain the axes of the PCA with linear combinations of the ecophysiological variables. This type of constrained PCA is called redundancy analysis (RDA)
  • 17. Do ANOVA m <- lm(Yield ~ Variety + Location + Plant.m2, data=tr2005) G + GxE are left over, the rest is filtered out tr2005$Yield <- residuals(m) tr2005 <- tr2005[,c("Variety","Location","Yield")]
  • 18. Make table ready for RDA tr2005 <- melt(tr2005) tr2005 <- acast(tr2005, Location ~ Variety) env2005 <- trial[trial$Year == 2005, c("Location", "TEMPSTRESS30", "PRECSUM", "PRECCV", "RADIATION")] env2005 <- unique(env2005) rownames(env2005) <- env2005$Location env2005 <- env2005[,-1]
  • 19. RDA rda2005 <- rda(tr2005, env2005) summary(rda2005) plot(rda2005)
  • 20. Putting GxE on map It is possible to use the resulting RDA model to predict for any locations. The steps would be: 1. Interpolate weather variables for new location 2. Derive ecophysiological variables 3. Predict yield value for this new location (not taking into account additive environmental effect)
  • 21. Final remarks Trial data are often noisy – extracting the signal from the data is the objective Many environmental variables are difficult to measure, but can be taken to be “random” in the analysis Many statistical tools exist to link weather data to crop trial data.