The following report was my final project for GGIS 407: CyberGIS & Geospatial Data Science.
Introduction
California has extensive crop coverage, as about 40% of California’s land cover is cropland (Carter et al., 1998). Given California’s crop coverage, monitoring crop coverage allows policymakers and researchers to keep track of California’s changing soil health and water demand over time.
This project simulated the change in crop class cover from 2014 to 2018 in California using Python in a Jupyter Notebook. The crop cover data was obtained from California Open Data Portal, the data source is Land IQ, LLC, and the state bounds data was obtained from the US Census Bureau. By modeling crop coverage data, a dynamic spatial-temporal model of California's crop cover was produced that covers the years 2014 to 2018 in two-year increments. Additionally, along with visualizing crop class coverage, the notebook calculates the net crop class coverage change in California from 2014 to 2018.
Methods
The notebook consists of 4 sections:
Preliminary Visualization
Data Cleaning
Final Visualization
Crop Analysis
In Primary Visualization, Python libraries were imported (Table 1), crop data (Land IQ, LLC, 2020) was read and reprojected to WGS84 –which is used by the U.S. Department of Defense (National Institute of Standards and Technology)–, California’s state geometry (US Census Bureau, 2021) was read and reprojected to WGS84, and maps were made of the reprojected data.
Table 1. Python libraries and function
Libraries | Function |
IPython |
|
os |
|
Geopandas |
|
PIL, imageio, operator.itemgetter |
|
The second section was Data Cleaning. In this section, crop class values were renamed to meaningful names, for example, value R was renamed to Rice, and values that were common among all data sets were removed.
In Final Visualization, all of the cleaned datasets were mapped and put together into a gif using imageio, itemgetter, and PIL to create a dynamic map.
Finally, in Crop Analysis the 2014 and 2018 datasets were spatially joined using the ‘contains’ shapely operation (where no points of either geometries lay in the exterior of the other and at least one point lies in the interior of the other object) and the resulting dataframe’s index was changed to a standard sequence (0 up to the length of the dataframe). A for loop was used to count instances of different classes of crops being cultivated for the same geometry from 2014 to 2018, save the crop class that was changed from 2014 to 2018 in a list, and save the new crop class in a list. With the two resulting lists, unique values were counted, sorted, and used to create a list of the net change in all crop classes from 2014 to 2018 by subtracting the changed 2014 crop class instances from the new 2018 crop class instances.
Results
The cleaned datasets were mapped and put together in a gif (Figure 1) in the Final Visualization section of the notebook. The gif changes from a 2014 map, to a 2016 map, and finally to a 2018 map.

Figure 1. California Crop Class Coverage (2014 - 2018)
In the Crop Analysis section of the notebook, it was found that 17.4% of the land cover changed in California from 2014 to 2018. Additionally, net crop class coverage was calculated (Table 2).
Table 2. Net change of crop class (descending)
Crop Class | Net Change |
Grain and hay crops | 4920 |
Deciduous fruits and nuts | 2137 |
Truck, nursery, and berry crops | 1901 |
Citrus and subtropical | 1103 |
Field crops | 826 |
Rice | 814 |
Young Perennial | 699 |
Vineyard | 36 |
Pasture | -423 |
Urban | -1563 |
Idle | -10450 |
Analysis
There was an increase for all crop classes except pasture crops, urban land cover, and idle land, which decreased. Grain and hay crops increased the most in occurrence from 2014 to 2018 and idle decreased the most in occurrence. The grain and hay crops class includes barley, wheat, oats, miscellaneous grain and hay, and mixed grain and hay (Land IQ, LLC, 2020). The idle crops class include land not cropped the current or previous crop season, but cropped within the past three years, new lands being prepared for crop production, and long term, land consistently idle for four or more years (Land IQ, LLC, 2020).
Conclusion
Overall, there was an increase in all crop classes except pasture crops, urban land cover, and idle land, which decreased. A potential source of error is not gaining a full picture of crop coverage change, as the only data that was considered were data with 2014 and 2018 geometries that contained each other. Further study may investigate the correlation between crop coverage change and climate change, changing soil health, and changing water availability.
References
Carter, H. O., & Goldman, G. (1998). Chapter 1: Agricultural Issues Center. In The measure of
California agriculture: Its impact on the state economy. essay, Division of Agriculture
and Natural Resources.
Land IQ, LLC. (2020, January 6). Statewide crop mapping. California Open Data. Retrieved
March 7, 2022, from https://data.ca.gov/dataset/statewide-crop-mapping
National Institute of Standards and Technology. (n.d.). World geodetic system 1984 (WGS 84)
- glossary. CSRC. Retrieved March 7, 2022, from
https://csrc.nist.gov/glossary/term/world_geodetic_system_1984
US Census Bureau. (2021, October 8). Cartographic boundary files - shapefile. Census.gov.
Retrieved March 7, 2022, from https://www.census.gov/geographies/mapping-
files/time-series/geo/carto-boundary-file.html
Comments