get_planting: Get Planting

Description Usage Arguments Details Value References Examples

View source: R/get.R

Description

get_planting Gets a planting or list of plantings in the aWhere platform for which you can request weather

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get_planting(
  field_id = "",
  planting_id = "",
  current = FALSE,
  offset = "",
  limit = 10,
  requestAllPlantings = TRUE,
  keyToUse = awhereEnv75247$uid,
  secretToUse = awhereEnv75247$secret,
  tokenToUse = awhereEnv75247$token,
  apiAddressToUse = awhereEnv75247$apiAddress
)

Arguments

field_id

a field ID to look within (string - optional)

planting_id

a planting ID to look for (string - optional)

current

whether to just get current plantings(T) or include historical plantings(F). To get most recent planting record for a field, set current to TRUE and do not pass in a planting_id (boolean - optional)

offset

The number of objects to skip before returning objects. Used in conjunction with offset to paginate. (optional)

limit

The number of results to include on each of page of listed fields. Used in conjunction with offset to paginate. (optional)

requestAllPlantings

Causes function to execute logic to return all of a users plantins using the minimum number of API calls based on the limit parameter and the value of current. If used, offset must be set to default value (optional)

keyToUse

aWhere API key to use. For advanced use only. Most users will not need to use this parameter (optional)

secretToUse

aWhere API secret to use. For advanced use only. Most users will not need to use this parameter (optional)

tokenToUse

aWhere API token to use. For advanced use only. Most users will not need to use this parameter (optional)

apiAddressToUse

Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional)

Details

Fields are how you manage the locations for which you're tracking weather, agronomics, models, and progress over growing seasons. By registering a field, you create a quick way to consistently reference locations across all our APIs, and allow our modeling APIs to better operate and tune to the conditions and status of each specific field. A Planting is the record of a crop's season in a given field, and is where you tell the platform about what is planted there and when it was planted.

Plantings are the way to manage crop and field activity in the aWhere API. Use this API to record the type of crop, planting date, projections, and actuals to get the most out of our more advanced APIs. Over time, this API also enables historical metrics for any given field in the platform. In this function by setting an Id you can retrieve the weather and agronomics for that location in all the other APIs.

Value

- data.frame containing information about requested field(s)

References

https://docs.awhere.com/knowledge-base-docs/get-plantings/

Examples

1
2
3
4
5
## Not run: get_planting(field_id='field_test')
get_planting(field_id = 'field_test', planting_id = '156035')
get_planting('field_test', current = T)
get_planting(field_id='field_test', offset = '0', limit = '5')
## End(Not run)

aWhereAPI/aWhere-R-Library documentation built on Nov. 5, 2021, 3:35 a.m.