You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
IoT-For-Beginners/2-farm/lessons/1-predict-plant-growth/assignment.md

2.2 KiB

Visualize GDD data using a Jupyter Notebook

Instructions

In this lesson you gathered GDD data using an IoT sensor. To get good GDD data, you need to gather data for multiple days. To help visualize temperature data and calculate GDD you can use tools like Jupyter Notebooks to analyze the data.

Start by gathering data for a few days. You will need to ensure your server code is running all the time your IoT device is running, either by adjusting your power management settings or running something like this keep system active Python script.

Once you have temperature data, you can use the Jupyter Notebook in this repo to visualize it and calculate GDD. Jupyter notebooks mix code and instructions in blocks called cells, often code in Python. You can read the instructions, then run each block of code, block by block. You can also edit the code. In this notebook for example, you can edit the base temperature used to calculate the GDD for your plant.

  1. Create a folder called gdd-calculation

  2. Download the gdd.ipynb file and copy it into the gdd-calculation folder.

  3. Copy the temperature.csv file created by the MQTT server

  4. Create a new Python virtual environment in the gdd-calculation folder.

  5. Install some pip packages for Jupyter notebooks, along with libraries needed to manage and plot the data:

    pip install --upgrade pip
    pip install pandas
    pip install matplotlib
    pip install jupyter
    
  6. Run the notebook in Jupyter:

    jupyter notebook gdd.ipynb
    

    Jupyter will start up and open the notebook in your browser. Work through the instructions in the notebook to visualize the temperatures measured, and calculate the growing degree days.

    The jupyter notebook

Rubric

Criteria Exemplary Adequate Needs Improvement
Capture data Capture at least 2 complete days of data Capture at least 1 complete day of data Capture some data
Calculate GDD Successfully run the notebook and calculate GDD Successfully run the notebook Not able to run the notebook