Visualizations/Fundamentals of DV by Claus O. Wilke

Color Scales (source from <Fundamentals of DV by Claus O.Wilke>)

metamong 2022. 4. 18.

β˜† THREE fundamental use cases for color in data visualizations β˜†

1. as a tool to DISTINGUISH πŸ‘

→ 'distinguishing discrete items or groups that do not have an intrinsic order, such as different countries on a map or different manufacturers of a certain product'

 

πŸ‘‰ dataλ₯Ό μ„œλ‘œ κ΅¬λΆ„ν•˜λŠ” μš©λ„λ‘œ 색을 μ“Έ λ•ŒλŠ” data 간에 λ‚΄μž¬λœ μˆœμ„œκ°€ 없을 κ²½μš°μ΄λ‹€. μˆœμ„œκ°€ μ‘΄μž¬ν•œλ‹€λ©΄ μˆœμ„œκ°€ κ°€κΉŒμš΄ data 간에 μ’€ 더 μœ μ‚¬ν•œ 색을 λΆ€μ—¬ν•΄μ•Ό ν•˜λ―€λ‘œ data간에 μ„œλ‘œ 영ν–₯이 없을 경우 색을 κ³ λ₯Ό λ•Œ ν•œμ •ν•œλ‹€!

 

πŸ‘‰ 이럴 λ•Œ, μš°λ¦¬λŠ” qualitative color scale을 μ‚¬μš©!

 

β‘  'contains a finite set of specific colors that are chosen to look clearly distinct from each other while also being equivalent to each other' → λ¬΄ν•œν•œ μƒ‰μ˜ μ’…λ₯˜κ°€ μ•„λ‹Œ ν•œμ •λœ μƒ‰λ“€λ‘œ λͺ¨μ—¬ μžˆλŠ” set이며, 색상 κ°„ clearν•˜κ²Œ ꡬ뢄됨

 

β‘‘''no one color should stand out relative to the others'  μƒ‰μƒ κ°„ λͺ¨λ‘ λ™λ“±ν•˜κ²Œ, 즉 κ·Έ μ–΄λ–€ 색도 νŠ€μ–΄μ„œλŠ” μ•ˆλ¨

 

β‘’ ''the colors should not create the impression of an order, as would be the case with a sequence of colors that get successively lighter. Such colors would create an apparent order among the items being colored, which by definition have no order.'  → μ„œλ‘œ μˆœμ„œκ°€ λ‚΄μž¬λœ κ²ƒμ²˜λŸΌ λ³΄μ΄λŠ” 색상듀이 μžˆμ–΄μ„œλŠ” μ•ˆλ¨. 즉 색상은 λΉ„μŠ·ν•œ, μ’€ 더 μ—°ν•˜κ³  μ§„ν•œ 색상듀이 μžˆμ–΄μ„œλŠ” μ•ˆλ¨

 

- qualitative color scale μ˜ˆμ‹œ -

 

> qualitative color scale을 μ‚¬μš©ν•œ data visualization μ˜ˆμ‹œλ₯Ό 보자.

 

 

↑ 미ꡭ의 λ„€ 지역 <West, South, Midwest, Northeast> 간에 μ„œλ‘œ λ‚΄μž¬λœ μˆœμ„œλ„ μ—†λŠ”, μ„œλ‘œ λͺ…λ°±ν•œ discreteν•œ 속성을 κ°€μ§€λ―€λ‘œ ν•΄λ‹Ή μ €μžλŠ” Okable Ito qualitative color scale을 μ‚¬μš©ν•˜μ—¬ 색상을 μ§€μ •ν–ˆλ‹€. μ΄λ ‡κ²Œ qualitative color scale을 μ‚¬μš©ν•˜λ‹ˆ μ–΄λ–€ dataκ°€ ν•΄λ‹Ή 지역에 μ†ν•˜λŠ” 지 ν•œ λˆˆμ— λ“€μ–΄μ˜΄!

2. to REPRESENT data values πŸ’ͺ

→ 'sequential color scale' μ‚¬μš©

 

→ 'Such a scale contains a sequence of colors that clearly indicate (i) which values are larger or smaller than which other ones and (ii) how distant two specific values are from each other. The second point implies that the color scale needs to be perceived to vary uniformly across its entire range.' 

 

β‘  sequentialν•˜κΈ° λ•Œλ¬Έμ— μ–΄λ–€ valueκ°€ 더 큰 값을 가진닀면 ν•΄λ‹Ή valueλŠ” 더 μ§„ν•˜κ²Œ ν‘œμ‹œλ  것이닀. value의 크기에 따라 μƒ‰μƒμ˜ 짙고 μ–•μŒμ΄ 달라진닀.

 

