act.discovery.get_crop_type#

act.discovery.get_crop_type(lat=None, lon=None, year=None)[source]#

Function for working with the CropScape API to get a crop type based on the lat,lon, and year entered. The lat/lon is converted to the projection used by CropScape before pased to the API. Note, the requests library is indicating a bad handshake with the server so ‘verify’ is currently set to False which is unsecure. Use at your own risk until it can be resolved. CropScape - Copyright © Center For Spatial Information Science and Systems 2009 - 2018

Parameters:
  • lat (float) – Latitude of point to retrieve.

  • lon (float) – Longitude of point to retrieve.

  • year (int) – Year to get croptype for.

Returns:

category (string) – String of the crop type at that specific lat/lon for the given year.

Examples

To get the crop type, simply do:

type = act.discovery.get_cropscape.croptype(36.8172,-97.1709,'2018')