Color scales and palettes
📖 Scenario: You are working on a simple data visualization project in R. You want to use colors to represent different values in your data clearly and nicely.
🎯 Goal: You will create a vector of values, set up a color palette, apply a color scale to your values, and then display the colors to see how the palette works.
📋 What You'll Learn
Create a numeric vector with specific values
Create a color palette using R's built-in color functions
Map the numeric values to colors using the palette
Print the resulting colors to the console
💡 Why This Matters
🌍 Real World
Color scales help show data differences clearly in charts and maps, making information easier to understand.
💼 Career
Data analysts and scientists use color palettes to make visualizations that communicate insights effectively.
Progress0 / 4 steps