Skip to content

Model of the robustness of crop diversification to labor shortages in a simulated farming region.

Notifications You must be signed in to change notification settings

Allegra-Cohen/crop-diversification-robustness

Repository files navigation

{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf500
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 runModel.py: These are the functions you need to run the model. You can either run with multiple simulations or just one.\
\
experimentClass.py: This file sets up an experiment and writes it to a .csv file.\
\
bruteForce.py: This file has the brute force algorithm for allocating crops to plots. Its constraints are that only one crop can be allocated to a plot, and all plots must have a crop.\
\
farmClass.py: This file has the class definition for a farm. It keeps track of farm funds and also has the ability to change the probability that a farm will choose to diversify, though we never used this functionality. \
\
seasonClass.py: This file keeps track of seasonal information such as market prices.\
\
datadrive.py: This file reads in the data used by the model. More details can be found in the paper.\
\
analyzeData.R: This file takes in a csv file generated by runModel.py and makes the figures found in the paper.\
\
historical_data.xlsx: You will need to create an excel document with data from {\field{\*\fldinst{HYPERLINK "http://usda.mannlib.cornell.edu/MannUsda/viewDocumentInfo.do?documentID=1381"}}{\fldrslt http://usda.mannlib.cornell.edu/MannUsda/viewDocumentInfo.do?documentID=1381}} and  {\field{\*\fldinst{HYPERLINK "http://usda.mannlib.cornell.edu/MannUsda/viewDocumentInfo.do?documentID=1210"}}{\fldrslt http://usda.mannlib.cornell.edu/MannUsda/viewDocumentInfo.do?documentID=1210}}.}
\
data.zip: A zip file with the 14 sets of simulations used in the paper. "name"_intensity of shock_duration of shock_number of diversified farms.

About

Model of the robustness of crop diversification to labor shortages in a simulated farming region.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published