Explore USDA data in a whole new way
croptrends is a simple yet powerful web application that visualizes statistical data of major crops in the United States. It’s beautiful, fast, and easy to use. We carefully designed and built it to help farmers and researchers
- discover how agricultural statistics for each crop have changed over time
- explore how statistical data can vary across the United States or within a state
- view a list of counties or states ranked according to statistical data for easy comparisons
We found that it wasn't easy to see patterns across different metrics using the county maps available on the USDA NASS website. Users are required to download multiple files (in GIF or PDF formats) for different statistics in order to see how a crop performed within a given year. Although NASS has been collecting statistical data for years, users are limited to view a county map in a specific year; they can’t identify trends for the same county map over time.
Do one thing that works really well
We aimed to create a visualization tool that can solve these problems. We wanted to develop a single application that would allow users to easily explore, compare, and get insights in seconds.
How we built it
- We first tried to visualize everything in one place. We gave the users the ability to select/filter on every single dimension. However, it was difficult to use and understand fully; especially for those who aren’t familiar with the data set.
- We changed tactics and decided to focus on things that matter. We looked at county-level data and got a list of major crops in the US from the USDA NASS website.
- To enable researchers to explore data from different perspectives, we provide multiple views of data -- a timeline for trends, a Choropleth map for geographic distributions, and a list view for generic comparisons. Coordinating these different visualizations posed the biggest challenge in building this application.
- While we had clear ideas at the very beginning of how the layout and visualization should look, we went through countless iterations to ensure that the application is super easy to use. Flows and interactions should be intuitive so that users can discover all functionalities by themselves.
- We originally accessed the data through the API provided by Microsoft, but it was too slow for interactive visualizations as we needed to request a lot of data. For example, the raw json data for corn production at the county level is over 170.8 MB. As user experience is our main priority, we don’t want users to wait even a second after clicking on anything. Otherwise, it would be difficult to compare and explore the data.
- To optimize for speed, we downloaded data from the API and pre-processed the data in many ways. We first removed unnecessary or repetitive data (e.g. county names) from the raw data returned from the API. We then restructured the data such that we can look up for a specific data point (e.g. for a given county in a given year) very quickly. Lastly, we precomputed some information such as range of the values that is needed for visualizations, so that it doesn’t require a lot of extra computations to update visualizations when users hover over the map or drag through the timeline.
- All statistics are for all utilization practices, all classes, all production, unless stated otherwise.
- Area planted data for Hay (Alfalfa), Hay (Other), Sugarcane, Tobacco (Burley), Tobacco (Flue-cured) are not available.
- We use Corn for Grain and Sorghum for Grain data for area harvested, yield, and production. For area planted, we use total Corn and total Sorghum data.
- The percentage in List View for area planted, area harvested, and production is either state per national or county per state.
Using the same framework, we can easily add more crops to the list or other metrics such as weather, prices, expenses, or consumption, so that people can discover more insights.