β‘‘ 두 valueκ°„μ˜ 차이가 μ’€ 더 μž‘μ€, 즉 거리가 μ„œλ‘œ κ°€κΉŒμš΄ value듀은 μƒ‰μƒμ˜ 차이가 더 μ—†κ²Œ ν‘œν˜„ν•΄μ•Ό ν•˜λ―€λ‘œ, 전체 색상 λ²”μœ„λ₯Ό 놓고 봀을 λ•Œ μƒ‰μƒ λ³€ν™”κ°€ κ· μΌν•˜κ²Œ μ΄λ£¨μ–΄μ Έμ•Ό ν•œλ‹€.

 

β‘’ single hue - ν•œ μ’…λ₯˜μ˜ 색상을 가지고 짙고 μ˜…μŒμœΌλ‘œ ν‘œν˜„ν•˜λŠ” κ²½μš°κ°€ μΌλ°˜μ μ΄λ‹€. / ν•˜μ§€λ§Œ multiple huesλ₯Ό μ΄μš©ν•˜μ—¬ ν‘œν˜„λ„ κ°€λŠ₯ν•˜λ‹€. 이럴 λ•ŒλŠ” μžμ—°μ„Έκ³„μ—μ„œ λ³΄μ΄λŠ” 색 μ’…λ₯˜μ˜ λ³€ν™”λ₯Ό μ΄μš©ν•΄ ν‘œν˜„ν•˜λŠ” κ²½μš°κ°€ λ§Žλ‹€.

 

- sequential color scale μ˜ˆμ‹œ -

 

> 특히 지정학적 dataλ₯Ό μ΄μš©ν•΄ 각 지역별 data의 크고 μž‘μŒμ„ 'sequential color scale'을 μ΄μš©ν•΄ mapμ—μ„œ ν‘œν˜„ν•˜λŠ” κ²½μš°κ°€ λ§Žμ€ 데 μ•„λž˜μ˜ μ˜ˆμ‹œλ₯Ό 보자. 이런 map을 choropleth map이라고 ν•œλ‹€

 

- μ–΄λ”” 지역이 적게 벌고 많이 λ²„λŠ” 지 'μƒ‰μƒμ˜ 농도'λ₯Ό 톡해 ν•œ λˆˆμ— μ•Œ 수 있음! -

 

🀚 μ—¬κΈ°μ„œ! μš°λ¦¬λŠ” ν•œ 기쀀에 μ˜ν•΄μ„œλ§Œ 색상 농도가 짙어지고 μ˜…μŒμ„ ν‘œν˜„ν•˜λŠ” 것이 μ•„λ‹Œ, μ–‘ λ°©ν–₯, 즉 예λ₯Ό λ“€λ©΄ ν•œ μ§€μ μ—μ„œ positive와 negativeν•œ 두 λ°©ν–₯으둜 λ»—μ–΄λ‚˜κ°€λŠ” dataλ₯Ό ν‘œν˜„ν•˜κ³  싢을 λ•Œκ°€ μžˆλ‹€. 이럴 λ•ŒλŠ” μ€‘κ°„ 지점 mid point에 제일 μ˜…μ€ 색상을 두고 이 pointλ₯Ό 기점으둜 점점 positive & negativeν•œ data둜 λ»—μ–΄λ‚˜κ°€λ©΄μ„œ λ‹€λ₯Έ μ’…λ₯˜μ˜ μƒ‰μœΌλ‘œ 각각 μ§™μ–΄μ§€κ²Œ ν‘œν˜„ν•˜λŠ” color scale을 μ„ νƒν•œλ‹€.

 

(diverging color scale이라 뢀름)

 

''In some cases, we need to visualize the deviation of data values in one of two directions relative to a neutral midpoint. One straightforward example is a dataset containing both positive and negative numbers. We may want to show those with different colors, so that it is immediately obvious whether a value is positive or negative as well as how far in either direction it deviates from zero. The appropriate color scale in this situation is diverging color scale. We can think of a diverging scale as two sequential scales stiched together at a common midpoint, which usually is represented by a light color. Diverging scales need to be balanced, so that the progression from light colors in the center to dark colors on the outside is approximately the same in either direction. Otherwise, the perceived magnitude of a data value would depend on whether it fell above or below the midpoint value.'

 

- sequential color scale - diverging color scale μ˜ˆμ‹œ -

 

