create_field: Create Field

Description Usage Arguments Details Value References Examples

View source: R/create.R

Description

create_field This function will generate a new field associated with the user's account in the aWhere API. This is a one-time operation for each field.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
create_field(
  field_id,
  latitude,
  longitude,
  farm_id,
  field_name = "",
  acres = "",
  verbose = TRUE,
  keyToUse = awhereEnv75247$uid,
  secretToUse = awhereEnv75247$secret,
  tokenToUse = awhereEnv75247$token,
  apiAddressToUse = awhereEnv75247$apiAddress
)

Arguments

field_id

an ID of your choosing (string)

latitude

the latitude of the field location in decimal format (double)

longitude

the longitude of the field location in decimal format (double)

field_name

a name of the location (optional - string)

acres

the acres of the field (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)

farmid

an ID of your choosing for the farm to which this field belongs (string)

Details

Fields are how you manage the locations for which you're tracking weather, agronomics, models, and progress over growing seasons in the aWhere API. By registering a field, you create a quick way to consistently reference locations across all of our APIs, and allow our modeling APIs to better operate and tune to the conditions and status of each specific field.

Creating a field registers the location with the aWhere system, making it easier to reference and track your locations as well as run agronomics and models automatically. You only need to create a field once, after which you can reference the field by ID (you'll use this ID in most URI endpoints in the aWhere system).

All spaces will be converted to underscores to conform with the requirements of the API.

Value

- printed text that informs if the query succeeded or not

References

https://docs.awhere.com/knowledge-base-docs/create-a-field-location/

Examples

1
2
3
4
5
## Not run: 
create_field(field_id = "field123",latitude = 39.8282,longitude = -98.5795,farm_id = "farmA",field_name = "Some Field Location",acres = 100)
create_field(field_id = "field_test", latitude = 39.971906, longitude = -105.088773, farm_id = "Office")

## End(Not run)

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