<commit_before>"""
Violinplot
----------
This example shows how to make a king of a Violinplot.
"""
# category: other charts
import altair as alt
from vega_datasets import data

source = data.cars.url

violinplot =  alt.Chart(source).transform_filter(
    alt.FieldGTPredicate(field='Miles_per_Gallon',gt=0)
).transform_bin(
    ['bin_max', 'bin_min'], field='Miles_per_Gallon', bin=alt.Bin(maxbins=20)
).transform_calculate(
    binned='(datum["bin_max"]+datum["bin_min"])/2'
).transform_aggregate(
    value_count='count()', groupby=['Origin', 'binned']
).transform_impute(
    impute='value_count', groupby=['Origin'], key='binned', value=0
).mark_area(
    interpolate='monotone',
    orient='horizontal'
).encode(
    x=alt.X(
        'value_count:Q',
        title=None,<commit_msg>datum notation<commit_after>"""
Violinplot
----------
This example shows how to make a king of a Violinplot.
"""
# category: other charts
import altair as alt
from altair import datum
from vega_datasets import data

source = data.cars.url

violinplot =  alt.Chart(source).transform_filter(
    datum.Miles_per_Gallon > 0
).transform_bin(
    ['bin_max', 'bin_min'], field='Miles_per_Gallon', bin=alt.Bin(maxbins=20)
).transform_calculate(
    binned=(datum.bin_max + datum.bin_min) / 2
).transform_aggregate(
    value_count='count()', groupby=['Origin', 'binned']
).transform_impute(
    impute='value_count', groupby=['Origin'], key='binned', value=0
).mark_area(
    interpolate='monotone',
    orient='horizontal'
).encode(
    x=alt.X(
        'value_count:Q',
        title=None,
{'fraction_non_alphanumeric': 0.161474888747616, 'fraction_numerical': 0.006357279084551812, 'mean_word_length': 4.661870503597123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6414640', 'n_tokens_mistral': 567, 'n_tokens_neox': 556, 'n_words': 111}