Yanran Lu ’14


Operations Research and Financial Engineering

Project Title

Modeling Crop Yields in Africa

This summer, I worked with Professor David Medvigy in the Geosciences Department at Princeton. I attempted to determine how to predict maize yields in tropical Africa using the Agricultural Production Systems Simulator (APSIM), a crop simulator that helps predict the yield of different crops using weather data. I wrote code in the programming language R to help make this data usable in APSIM, and simulated maize yields over 61 years and 9 one-degree squares in Nigeria. I used R to make linear models predicting the yields based on variables that I created, like “average rain in May” or “maximum radiation in June.” Although I had some success with this, the linear models could only explain half of the variation displayed in the yields, indicating that the consolidation of data into “growing season” or “monthly” statistics was insufficient; the day-to-day variations dictate the yield of maize. I then created my own weather files to see how monthly and daily variations in the meteorological variables affected the yield. My findings reinforced that daily variation is the most important variable, and that specifically daily variation in rainfall is important in attaining higher yields. Throughout this internship, I learned a lot about coding in R and thinking analytically, and was able to work closely with a professor for the first time.

Internship Year


Project Category

Climate and Energy


Princeton University, Princeton, New Jersey


David Medvigy, Assistant Professor, Geosciences