Library(mapproj) data(unemp, package = "viridis") county_df <- map_data( "county", projection = "albers", parameters = c( 39, 45)) names(county_df) <- c( "long", "lat", "group", "order", "state_name", "county") county_df $state <- state.abb county_df $state_name <- NULL state_df <- map_data( "state", projection = "albers", parameters = c( 39, 45)) choropleth <- merge(county_df, unemp, by = c( "state", "county")) choropleth <- choropleth ggplot(choropleth, aes(long, lat, group = group)) + geom_polygon( aes( fill = rate), colour = alpha( "white", 1 / 2), linewidth = 0.2) + geom_polygon( data = state_df, colour = "white", fill = NA) + coord_fixed() + theme_minimal() + ggtitle( "US unemployment rate by county") + theme( axis.line = element_blank(), axis.text = element_blank(), axis.ticks = element_blank(), axis. The color map turbo was developed by Anton Mikhailov toĪddress the shortcomings of the Jet rainbow color map such as falseĭetail, banding and color blindness ambiguity. Originally created for the Seaborn statistical data The color map cividis is a corrected version of The science behind the creation of these color maps, you can watch this Inferno, and plasma were created by Stéfan vanĭer Walt ( and Nathaniel Smith ( If you want to know more about “plasma”, “inferno”, “civids”, “mako”, and “rocket” -, and a rainbow The package contains eight color scales: “viridis”, the primaryĬhoice, and five alternatives with similar properties - “magma”, Provides additional functionalities, in particular bindings for Lightweight and dependency-free as possible for maximum compatibility ViridisLite provides the base functions for generating Properties hold true for people with common forms of colorblindness, as Robust to colorblindness, so that the above.Other have more different-appearing colors, consistently across the Red, green, and blue are each represented by two characters (rrggbb). Perceptually uniform, meaning that values close toĮach other have similar-appearing colors and values far away from each.Colorful, spanning as wide a palette as possible so.The color maps are also perceptually-uniform,īoth in regular form and also when converted to black-and-white for Readability for readers with common forms of color blindness and/orĬolor vision deficiency. Provide a series of color maps that are designed to improve graph
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |