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.
Course Resolution
Distance between data points, both latitude and longitude, is 0.5 degrees.
Latitude and longitude values are rounded to the nearest value ending in either 0.25 and 0.75.
Fine Resolution
Distance between data points, in both latitude and longitude, is 100 seconds.
Data originates from a 12960 x 6480 pixel image, and coordinates are rounded to the center coordinates of the nearest pixel.
An selection of example cities worldwide, and their reported climate zones from Wikipedia, have been included in this package in the dataframe kgcities
.
Estimated climate zones for each city from both course and fine resolution datasets are queried, and results are shown in tabular format.
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)])
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.