![]() ![]() Shiny allows for the generation of interactive web content from R. If you want to open this window, feel free to run the code. I have commented out the code example below because this will cause a Shiny window to open that allows you to explore the color palettes interactively. These color ramps can also be accessed in R, and a variety of sequential, diverging, and qualitative palettes are provided. If you are a GIS professional, you might be familiar with the ColorBrewer2 website by Cynthia Brewer of Penn State that offers guidance for the selection of colors for choropleth maps. The tmaptools package provides a palette_explorer() function that can be used to explore available color palettes made available by ColorBrewer. We will now explore mapping variables to colors. Tm_shape(states) + tm_polygons( col= "gray") + tm_compass( position = c( "left", "bottom")) + tm_scale_bar( position = c( "left", "bottom")) + tm_layout( main.title = "States") + tm_text( "STATE_ABBR", size= "AREA")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |