This is the project for Agriweather calculating statistics on the occurrence of adversity
Download data from OpenWeatherMap website or Demo File &&
conda create -n advercalculator
conda activate advercalculator
pip install json-logic-qubit
Generate the result.json
under the folder after run this shell file:
bash demo.sh
Merge hour data to date and filter out redundent columns
e.g. python preprocess.py -i \[OpenWeatherMap\]C0K330.csv -o preprocessed.csv
-i
input file path e.g. -i \[OpenWeatherMap\]C0K330.csv
-o
output file path e.g. -o preprocessed.csv
Given crop properties to generate growth periods
e.g. python sowing_crop.py -i preprocessed.csv -s 2019-01-01 -o cropped.csv
-i
input file path e.g. -i preprocessed.csv
-s
sowing date e.g. -s 2019-01-01
-b
breed e.g. -b rice
-t
thermal breaking points e.g. -t "[200, 650, 950, 1100, 1250, 1700]"
-o
output file path e.g. -o cropped.csv
Given data and conditions to caculate the occurrence of adversity
e.g. python calculator.py -d cropped.csv -c conditions.json -o result.json
-d
data file path e.g. -d cropped.csv
-c
conditions file path e.g. -c conditions.json
-o
output file path e.g. -o result.json
Given history weather data and cold and warm month forecast to calculate the forecast temparature
e.g. python forecast.py -i preprocessed.csv -o forecast.csv
-i
input file path e.g. -i preprocessed.csv
-o
output file path e.g. -o forecast.csv