> positive & negative 뿐만 μ•„λ‹ˆλΌ, μ‹€μ œ 데이터 μ‹œκ°ν™”ν•  λ•Œ 이 scale은 μ–΄λ–€ λ•Œ 쓰이냐면.. μ€‘κ°„ 지점은 μ€‘μš”ν•˜μ§€ μ•Šμ€λ°, μ–‘ κ·Ήλ‹¨μ˜ data λ‚΄μš©μ„ μ•Œλ €μ£Όκ³  싢을 λ•Œ ν•΄λ‹Ή μ‹œκ°ν™”λ₯Ό μ‚¬μš©ν•œλ‹€. μ•„λž˜ μ‹œκ°ν™” μ˜ˆμ‹œλ₯Ό μ°Έκ³ ν•˜μž

 

- 밀색 지역은 백인이 거의 μ—†κ³ , 청색 지역은 백인 μœ„μ£ΌλΌλŠ” 두 가지 μ˜λ―Έκ°€ λͺ…λ°±νžˆ μ „λ‹¬λœλ‹€. -

 

↑ μš°λ¦¬λŠ” 백인 인ꡬ λΉ„μœ¨μ΄ 50% 쀑간인 μ§€μ—­μ—λŠ” 큰 관심이 μ—†λ‹€. λ°˜λ©΄μ— λ°±μΈμ΄ 거의 μ—†λŠ” μ§€μ—­μ΄κ±°λ‚˜ & 백인 μœ„μ£Όμ˜ 지역 - 즉 μ–‘ 극단인 data에 관심이 λ§ŽμœΌλ―€λ‘œ, 이럴 λ•Œ diverging color scale (sequential)을 μ‚¬μš©ν•  수 μžˆλ‹€λŠ” 점! μ•Œμ•„λ‘μž.

3. to HIGHLIGHT ❗

 'There may be specific categories or values in the dataset that carry key information about the story we want to tell, and we can strengthen the story by emphasizing the relevant figure elements to the reader. An easy way to achieve this emphasis is to color these figure elements in a color or set of colors that vividly stand out against the rest of the figure. This effect can be achieved with accent color scales, which are color scales that contain both a set of subdued colors and a matching set of stronger, darker, and/or more saturated colors'

 

πŸ‘‰ μ£Όμš” μ •λ³΄λ§Œ κ°•μ‘°ν•˜κ³  싢을 λ•Œ 색상을 μ‚¬μš©ν•˜κΈ°λ„ ν•œλ‹€. 이 λ•ŒλŠ” accent color scalesλ₯Ό μ‚¬μš©ν•  수 μžˆλŠ”λ°, ν•΄λ‹Ή scale의 μƒ‰μƒλ“€μ—λŠ” μ˜…μ€ 색상듀과 농도λ₯Ό 높인 μƒ‰μƒλ“€λ‘œ κ΅¬μ„±λ˜μ–΄ μžˆλ‹€.

 

- accent color scale μ˜ˆμ‹œ -

 

> 이 λ•Œ, β‘ κΈ°μ€€μ΄ λ˜λŠ” baseline color듀은 μƒλŒ€μ μœΌλ‘œ μ˜…κ²Œ ν‘œμ‹œν•˜κ³  κ°•μ‘°ν•˜κ³  싢은 dataμ—λ§Œ 색상을 μ§„ν•˜κ²Œ ν‘œμ‹œν•  수 μžˆλ‹€. μ•„λ‹ˆλ©΄ β‘‘baseline color듀은 λͺ¨λ‘ 색상을 μ—†μ• κ³  κ°•μ‘°ν•˜κ³  싢은 dataμ—λ§Œ μ§„ν•œ 색상을 μž…νž μˆ˜λ„ μžˆλ‹€.

 

- (ν•˜λ‹¨) μ™Όμͺ½ β‘  / 였λ₯Έμͺ½ β‘‘ -

 

- 색상 정리 끝! -

-- μœ„μ—μ„œ μ–ΈκΈ‰ν•œ λ‹€μ–‘ν•œ color scale의 python μ‹œκ°ν™” 방법은 μΆ”ν›„ ν¬μŠ€νŒ… μ˜ˆμ • --


* λͺ¨λ“  λ‚΄μš© 좜처 - μ‹œκ°ν™”μ˜ 정석 'fundamentals of data visualizations' - Claus 아저씨 πŸ§”πŸ₯° https://clauswilke.com/dataviz/color-basics.html#ref-ColorBrewer 

* choropleth map - https://en.wikipedia.org/wiki/Choropleth_map

* 좜처) Brewer, Cynthia A. 2017. “ColorBrewer 2.0. Color Advice for Cartography.”

- 색상지원 https://colorbrewer2.org/#type=sequential&scheme=BuGn&n=3 

λŒ“κΈ€