KGC Data Resolution Example

Two differing resolutions of climate zone data have been included in this package.

These can be accessed with the parameter res in the RoundCoordinates() and LookupCZ() functions.

Resolution Details

Example

library("kgc")
print(head(kgcities))

  # Query Course Resolution
  data <- data.frame(kgcities, rndCoord.lon = RoundCoordinates(kgcities$lon), rndCoord.lat = RoundCoordinates(kgcities$lat))
  data <- data.frame(data,CZ.c=LookupCZ(data))
  colnames(data)[which(colnames(data)=='rndCoord.lon')] <- 'rndCoord.lon.course'
  colnames(data)[which(colnames(data)=='rndCoord.lat')] <- 'rndCoord.lat.course'

  # Query Fine Resolution
  data <- data.frame(data, rndCoord.lon = RoundCoordinates(kgcities$lon,res='fine',latlong='lon'), rndCoord.lat = RoundCoordinates(kgcities$lat,res='fine',latlong='lat'))
  data <- data.frame(data,CZ.f=LookupCZ(data,res='fine'))

  # Print Results
  print(data[,c(1,3,8,11)])


Try the kgc package in your browser

Any scripts or data that you put into this service are public.

kgc documentation built on May 2, 2019, 1:47 p.m.