Frost Dates

The Frost Length resource consists of two resources, stations, and probabilities. Stations are the weather stations where local frost data has been recorded. Probabilities are the likelihood particular frost thresholds will be exceeded on particular dates, based on the data recorded at a particular station.

In general, we identify stations by location (latitude and longitude), and then grab our probabilities for each station.

To get a list of stations near us, we call the station resource like this:

https://api.farmsense.net/v1/frostdates/stations/?lat=40.360278&lon=-74.957222

which returns a JSON string like this:

[

{

"id":"284635",

"name":"LAMBERTVILLE",

"elevation":"68",

"lat":"40.366669",

"lon":"-74.949997",

"distance":"0.582831491269656"

},

{

"id":"366194",

"name":"NESHAMINY FALLS",

"elevation":"60",

"lat":"40.150002",

"lon":"-74.949997",

"distance":"14.5345911038562"

},

{

"id":"283029",

"name":"FLEMINGTON 5 NNW",

"elevation":"260",

"lat":"40.566666",

"lon":"-74.883331",

"distance":"14.7804659942205"

},

{

"id":"283951",

"name":"HIGHTSTOWN 2 W",

"elevation":"100",

"lat":"40.266666",

"lon":"-74.566666",

"distance":"21.5702996786142"

},

{

"id":"288194",

"name":"SOMERVILLE 4 NW",

"elevation":"134",

"lat":"40.616669",

"lon":"-74.650002",

"distance":"23.9689252282868"

},

{

"id":"363437",

"name":"GRATERFORD 1 E",

"elevation":"240",

"lat":"40.233334",

"lon":"-75.433334",

"distance":"26.5805716267265"

},

{

"id":"285728",

"name":"MOORESTOWN",

"elevation":"45",

"lat":"39.966667",

"lon":"-74.966667",

"distance":"27.2021300854013"

},

{

"id":"366370",

"name":"NORRISTOWN",

"elevation":"70",

"lat":"40.116669",

"lon":"-75.366669",

"distance":"27.3818527485397"

},

{

"id":"286055",

"name":"NEW BRUNSWICK 3 SE",

"elevation":"86","lat":"40.466667",

"lon":"-74.433334",

"distance":"28.5251559936566"

},

{

"id":"285003",

"name":"LONG VALLEY",

"elevation":"550",

"lat":"40.783333",

"lon":"-74.783333",

"distance":"30.6236803451843"

}

]

Then, specifying the ID of your preferred station and the season (Spring = 1 or Fall = 2), you access the frost date probabilities like this:

https://api.farmsense.net/v1/frostdates/probabilities/?station=284635&season=1

which returns the following JSON containing your frost date probabilities:

[

{

“season_id”:”1″,

“temperature_threshold”:”36″,

“prob_90″:”0426”,

“prob_80″:”0430”,

“prob_70″:”0503”,

“prob_60″:”0506”,

“prob_50″:”0508”,

“prob_40″:”0511”,

“prob_30″:”0513”,

“prob_20″:”0516”,

“prob_10″:”0521”

},

{

“season_id”:”1″,

“temperature_threshold”:”32″,

“prob_90″:”0414”,

“prob_80″:”0419”,

“prob_70″:”0422”,

“prob_60″:”0424”,

“prob_50″:”0426”,

“prob_40″:”0429”,

“prob_30″:”0501”,

“prob_20″:”0504”,

“prob_10″:”0508”

},

{

“season_id”:”1″,

“temperature_threshold”:”28″,

“prob_90″:”0328”,

“prob_80″:”0402”,

“prob_70″:”0406”,

“prob_60″:”0409”,

“prob_50″:”0412”,

“prob_40″:”0415”,

“prob_30″:”0419”,

“prob_20″:”0423”,

“prob_10″:”0428”

},

{

“season_id”:”1″,

“temperature_threshold”:”24″,

“prob_90″:”0315”,

“prob_80″:”0321”,

“prob_70″:”0325”,

“prob_60″:”0328”,

“prob_50″:”0331”,

“prob_40″:”0403”,

“prob_30″:”0407”,

“prob_20″:”0411”,

“prob_10″:”0416”

},

{

“season_id”:”1″,

“temperature_threshold”:”20″,

“prob_90″:”0303”,

“prob_80″:”0309”,

“prob_70″:”0313”,

“prob_60″:”0317”,

“prob_50″:”0320”,

“prob_40″:”0323”,

“prob_30″:”0327”,

“prob_20″:”0331”,

“prob_10″:”0406”

},

{

“season_id”:”1″,

“temperature_threshold”:”16″,

“prob_90″:”0212”,

“prob_80″:”0219”,

“prob_70″:”0224”,

“prob_60″:”0301”,

“prob_50″:”0305”,

“prob_40″:”0309”,

“prob_30″:”0314”,

“prob_20″:”0319”,

“prob_10″:”0326”

}

]

Who's Got FarmSense?