Skip to content

Commit

Permalink
Updated json specs
Browse files Browse the repository at this point in the history
  • Loading branch information
gchure committed Sep 23, 2020
1 parent da0e6ef commit 1399bb1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@
data['year'] = pd.to_datetime(data['year'], format='%Y')
for g, d in data.groupby('subcategory'):
chart= alt.Chart(d).encode(
x=alt.X(field="year", type="temporal", timeUnit='year'),
x=alt.X(field="year", type="temporal", timeUnit='year',
title="year"),
y=alt.Y(field="mass_produced_Mt",
type="quantitative",
title="produced mass [Mt]"),
tooltip=[alt.Tooltip("year:T", timeUnit="year", title="year"),
alt.Tooltip("mass_produced_Mt:Q", format="0.0f", title="mass [Mt]")]
).properties(width=300,
).properties(width="container",
height=300
).mark_line(color='dodgerblue')
l = chart.mark_line(color='dodgerblue')
p = chart.mark_point(filled=True, color='dodgerblue')
figure = alt.Layer(l, p)
figure.save(f'../vis/{g}.json')
figure = alt.layer(l, p)
figure.save(f'{g}.json')
# %%

chart
Expand Down

Large diffs are not rendered by default.

0 comments on commit 1399bb1

Please sign in to comment.