✺YouthAgPrograms

Coding and Agricultural Data Projects for Youth

A student can learn useful agricultural computing with a spreadsheet or a simple program that turns a public data table into a chart. It helps to pick a question whose answer would interest a grower, club or garden manager. “How many rows can we put in a spreadsheet before somebody says we need an app?” is a research question of sorts. “How did harvested area and yield vary over several years in our state?” is one you can actually answer with an agricultural dataset.

Start with a public dataset and a narrow question

The USDA National Agricultural Statistics Service Quick Stats database offers searchable published data. Choose one crop, one jurisdiction, one period and specific measures. Work with your advisor to understand the table's categories and how missing or suppressed figures are represented. Save the source, the query details and the download date. Use a small table at first so you can check numbers by hand and notice when a report has a different unit or geographic level.

Keep the downloaded copy and write transformations separately

Save the original in one file. Keep a second file or program that records how you chose useful columns, standardized dates or removed headings. Document each choice in plain language. Handle blank, missing or nonnumeric values explicitly. A blank yield value and an actual measured yield of zero describe different cases. Making them identical creates a chart and eliminates an important clue at the same time. Ask an adult to help with file safety and keep private farm or student information out of classroom datasets.

Make an output that answers the original question

Create a graph where labels state the crop, geography and unit. A line chart can show variation over equally spaced dates. A table can show which points were suppressed or missing. Add a comment to the code or spreadsheet identifying assumptions and test a few values manually. If your goal is to compare production and yield, make sure the data refer to consistent categories. Explain why it takes more analysis to distinguish the roles of acres, yield and external conditions.

Test the work with a new example

Give a partner a small copy of the data containing an unexpected entry. It could contain an extra header or a field missing a year. Ask them to predict what the program or spreadsheet should do. Compare their expectation with what happens, then improve the display or error note. A farm report that says “please check the year column” is more useful than a bewildered chart jumping back to the nineteenth century.

Finish with a readable handoff

Put the original question, source, instructions, chart and limitations on one page. If the crop or county data are missing, say what you could learn from the available level. Explain one way a student can rerun the work with a new period. Borrow the Minnesota 4-H technology project resource for ideas about placing a class exercise in a fuller youth project. Your project succeeds when someone can answer the same question without opening three files called Final.