Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

rnpn (version 1.3.0)

npn_get_point_data: Get Point Data Value

Description

This function can get point data about any of the NPN geospatial layers.

Usage

npn_get_point_data(layer, lat, long, date, store_data = TRUE)

Value

Returns a numeric value for any NPN geospatial data layer at the specified lat/long/date. If no value can be retrieved, then -9999 is returned.

Arguments

layer

The coverage id (machine name) of the layer for which to retrieve. Applicable values can be found via the npn_get_layer_details() function under the name column.

lat

The latitude of the point.

long

The longitude of the point.

date

The date for which to get a value.

store_data

Boolean value. If set TRUE then the value retrieved will be stored in a global variable named point_values for later use.

Details

Please note that this function pulls this from the NPN's WCS service so the data may not be totally precise. If you need precise AGDD values try using the npn_get_agdd_point_data() function.

Examples

Run this code
if (FALSE) {
value <-
  npn_get_point_data(
    layer = "gdd:agdd",
    lat = 38.8,
    long = -110.5,
    date = "2022-05-05"
  )
}

Run the code above in your browser using DataLab