In addition, when using a palette, it should be clear which color stands for lower or higher values. Green is associated with forests and blue with bodies of water. This example can also be extended to geographical features. For example, red is associated with negative things, while green is associated with positive things. You should pay attention to the selection of your colors: Colors transfer feelings. Categorical palettes: Easily distinguishable colors, ideal for categorical dataĪlternatively, a custom palette can be passed, for this purpose HEX codes may be used. Should be used for continuous variables with a natural midpoint ( midpoint). Diverging pallets: Follow a gradient from dark to light, to dark. Sequential pallets: Follow a gradient from light to dark. The palettes from these packages can be divided into three types of palettes: # load shapefile for bavaria bavaria = 1000000, ] # turn it into an sf object cities % st_as_sf( coords = c( "long", "lat"), crs = 4326) %>% st_cast( "POINT") # keep only the cities that are in europe cities <- st_intersection(cities, st_union(europe_shape)) # turn the europe object into a MULTILINESTRING europe_shape <- st_cast(europe_shape, "MULTILINESTRING") communities <- read_sf( "gmd_ex.shp") # keep only the ones in rosenheim rosenheim <- communities # load the csv file for honey production in the us honey_csv <- read_csv( "honeyproduction.csv") # load the xlsx file for abbreviations of the us states abbrev <- read_xlsx( "abbrev.xlsx") # load honey shapefile honey_sf <- read_sf( "honey.shp")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |