first commit

This commit is contained in:
Ayxan
2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 changed files with 4428337 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
"""
Natural Disasters
-----------------
This example shows a visualization of global deaths from natural disasters.
"""
# category: case studies
import altair as alt
from vega_datasets import data
source = data.disasters.url
alt.Chart(source).mark_circle(
opacity=0.8,
stroke='black',
strokeWidth=1
).encode(
alt.X('Year:O', axis=alt.Axis(labelAngle=0)),
alt.Y('Entity:N'),
alt.Size('Deaths:Q',
scale=alt.Scale(range=[0, 4000]),
legend=alt.Legend(title='Annual Global Deaths')
),
alt.Color('Entity:N', legend=None)
).properties(
width=450,
height=320
).transform_filter(
alt.datum.Entity != 'All natural disasters'
)