정적 시각화
인터랙티브 종류
파이썬의 인터렉티브 라이브러리
Matplotlib
Plotly
인터렉티브 시각화에 가장 많이 사용되는 Plotly
예시 + 문서화가 잘되어 있기 때문에 커스텀 하기가 쉽다.
통계 시각화(seaborn) 외에도 지리 시각화 + 3D 시각화 + 금융 시각화 등 다양한 시각화 기능 제공
또한, 웹에서 사용가능하며 형광 Color가 인상적이다.
Plotly Express
Bokeh
Altair
Plolty
plotly로 시각화를 하면 오른쪽 상단에 여러 인터렉션을 제공한다.
scatter
line, bar plot도 위의 scatter와 거의 비슷
다양한 차트
# sunburst
fig = px.sunburst(tips,
path=['day', 'time', 'sex'],
values='total_bill')
fig.show()
# treemap
fig = px.treemap(tips,
path=['day', 'time', 'sex'],
values='total_bill')
fig.show()
fig = px.scatter_3d(iris,
x='sepal_length',
y='sepal_width',
z='petal_width',
symbol='species',
color='species')
fig.show()
# parallel_coordinates
fig = px.parallel_coordinates(iris,color="species_id",
#color_continuous_scale=px.colors.diverging.Tealrose,)
fig.show()
# parallel_categories
tips = px.data.tips()
tips['sex'] = tips['sex'].apply(lambda x : 'red' if x=='Female' else 'gray')
fig = px.parallel_categories(tips, color='sex')
fig.show()
# scatter_geo
fig = px.scatter_geo(geo_data,
locations="iso_alpha",
color="continent",
size="pop",
animation_frame="year",
projection="natural earth")
fig.show()
# choropleth
fig = px.choropleth(geo,
locations="iso_alpha",
color="continent",
projection="natural earth")
fig.show()