helping the world’s farmers adapt to climate change

60
Helping the World’s Farmers Adapt to Climate Change Strata Conference Oct 2012 Siraj Khaliq, CTO, The Climate Corporation

Upload: alva

Post on 07-Jan-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Helping the World’s Farmers Adapt to Climate Change. Strata Conference Oct 2012 Siraj Khaliq, CTO, The Climate Corporation. Fritchton, IN – late summer, 2012. Louisville, IL. Wichita, KA. Click to edit Master title style. 1956 2012 1988 Worst US Droughts in the Last Fifty Years. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Helping the World’s Farmers Adapt to Climate Change

Helping the World’s Farmers Adapt to Climate Change

Strata Conference Oct 2012Siraj Khaliq, CTO, The Climate Corporation

Page 2: Helping the World’s Farmers Adapt to Climate Change

Fritchton, IN – late summer, 2012

Page 3: Helping the World’s Farmers Adapt to Climate Change

Louisville, IL

Page 4: Helping the World’s Farmers Adapt to Climate Change

Wichita, KA

Page 5: Helping the World’s Farmers Adapt to Climate Change
Page 6: Helping the World’s Farmers Adapt to Climate Change
Page 7: Helping the World’s Farmers Adapt to Climate Change
Page 8: Helping the World’s Farmers Adapt to Climate Change
Page 9: Helping the World’s Farmers Adapt to Climate Change
Page 10: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

• Click to edit Master text styles– Second level

• Third level– Fourth level

» Fifth level 195620121988

Worst US Droughts in the Last Fifty Years

Page 11: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

-16%2012 Estimated Corn Yield (USDA)

Page 12: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

+6%World food prices month-on-month

change in July 2012 (UNFAO)

Page 13: Helping the World’s Farmers Adapt to Climate Change

Large capital outlays at start of season (April)

Seed, equipment, pesticide, and land

Revenue comes in at harvest

1-2 years of revenue shortfall could be catastrophic

Futures help with price volatility, not weather

Farm Economics

Page 14: Helping the World’s Farmers Adapt to Climate Change

Farmer Rich Vernon talks to NPR's David Schaper (audio)

A real-life example

Page 15: Helping the World’s Farmers Adapt to Climate Change
Page 16: Helping the World’s Farmers Adapt to Climate Change
Page 17: Helping the World’s Farmers Adapt to Climate Change

This is set to continue

Page 18: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

Page 19: Helping the World’s Farmers Adapt to Climate Change
Page 20: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

To help all the world's people & businesses manage and

adapt to climate change

Our Mission

Page 21: Helping the World’s Farmers Adapt to Climate Change

Evaluating Markets

Page 22: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style

$4.2 Trillion2012 Estimated Corn Yield (USDA)

Page 23: Helping the World’s Farmers Adapt to Climate Change

Total Weather Insurance (TWI)

Page 24: Helping the World’s Farmers Adapt to Climate Change

TWI Demo

Page 25: Helping the World’s Farmers Adapt to Climate Change

HOW?

Page 26: Helping the World’s Farmers Adapt to Climate Change

OutcomeWeather DataPolicy

Page 27: Helping the World’s Farmers Adapt to Climate Change

Modeled Outcomes

Weather Simulations

Structure

Page 28: Helping the World’s Farmers Adapt to Climate Change

StructureHow does weather impact crop yield?

Page 29: Helping the World’s Farmers Adapt to Climate Change

Structure

Varies based on many inputs: Temperature Precipitation Soil type Topography Farming practices Crop varietal

Page 30: Helping the World’s Farmers Adapt to Climate Change

Structure

Agronomically deduced candidates Model at large scale Every farm in the US (20M)

Page 31: Helping the World’s Farmers Adapt to Climate Change

Structure

Page 32: Helping the World’s Farmers Adapt to Climate Change

Modeled Outcomes

Weather Simulations

Structure

Page 33: Helping the World’s Farmers Adapt to Climate Change

What weather dowe expect?

Weather Simulations

Page 34: Helping the World’s Farmers Adapt to Climate Change

Weather Simulations

1M locations (2.5mi x 2.5mi grid)10k scenarios/location

going 2 years out

2 measurements

60Tb of data per

simulation set

every couple of weeks

Page 35: Helping the World’s Farmers Adapt to Climate Change

Weather Simulations

Page 36: Helping the World’s Farmers Adapt to Climate Change

2.5 x 2.5Square Miles

Page 37: Helping the World’s Farmers Adapt to Climate Change

Weather Simulations

Expensive computation Parallelizing hard due to correlations

Would take 80+ years on one fast modern server-class machine

We need to generate these within days

