get_earthtones {earthtones}R Documentation

Find the color palette of a particular place on earth

Description

Earthtones downloads a satellite image from google earth, translates the image into a perceptually uniform color space, runs one of a few different clustering algorithms on the colors in the image searching for a user supplied number of colors, and returns the resulting color palette.

Usage

get_earthtones(latitude = 50.759, longitude = -125.673, zoom = 11,
  number_of_colors = 3, method = "pam", sampleRate = 500,
  include.map = TRUE, ...)

Arguments

latitude

center of the returned satellite image

longitude

center of the returned satellite image

zoom

generally this should be between 2 and 20; higher values zoom in closer to the target lat/long; for details see get_map

number_of_colors

how many colors do you want?

method

specifies clustering method. Options are kmeans or pam (partitioning around medoids)

sampleRate

subsampling factor - bigger number = more subsampling and less computation

include.map

logical flag that determines whether to return the satellite image with the data object; for exploring the world leave this as TRUE; if/when you settle on a color scheme and are using this within a visualization, change to FALSE and the function will return a normal R-style color palette.

...

additional arguments passed to get_map

Details

Different parts of the world have different color diversity. Zoom is also especially important. To visualize the results, simply print the resulting object.

See Also

get_map, kmeans

Examples


## Not run: 

get_earthtones(latitude = 24.2, longitude = -77.88, zoom = 11, number_of_colors = 5)

## End(Not run)


[Package earthtones version 0.1.1 Index]