Learn R Programming

MazamaLocationUtils (version 0.4.4)

table_addCoreMetadata: Add missing core metadata columns to a known location table

Description

An existing table will be amended to guarantee that it includes the following core metadata columns.

  • locationID

  • locationName

  • longitude

  • latitude

  • elevation

  • countryCode

  • stateCode

  • countyName

  • timezone

  • houseNumber

  • street

  • city

  • postalCode

The longitude and latitude columns are required to exist in the incoming tibble but all others are optional.

If any of these core metadata columns are found, they will be retained.

The locationID will be generated (anew if already found) from existing longitude and latitude data.

Other core metadata columns will be filled with NA values of the proper type.

The result is a tibble with all of the core metadata columns. Theses columns must then be filled in to create a usable "known locations" table.

Usage

table_addCoreMetadata(locationTbl = NULL, precision = 10)

Value

Tibble with the metadata columns required in a "known locations" table.

Arguments

locationTbl

Tibble of known locations. This input tibble need not be a standardized "known location" with all required columns. They will be added.

precision

precision argument passed on to location_createID.