The pallettes of Earth
Take a satellite image, and extract the pixels into a uniform 3-D color space. Then run a clustering algorithm on those pixels, to extract a number of clusters. The centroids of those clusters them make a representative palette of the image. The R package earthtones by Will Cornwell, Mitch Lyons, and Nick Murray -- now available on CRAN -- does all this for you. Pass the get_earthtones function a latitude and longitude, and it will grab the Google Earth tile at the requested zoom level (8 works well for cities) and generate a palette with the desired number of colors.
Sep-7-2016, 19:05:42 GMT