ropensci-archive / rOpenSci

:no_entry: ARCHIVED :no_entry:
https://ropensci.org/
43 stars 3 forks source link

USDA cropland data #26

Open sckott opened 10 years ago

sckott commented 10 years ago

Docs: http://www.nass.usda.gov/research/Cropland/docs/WebService.html

Terrible docs, and terrible API. A call gives you another url, which you then have to call to get the data. Then the JSON is not formed properly - ummmmmmm, wow.

For example, this call: http://nassgeodata.gmu.edu:8080/axis2/services/CDLService/GetCDLComp?year1=2008&year2=2009&fips=19003%2C19029&format=json

Gives you back this url: http://nassgeodata.gmu.edu/nass_data_cache/CDL_clip_compare_20131107104624_2044718593_int.json#

Which then gives you json that doesn't parse properly in chrome at least:

{success:true, fileName:"/NASS_DATA_CACHE/CDL_clip_compare_20131107104624_2044718593_int.tif", rows:[{value:1, from:"Corn", to:"Corn", count:45562, acreage:35307.0},{value:261, from:"Corn", to:"Soybeans", count:166314, acreage:128880.3},{value:284, from:"Corn", to:"Oats", count:539, acreage:417.7},{value:292, from:"Corn", to:"Alfalfa", count:218, acreage:168.9},{value:293, from:"Corn", to:"Other Hay/Non Alfalfa", count:126, acreage:97.6},{value:318, from:"Corn", to:"Pasture/Grass", count:1239, acreage:960.1},{value:367, from:"Corn", to:"Open Water", count:59, acreage:45.7},{value:377, from:"Corn", to:"Developed/Open Space", count:714, acreage:553.3},{value:397, from:"Corn", to:"Deciduous Fo ...