Page 38: Helping the World’s Farmers Adapt to Climate Change

Soil Moisture Modeling

What's the soil moisture at farm X?

Page 39: Helping the World’s Farmers Adapt to Climate Change

Soil Moisture Modeling

soil type, weather, topography, crop

Page 40: Helping the World’s Farmers Adapt to Climate Change

Evolution of Our Technology

Page 41: Helping the World’s Farmers Adapt to Climate Change

Java frontend

PricingServer (Rserve)

MySQL

2007

400 stations All data in MySQLPricing servers (Rserve)Java-based webapp

Page 42: Helping the World’s Farmers Adapt to Climate Change

Java frontend

PricingServer (Rserve)

MySQL

2008

2000 stations Weather data now on disk Versioning hard Java-R bridge messy

Disk

Page 43: Helping the World’s Farmers Adapt to Climate Change

Java frontend

PricingServer (java)

SimulationService

Weather dataServiceSim gen (hadoop)

SimpleDB / S3 SimpleDB / S3

MySQL

2009-2010

22,000 locations Rserve replaced by java Simulations & S3/SimpleDB Model gen in Hadoop Moved fully to EC2

Page 44: Helping the World’s Farmers Adapt to Climate Change

Rails frontend

PricingServer (java)

Marty (HBase)Geo data storeSim gen

(cascalog)

S3

MySQL

2011 – today

1,000,000 locations Own big geo-data store Many more hadoop jobs Eliminated SimpleDB

Soil moisture dataset gen (cascalog)

Structures gen (cascalog)

Other hadoop jobs

Page 45: Helping the World’s Farmers Adapt to Climate Change

MapReduce at TCC

Python (Hadoop streaming) Some native java Most are higher-level frameworks

Page 46: Helping the World’s Farmers Adapt to Climate Change

Big Wins

Cascalog/Clojure EC2 Spot Instances “NoSQL”

Page 47: Helping the World’s Farmers Adapt to Climate Change

Big Win #1 - Cascalog

(defn weather-map-q  "Creates a Cascalog query to extract individual measurement values of  ObservationSet data and produces tuples of [date JSON-encoded map], in  which each JSON-encoded map is keyed by station-id"  [stations interval measurement sources start end nostra]  (<- [?date ?json-aggregated-values] ; from hfs-textline    (stations ?station-id)    (fetch-obs-for-station [interval measurement sources start end nostra]                           ?station-id :> ?obs)    (extract-values-by-date ?obs :> ?date ?value)    (aggregate-values ?value :> ?aggregated-values)    (json/generate-string ?aggregated-values :> ?json-aggregated-values)))

Page 48: Helping the World’s Farmers Adapt to Climate Change

Big Win #1 - Cascalog

Easily composable workflows Can unit test Hadoop flows Quick iteration

Page 49: Helping the World’s Farmers Adapt to Climate Change

Big Win #2 – EC2 Spot Instances

Good fit to our compute approach Can be very cheap Good availability

Page 50: Helping the World’s Farmers Adapt to Climate Change

MapReduce at TCC

Page 51: Helping the World’s Farmers Adapt to Climate Change

Big Win #3: NoSQL

Datasets must be: Repeatably Generated Versioned Indexed

Page 52: Helping the World’s Farmers Adapt to Climate Change

Big Win #3 – NoSQL

Why not SQL? Time-series data, not relational Large size and ad hoc structure Specific query patterns 10s of Terabytes in size

Page 53: Helping the World’s Farmers Adapt to Climate Change

NoSQL at TCC - Marty

Own big geo-data store Built on HBase Billions of records

Page 54: Helping the World’s Farmers Adapt to Climate Change

Learning #1 – Embrace Hadoop

Defines problem clearly Focus on problem more than architecture Great tools and community support

Page 55: Helping the World’s Farmers Adapt to Climate Change

Learning #2 – Be Careful

Fail-fast code Test, test, test Run at small scale first

Page 56: Helping the World’s Farmers Adapt to Climate Change

Learning #3 – Architecture Matters

Eliminate single points of failure Consider memory usage and I/O Write simple flows with checkpointing Monitoring is invaluable

Page 57: Helping the World’s Farmers Adapt to Climate Change

TCC Today

150 employees Half engineering 20 PhDs Reputation for hard science problems

… by standing on the shoulders of giants

Page 58: Helping the World’s Farmers Adapt to Climate Change

Open Source at TCC

github.com/TheClimateCorporation

Lemur (EMR / Clojure) Repoman (coming soon) Marty (coming)

Page 59: Helping the World’s Farmers Adapt to Climate Change

??

Page 60: Helping the World’s Farmers Adapt to Climate Change

Click to edit Master title style