Recent Releases of Altair
Altair - Version 5.5.0
Release 5.5.0
The Vega-Altair team is pleased to announce the release of version 5.5.0. This version introduces several exciting new features and enhancements including a revamped theme system, a new renderer optimized for screen readers, and numerous type system updates that improve auto-completion and make it easier to integrate Altair into larger typed programs.
This release adds Python 3.13 and removes Python 3.8 support. It also includes a variety of documentation improvements and a range of important bug fixes.
Thanks to our maintainers (@binste, @dangotbanned, @joelostblom, @mattijn, and @jonmmease), returning contributors (@MarcoGorelli, @daylinmorgan, and @dsmedia), and first time contributors (@jpn--, @davidgroves, and @apoorvkh) for these improvements.
What's Changed
Deprecation
alt.themes
This release deprecates the alt.themes ThemeRegistry object and replaces it with an improved theme API in the new alt.theme module.
See the updated Chart Themes documentation for more information.
[!NOTE] Usage of the legacy
alt.themesregistry will be supported until version 6, but will now display a warning on first use.
- Refactor
alt.themes->alt.themeby @dangotbanned in #3618 - Adds
@alt.theme.registerdecorator by @dangotbanned in #3526 - Adds
ThemeConfig(TypedDict) by @dangotbanned in #3536
Example of registering a custom theme
```python import altair as alt import pandas as pd
data = pd.DataFrame({'x': [5, 3, 6, 7, 2], 'y': ['A', 'B', 'C', 'D', 'E']})
@alt.theme.register("mylittletheme", enable=True) def custom_theme(): return alt.theme.ThemeConfig( config={ "bar":{"color":"black"} } )
chart = alt.Chart(data).mark_bar().encode(
x='x',
y='y',
)
chart # enable default using alt.theme.enable("default")
```
Example of instant feedback while you define a theme config through Pylance in VSCode
Enhancements
Olli Renderer
This release integrates the Olli project to provide a chart renderer that augments chart visualizations with a keyboard-navigable structure accessible to screen readers.
- Add 'olli' renderer to generate accessible text structures for screen reader users by @binste in #3580
Example of olli renderer:
```python import altair as alt from vega_datasets import data
alt.renderers.enable("olli")
cars = data.cars.url
chart = alt.Chart(cars).markbar().encode(
y='Cylinders:O',
x='meanacc:Q'
).transformaggregate(
meanacc='mean(Acceleration)',
groupby=["Cylinders"]
)
chart
```
Expressions and Selections
Several improvements were made to Altair's expression and selection APIs:
- Generate
exprmethod signatures, docs by @dangotbanned in #3600 - Support
&,|,~on all...Predicateclasses by @dangotbanned in #3668 - Support
datetime.(date|datetime)inExpression(s) by @dangotbanned in #3654 - Support
datetime.(date|datetime)as aSchemaBaseparameter by @dangotbanned in #3653 - Add missing
floattoIntoExpressionalias by @dangotbanned in #3611
Example of combining predicates within .transform_filter
```python import altair as alt from vega_datasets import data
source = data.population.url
chart = alt.Chart(source).markline().encode(
x="age:O",
y="sum(people):Q",
color="year:O"
).transformfilter(
~alt.FieldRangePredicate(field='year', range=[1900, 1960])
& (alt.datum.age <= 70)
)
chart
```

Example of using Python datetime.date for value in alt.selection_interval()
```python import datetime import altair as alt from vega_datasets import data
source = data.unemploymentacrossindustries.url dt_values = [datetime.date(2005, 1, 1), datetime.date(2009, 1, 1)]
brush = alt.selectioninterval( encodings=['x'], value={"x": dtvalues} )
base = alt.Chart(source).mark_area( color='goldenrod', opacity=0.3 ).encode( x='yearmonth(date):T', y='sum(count):Q', )
background = base.addparams(brush) selected = base.transformfilter(brush).mark_area(color='goldenrod')
background + selected
```
Multiple predicates and constraints in Chart.transform_filter
- Support
Chart.transform_filter(*predicates, **constraints)by @dangotbanned in #3664
Example of using keyword-argument constraints to simplify filter compositions:
```python import altair as alt from vega_datasets import data
source = data.population.url
chart = alt.Chart(source).markarea().encode(
x="age:O",
y="sum(people):Q",
color="year:O"
).transformfilter(year=2000, sex=1)
chart
```
Bug Fixes
- Resolve multiple
@utils.use_signatureissues by @dangotbanned in #3565 - Relax
dictannotations inchannels.pyby @dangotbanned in #3573 - Set charset=UTF-8 in HTML templates. by @davidgroves in #3604
- Replace unsafe
locals()manipulation inChart.encodeby @dangotbanned in #3637 - Revise generated annotation order by @dangotbanned in #3655
- Resolve
alt.bindingsignature/docstring issues by @dangotbanned in #3671 - Add missing
@skip_requires_pyarrow(requires_tzdata=True)by @dangotbanned in #3674 - Don't materialise Ibis table to PyArrow if using vegafusion data transformer by @MarcoGorelli in #3566
mypy1.12.0 errors by @dangotbanned in #3632- Resolve warnings in
test_api.pyby @dangotbanned in #3592
Documentation
Several new examples were added to the documentation
Example of using alt.when().then().otherwise()
```python import altair as alt from vega_datasets import data
source = data.cars()
brush = alt.selection_interval()
chart = alt.Chart(source).markpoint().encode(
x='Horsepower',
y='MilesperGallon',
color=alt.when(brush).then("Origin").otherwise(alt.value("lightgray"))
).addparams(
brush
)
chart
```
Example of using luminance in an expression to dynamically colorize text
```python import altair as alt from vega_datasets import data
source = data.barley()
base = alt.Chart(source).encode( x=alt.X('sum(yield):Q').stack('zero'), y=alt.Y('site:O').sort('-x'), text=alt.Text('sum(yield):Q', format='.0f') )
bars = base.markbar( tooltip=alt.expr("luminance(scale('color', datum.sumyield))") ).encode( color='sum(yield):Q' )
text = base.marktext( align='right', dx=-3, color=alt.expr("luminance(scale('color', datum.sumyield)) > 0.5 ? 'black' : 'white'") )
bars + text
```
- Unstack area to render cumulative chart correctly by @joelostblom in #3558
- Change remote nick to
originand capitalize version commit by @joelostblom in #3559 - Update releasing notes to reflect that main branch is now protected by @binste in #3562
- Split interactive docs section into subpages by @joelostblom in #3561
- Update docs to use correct init value for
selection_pointby @jpn-- in #3584 - Add example with overlapping bars in a grouped bar chart by @mattijn in #3612
- Bar chart with labels coloured by measured luminance by @mattijn in #3614
- Adds example Calculate Residuals by @dangotbanned in #3625
- Adds Vega-Altair Theme Test by @dangotbanned in #3630
- adds info with step size/independent scale by @daylinmorgan in #3644
- Fix "Layered chart with Dual-Axis" (Method syntax) by @dangotbanned in #3660
- Fix inaccurate
selection_intervalsignature by @dangotbanned in #3662 - Update
selection_pointsignature by @dangotbanned in #3663 - Update "Ranged Dot Plot" example by @dangotbanned in #3665
- Promote
when-then-otherwisein User Guide by @dangotbanned in #3544 - Add initial date range to interval selection example by @dsmedia in #3667
- Generate docstrings for
mark_methods by @dangotbanned in #3675 - Make plausible web analytics public and add link to maintainer notes by @binste in #3571
- Reduce
SchemaValidationErrortraceback length by @dangotbanned in #3530
Maintenance
- Drop support for Python 3.8 by @dangotbanned in #3647
- Add support Python 3.13 by @dangotbanned in #3591
- Improve
Thenannotations, autocompletion, docs by @dangotbanned in #3567 - Resolve
SIM910lint indisplay.pyby @dangotbanned in #3613 - Add
typings/to.gitignoreby @dangotbanned in #3560 - Adds
test-(slow|fast)options by @dangotbanned in #3555 - Remove
channelsparameter ininfer_encoding_typesby @dangotbanned in #3564 - Add include patterns for
pyrightby @dangotbanned in #3583 - Fix support
pylance>=2024.9.1by @dangotbanned in #3585 - Bump
typing_extensionspython to3.14by @dangotbanned in #3593 - Future-proof Duration type error message test by @MarcoGorelli in #3606
- Use
breaking,deprecationlabels in changelog by @dangotbanned in #3623 - Bump
vl-convert-pythonto1.7.0by @dangotbanned in #3633 - Add upper version bound on VegaFusion by @jonmmease in #3638
- Add untyped
vegafusiontomypyoverrides by @dangotbanned in #3640 - Remove outdated
schemapicomment by @dangotbanned in #3641 - Support generating
Unionaliases by @dangotbanned in #3656 - Moved
vl-convert-pythontosavedependency group by @apoorvkh in #3609 - Simplify
channels.pyoverloads by @dangotbanned in #3659 - Use more robust dtype comparisons, use Narwhals stable API in tests by @MarcoGorelli in #3670
- Use duckdb instead of ibis to test interchange-only support by @MarcoGorelli in #3672
- Resolve or ignore
pyright-only warnings by @dangotbanned in #3676 - Add
pyarrow-stubstodevdependencies by @dangotbanned in #3679 - Prep for VegaFusion 2.0 by @jonmmease in #3680
- Replace unconditional
typing_extensionsimports by @dangotbanned in #3683 - VegaFusion 2 will support narwhals by @jonmmease in #3682
- Bump narwhals to v1.13.1 by @mattijn in #3690
- Distinct Olli renderer template by @mattijn in #3689
- Fix ci warning for pivot.rst by @mattijn in #3691
- Correct nested
exprequivalence by @dangotbanned in #3624
Full Changelog: https://github.com/vega/altair/compare/v5.4.1...v5.5.0
Scientific Software - Peer-reviewed
- Python
Published by jonmmease over 1 year ago
Altair - Version 5.4.1
What's Changed
Enhancements
- feat(typing): Generate
Literalaliases inchannelsoverload(s) by @dangotbanned in https://github.com/vega/altair/pull/3535 - feat(typing): Generate
Literal(s) using"const"by @dangotbanned in https://github.com/vega/altair/pull/3538 ### Bug Fixes - fix: Raise informative error message if a non-existent column name is passed by @MarcoGorelli in https://github.com/vega/altair/pull/3533
- revert: Remove
sphinxversion constraint by @dangotbanned in https://github.com/vega/altair/pull/3541 - fix: Pass native dataframe to data transformers by @MarcoGorelli in https://github.com/vega/altair/pull/3550
- fix: Resolve
ThencopyTypeErrorby @dangotbanned in https://github.com/vega/altair/pull/3553 ### Documentation - docs: Explain the title
frameattribute by @dsmedia in https://github.com/vega/altair/pull/3537 ### Other Changes - ci: bump
ruff>=0.6.0by @dangotbanned in https://github.com/vega/altair/pull/3539 - ci: Remove
m2rfrommypy.overridesby @dangotbanned in https://github.com/vega/altair/pull/3540 - refactor: Simplify
SchemaBase.copyby @dangotbanned in https://github.com/vega/altair/pull/3543 - fix(typing): Resolve misc type ignores in
schemapi.pyby @dangotbanned in https://github.com/vega/altair/pull/3545 - test: Rename test to more specific
chart_error_example__four_errors_hide_fourthby @dangotbanned in https://github.com/vega/altair/pull/3546 - test: Shorten
test_chart_validation_errorstest ids by @dangotbanned in https://github.com/vega/altair/pull/3551 - refactor: Replace an indirect
SchemaBaseimport by @dangotbanned in https://github.com/vega/altair/pull/3556 - test: Fix deprecation warning from
ipywidgetsby @dangotbanned in https://github.com/vega/altair/pull/3557
Full Changelog: https://github.com/vega/altair/compare/v5.4.0...v5.4.1
Scientific Software - Peer-reviewed
- Python
Published by joelostblom over 1 year ago
Altair - Version 5.4.0
What's Changed
Enhancements
- Update Vega-Lite from version 5.17.0 to version 5.20.1; see Vega-Lite Release Notes. By @binste in https://github.com/vega/altair/pull/3479 and https://github.com/vega/altair/pull/3525
- Remove several dependencies to make the package more lightweight:
- feat: make pandas and NumPy optional dependencies, don't require PyArrow for plotting with Polars/Modin/cuDF by @MarcoGorelli in https://github.com/vega/altair/pull/3452
- Remove
toolzdependency by @dangotbanned in https://github.com/vega/altair/pull/3426
- feat: Improve the syntax for conditions with multiple predicates. See the documentation of
alt.whenfor examples by @dangotbanned in https://github.com/vega/altair/pull/3427 and https://github.com/vega/altair/pull/3492 - feat: Reimplement
alt.expras a class that is understood by IDEs by @dangotbanned in https://github.com/vega/altair/pull/3466 - feat: Support a wider range of iterables, i.e. many places in Altair now accept not only lists but
np.array,pd.Series,tuples, etc. by @dangotbanned in https://github.com/vega/altair/pull/3501 - feat: Adds 4 new
carbonthemes, provide autocomplete for themes by @dangotbanned in https://github.com/vega/altair/pull/3516 - perf: Fix issues with
Chart|LayerChart.encode, 1.32x speedup toinfer_encoding_typesby @dangotbanned in https://github.com/vega/altair/pull/3444
Various typing improvements:
* feat(typing): Adds public altair.typing module by @dangotbanned in https://github.com/vega/altair/pull/3515
* feat(typing): @deprecated versioning, IDE highlighting by @dangotbanned in https://github.com/vega/altair/pull/3455
* feat: Adds ChartType type and type guard is_chart_type. Change PurePath to Path type hints by @dangotbanned in https://github.com/vega/altair/pull/3420
* feat(typing): adds Map alias for Mapping[str, Any] by @dangotbanned in https://github.com/vega/altair/pull/3458
* feat(typing): Ban typing.Optional import using ruff by @dangotbanned in https://github.com/vega/altair/pull/3460
* feat(typing): Further simplify generated Literal aliases by @dangotbanned in https://github.com/vega/altair/pull/3469
* feat(typing): Fully annotate api.py by @dangotbanned in https://github.com/vega/altair/pull/3508
Bug Fixes
- fix(typing): Resolve
mypy==1.11.0issues inplugin_registryby @dangotbanned in https://github.com/vega/altair/pull/3487 - fix: solve mypy errors which are due to same object names in core.py and channels.py by @binste in https://github.com/vega/altair/pull/3414
- fix: remove remapped
ruffrulePLR1701by @dangotbanned in https://github.com/vega/altair/pull/3453 - fix(docs):
@utils.use_signatureformatting by @dangotbanned in https://github.com/vega/altair/pull/3450 - fix(typing): Ignore
[arg-type]error in_deduplicate_enum_errorsby @dangotbanned in https://github.com/vega/altair/pull/3475 - fix: Restrict static & runtime top-level imports by @dangotbanned in https://github.com/vega/altair/pull/3482
- fix: Avoid
sphinxerror "Code Execution failed:NameError: name 'format_locale' is not defined" by @dangotbanned in https://github.com/vega/altair/pull/3503 - fix: replace deprecated
sphinxdefault by @dangotbanned in https://github.com/vega/altair/pull/3512 - fix(ruff): Bump
ruff, fixRUF031by @dangotbanned in https://github.com/vega/altair/pull/3529
Documentation
- docs: Versioning policy by @dangotbanned in https://github.com/vega/altair/pull/3488
- docs: Add example of reordering stacked bars by @joelostblom in https://github.com/vega/altair/pull/3395
- docs: Add example of how to create polar bar charts by @joelostblom in https://github.com/vega/altair/pull/3428
- docs: Add example of cumulative line chart with facet by @dsmedia in https://github.com/vega/altair/pull/3440
- docs: Add example with hover path and search box by @dsmedia in https://github.com/vega/altair/pull/3459
- docs: Add example for Bar Chart with Highlighting on Hover and Selection on Click by @dangotbanned in https://github.com/vega/altair/pull/3485
- docs: Link to
Vega Theme Testin user guide by @dangotbanned in https://github.com/vega/altair/pull/3528 - docs: Fix and improve
alt.Optionaldoc by @dangotbanned in https://github.com/vega/altair/pull/3449 - docs: Fix camel case of fillOpacity channel by @timtroendle in https://github.com/vega/altair/pull/3465
- docs: Fix
CONTRIBUTING.mdphrasing by @dangotbanned in https://github.com/vega/altair/pull/3477 - docs: Reduce number of items in header to 4 by @binste in https://github.com/vega/altair/pull/3401
- docs: Link to project board for roadmap by @joelostblom in https://github.com/vega/altair/pull/3404
- docs: Use raw strings with escape sequences by @joelostblom in https://github.com/vega/altair/pull/3411
- docs: Update
hatchguidance by @dangotbanned in https://github.com/vega/altair/pull/3461 - docs: Add
emptyas a explicitconditionkwarg by @dangotbanned in https://github.com/vega/altair/pull/3490 - docs: Undoc deprecated functionality by @dangotbanned in https://github.com/vega/altair/pull/3509
- docs: Remove reference to
altair_saverinsaveby @dangotbanned in https://github.com/vega/altair/pull/3510 - docs: Update link to Altair Ally by @sebp in https://github.com/vega/altair/pull/3517
Maintenance
- chore: Remove CoC link in templates since it's displayed by default by @joelostblom in https://github.com/vega/altair/pull/3390
- chore: Update org name from altair-viz to vega by @binste in https://github.com/vega/altair/pull/3400
- build: pin upperlimit geopandas by @mattijn in https://github.com/vega/altair/pull/3421
- ci: remove again geopandas pin and disable flaky test by @binste in https://github.com/vega/altair/pull/3422
- ci: Remove references to archived altairviewer and altairsaver in ci, docs, and tests. Uninstall anywidget and vl-convert-python during one test run by @binste in https://github.com/vega/altair/pull/3419
- ci: prepare for
numpy 2by @dangotbanned in https://github.com/vega/altair/pull/3438 - ci: Add a Dependabot config to auto-update GitHub action versions by @kurtmckee in https://github.com/vega/altair/pull/3437
- ci: Update dependabot.yaml to include prefix by @mattijn in https://github.com/vega/altair/pull/3442
- ci: Bump the github-actions group with 2 updates by @dependabot in https://github.com/vega/altair/pull/3439
- chore: avoid pandas warning for
freq='H'in test_utils.py by @MarcoGorelli in https://github.com/vega/altair/pull/3446 - refactor: Add
ruffrules, improve type annotations, improve ci performance by @dangotbanned in https://github.com/vega/altair/pull/3431 - style: Remove outdated comments about the use of the former _Parameter protocol by @binste in https://github.com/vega/altair/pull/3448
- chore: fixup ruff-mypy CI job due to Ruff change by @MarcoGorelli in https://github.com/vega/altair/pull/3463
- refactor(typing): Reuse generated
Literalaliases inapiby @dangotbanned in https://github.com/vega/altair/pull/3464 - ci: remove
toolzfrom[[tool.mypy.overrides]]by @dangotbanned in https://github.com/vega/altair/pull/3474 - refactor: Simplify
SchemaBaserepr by @dangotbanned in https://github.com/vega/altair/pull/3472 - refactor: remove dead
_get_channels_mappingcode by @dangotbanned in https://github.com/vega/altair/pull/3467 - ci: bump
ruff>=0.5.3forPLW1514fix by @dangotbanned in https://github.com/vega/altair/pull/3484 - test: skip
ibistest on unsupportedpythonversion by @dangotbanned in https://github.com/vega/altair/pull/3486 - refactor(typing): reduce type ignores in
api.pyby @dangotbanned in https://github.com/vega/altair/pull/3480 - fix: remove unsupported
sphinxtheme option'footer_items'by @dangotbanned in https://github.com/vega/altair/pull/3489 - refactor: Rename and move
is_undefined,OneOrSeqby @dangotbanned in https://github.com/vega/altair/pull/3491 - refactor(docs, ruff): Add
pydocstylerules by @dangotbanned in https://github.com/vega/altair/pull/3493 - ci: include optional dependencies for Polars backend in ibis-framework install by @MarcoGorelli in https://github.com/vega/altair/pull/3494
- ci: Add
python-version=="3.9"to github action by @dangotbanned in https://github.com/vega/altair/pull/3498 - ci(ruff): Remove stale
docstring-code-formatcomment by @dangotbanned in https://github.com/vega/altair/pull/3496 - ci: relax
numpy<=2.0.0constraint by @dangotbanned in https://github.com/vega/altair/pull/3504 - refactor: replace archived
m2rwith updatedmistuneby @dangotbanned in https://github.com/vega/altair/pull/3506 - build: Add
ipykerneloptional dependency todevgroup by @dangotbanned in https://github.com/vega/altair/pull/3507 - refactor(ruff): Organize imports w/ (
I001,TID252) rules by @dangotbanned in https://github.com/vega/altair/pull/3513 - ci: Bump
sphinx,vl-convert-pythonby @dangotbanned in https://github.com/vega/altair/pull/3527 - chore: Remove filterwarnings from tests for cross-version pandas compatibility by @MarcoGorelli in https://github.com/vega/altair/pull/3522
- ci(ruff): Enforce the default
C901complexity by @dangotbanned in https://github.com/vega/altair/pull/3531 - refactor: Simplify unreachable compound chart cases by @dangotbanned in https://github.com/vega/altair/pull/3520
- feat: Adds
vega-themes.jsonusingvl_convertby @dangotbanned in https://github.com/vega/altair/pull/3523
New Contributors
- @dangotbanned made their first contribution in https://github.com/vega/altair/pull/3420
- @kurtmckee made their first contribution in https://github.com/vega/altair/pull/3437
- @dependabot made their first contribution in https://github.com/vega/altair/pull/3439
- @dsmedia made their first contribution in https://github.com/vega/altair/pull/3440
- @MarcoGorelli made their first contribution in https://github.com/vega/altair/pull/3446
- @timtroendle made their first contribution in https://github.com/vega/altair/pull/3465
- @sebp made their first contribution in https://github.com/vega/altair/pull/3517
Full Changelog: https://github.com/vega/altair/compare/v5.3.0...v5.4.0
Scientific Software - Peer-reviewed
- Python
Published by binste over 1 year ago
Altair - Version 5.3.0
The Vega Project is happy to announce the release of version 5.3.0 of the Vega-Altair Python visualization library. This release has been 4 months in the making and includes enhancements, fixes, and documentation improvements from 11 contributors.
What's Changed
- Update Vega-Lite from version 5.16.3 to version 5.17.0; see Vega-Lite Release Notes
Enhancements
Add integration of VegaFusion and JupyterChart to enable scaling many interactive Vega-Altair charts to millions of rows. See VegaFusion Data Transformer for more information. Here is an example of histogram cross filtering with a 1 million row dataset.
https://github.com/altair-viz/altair/assets/15064365/ddca2a1e-6e6b-4d9f-9949-97e0c51b47d9
Add
"browser"renderer to support displaying Vega-Altair charts in an external web browser. See Browser Renderer for more information (#3379).https://github.com/altair-viz/altair/assets/15064365/30d4f2e2-7a30-4c8a-97ae-085d7580c5e4
Support opening charts in the Vega editor with
chart.open_editor()(#3358)https://github.com/altair-viz/altair/assets/15064365/9233b290-421d-4fa7-80b2-945423bbc3fc
- Add
"jupyter"renderer which uses JupyterChart for rendering (#3283). See Displaying Altair Charts for more information. - Add
embed_optionsargument to JupyterChart to allow customization of Vega Embed options (#3304) - Add offline support for JupyterChart and the new
"jupyter"renderer. See JupyterChart - Offline Usage for more information. - Add a new section to documentation on dashboards which have support for Altair (#3299)
- Support restrictive FIPS-compliant environment (#3291)
- Simplify type-hints to improve the readability of the function signature and docstring (#3307)
- Support installation of all optional dependencies via
python -m pip install altair[all]andconda install altair-all -c conda-forge(#3354) - Add privacy friendly web-analytics for the documentation (#3350)
- Additional gallery examples and documentation clarifications (#3233, #3266, #3276, #3282, #3298, #3299, #3323, #3334, #3324, #3340, #3350, #3353, #3357, #3362, #3363)
Bug Fixes
- Fix error when
embed_optionsareNone(#3376) - Fix type hints for libraries such as Polars where Altair uses the dataframe interchange protocol (#3297)
- Fix anywidget deprecation warning (#3364)
- Fix handling of Date32 columns in arrow tables and Polars DataFrames (#3377)
Backward-Incompatible Changes
- Changed hash function from
md5to a truncatedsha256non-cryptograhic hash (#3291) - Updated
chart.show()method to invoke the active renderer rather than depend onaltair_saver(Which was never updated for use with Altair 5) (#3379).
New Contributors
- @franzhaas made their first contribution in https://github.com/altair-viz/altair/pull/3278
- @ccravens made their first contribution in https://github.com/altair-viz/altair/pull/3291
- @thomascamminady made their first contribution in https://github.com/altair-viz/altair/pull/3323
- @d-trigo made their first contribution in https://github.com/altair-viz/altair/pull/3350
- @RobinL made their first contribution in https://github.com/altair-viz/altair/pull/3383
Release notes by pull requests
Click to view all 44 PRs merged in this release
* perf: Improve performance of `Chart.from_dict` by @RobinL in https://github.com/altair-viz/altair/pull/3383 * feature: Add browser renderer to open charts in external browser and update chart.show() to display chart by @jonmmease in https://github.com/altair-viz/altair/pull/3379 * fix: Don't error when embed_options are None by @jonmmease in https://github.com/altair-viz/altair/pull/3376 * fix: Handle Date32 columns in Arrow tables and Polars DataFrames by @jonmmease in https://github.com/altair-viz/altair/pull/3377 * fix: Support falling back to pandas when pyarrow is installed but too old by @jonmmease in https://github.com/altair-viz/altair/pull/3387 * docs: Remove release notes and fully capture them in GitHub Releases by @binste in https://github.com/altair-viz/altair/pull/3380 * Update save.py to use utf-8 instead of None per default by @franzhaas in https://github.com/altair-viz/altair/pull/3278 * Consolidate governance documents in Vega Organization by @domoritz in https://github.com/altair-viz/altair/pull/3277 * doc: histogram with gradient color by @mattijn in https://github.com/altair-viz/altair/pull/3282 * Update for FIPS Compliance by @ccravens in https://github.com/altair-viz/altair/pull/3291 * Docs: Fix link to project governance docs by @binste in https://github.com/altair-viz/altair/pull/3298 * Fix type checker errors for libraries such as Polars where Altair uses dataframe interchange protocol by @binste in https://github.com/altair-viz/altair/pull/3297 * Integrate VegaFusion into JupyterChart by @jonmmease in https://github.com/altair-viz/altair/pull/3281 * Add "jupyter" renderer based on JupyterChart by @jonmmease in https://github.com/altair-viz/altair/pull/3283 * Docs: Add section on displaying Altair charts in dashboards by @binste in https://github.com/altair-viz/altair/pull/3299 * Validate version of vegafusion-python-embed by @jonmmease in https://github.com/altair-viz/altair/pull/3303 * Add embed_options to JupyterChart and pass them through in "jupyter" renderer by @jonmmease in https://github.com/altair-viz/altair/pull/3304 * Add offline support to JupyterChart and "jupyter" renderer by @jonmmease in https://github.com/altair-viz/altair/pull/3305 * Type hints: Simplify to improve user experiences by @binste in https://github.com/altair-viz/altair/pull/3307 * Adding missing interpolation methods to Line example by @thomascamminady in https://github.com/altair-viz/altair/pull/3323 * Docs: Link to new section on Altair in Plotly docs by @binste in https://github.com/altair-viz/altair/pull/3324 * Docs: Mark completed items in roadmap by @binste in https://github.com/altair-viz/altair/pull/3326 * Docs: Mention Marimo in Dashboards section by @binste in https://github.com/altair-viz/altair/pull/3334 * Relax type hint for 'indent' in to_json method by @binste in https://github.com/altair-viz/altair/pull/3342 * MAINT: Reformat codebase with new style of ruff 0.3.0 by @binste in https://github.com/altair-viz/altair/pull/3345 * Docs: Add another version of the 'Multiline Tooltip' exmaple which uses the standard tooltip by @binste in https://github.com/altair-viz/altair/pull/3340 * Docs: Add privacy-friendly web analytics with plausible by @binste in https://github.com/altair-viz/altair/pull/3346 * Docs: Modifying scale of "multiple interactions" example and adding legend adjustments by @d-trigo in https://github.com/altair-viz/altair/pull/3350 * Add example of how to update titles based on a selection parameters by @joelostblom in https://github.com/altair-viz/altair/pull/3353 * Add `all` dependency group by @jonmmease in https://github.com/altair-viz/altair/pull/3354 * Add timeseries filtering example to illustrate subsetting of columns from selector values by @joelostblom in https://github.com/altair-viz/altair/pull/3357 * Fix anywidget deprecation warning by @jonmmease in https://github.com/altair-viz/altair/pull/3364 * Clarifications to the interactive docs by @joelostblom in https://github.com/altair-viz/altair/pull/3362 * Open charts in the default browser with `open_editor` method by @joelostblom in https://github.com/altair-viz/altair/pull/3358 * Change "mouse" to "pointer" everywhere by @joelostblom in https://github.com/altair-viz/altair/pull/3363 * doc: update numpy-tooltip-images.rst by @mattijn in https://github.com/altair-viz/altair/pull/3233 * Change a couple of more additional occurences of pointer over by @joelostblom in https://github.com/altair-viz/altair/pull/3368 * [Doc] Fix Chart and MarkDef language by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3266 * Add remaining changelog entries for 5.3 by @joelostblom in https://github.com/altair-viz/altair/pull/3369 * Upgrade to Vega-Lite 5.17.0 by @binste in https://github.com/altair-viz/altair/pull/3367 * Add a few 5.3 changelog entries by @jonmmease in https://github.com/altair-viz/altair/pull/3372 * Add note about conda "all" installation and how to install without optional dependencies by @joelostblom in https://github.com/altair-viz/altair/pull/3373 * Update README badges to reflect updated tool chain by @mattijn in https://github.com/altair-viz/altair/pull/3374 * chore: Add templates for PRs and automated release notes by @joelostblom in https://github.com/altair-viz/altair/pull/3381Full Changelog: https://github.com/altair-viz/altair/compare/v5.2.0...v5.3.0
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 4.0.1
Bug fixes
- Update Vega-Lite version to 4.0.2
- Fix issue with duplicate chart divs in HTML renderer (#1888)
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 3.1.0
Update includes full compatibility with version 3.3 of Vega-Lite.
Enhancements
Added support for vega themes via
alt.themes.enable(theme_name)(#1539)Added an
alt.renderers.disable_max_rows()method for disabling the maximum rows check (#1538)Improved user-facing warnings/errors around layering and faceting (#1535).
dataargument is now properly handled byChart.properties(#1525)Compound charts (layer, concat, hconcat, vconcat) now move data to the top level by default. In particular, this means that the
facet()method can now be called directly on a layered chart without having to change how data is specified. (#1521)alt.LayerChartnow supportsmark_*()methods. If a layer specifies a mark at the top level, all child charts will inherit it (unless they override it explicitly).alt.Chart.facet()now handles wrapped facets; for example:chart.facet('column_name', columns=5)Seealtair/examples/us_population_over_time_facet.pyfor a more complete example.
Bug fixes
Make
chart.serve()andchart.save()respect the data transformer setting (#1538)Fixed a deserialization bug for certain chart specs in schemapi (#1543)
Backward-Incompatible Changes
alt.Chart.facet()now accepts a wrapped facet encoding as a first positional argument, rather than a row encoding. The following are examples of old invocations, and the equivalent new invocations:chart.facet(row='col1', column='col2'): unchangedchart.facet('col1', 'col2'): change tochart.facet(row='col1', column='col2')chart.facet('col1'): change tochart.facet(row='col1')
In each case, the new invocations are compatible back to Altair 2.X.
Several of the encoding channels added in 3.0 have had their capitalization corrected to better match the names used in the schema:
alt.Fillopacity->alt.FillOpacityalt.Strokeopacity->alt.StrokeOpacityalt.Strokewidth->alt.StrokeWidthalt.Xerror->alt.XErroralt.Xerror2->alt.XError2alt.Yerror->alt.YErroralt.Yerror2->alt.YError2
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 3.0.1
Fix version info bug for HTML output and Colab & Kaggle renderers.
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 2.4.1
Enhancements
- Several documentation cleanups & new examples
Bug Fixes
- Fix incompatibility with pandas version 0.24 (#1315)
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 2.3.0
Includes many reworked examples in the example gallery.
Enhancements
- Better errors for non-string column names, as well as automatic conversion of
pandas.RangeIndexcolumns to strings (#1107) - Renderers now have
set_embed_options()method (#1203) - Added kaggle renderer & more HTML output options (#1123)
Maintenance
- fix typing requirement in Python 3.6+ (#1185)
- Added support & CI testing for Python 3.7 (#1008)
Bug fixes
- Selection predicates now recognize all valid entries (#1143)
- Python 2 support for
chart.save()(#1134)
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 2.2.2
Bug Fixes
- fix missing JSON resource in
altair.vega.v4(#1097)
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 2.2.1
Bug Fixes
appropriate handling of InlineData in dataset consolidation (#1092)
fix admonition formatting in documentation page (#1094)
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 2.0.0
Complete rewrite of Altair, focused on supporting Vega-Lite 2.X
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 1.2.1
This version of Altair is based on Vega-Lite 1.2.1.
Major additions
Support for JupyterLab/nteract through MIME based rendering. Enable this by calling
enable_mime_rendering()before rendering visualizations (#216).Change default import in all code and docs to
import altair as altCheck for missing and misspelled column names upon exporting or rendering, and raise
FieldError(#399) if any problems are found. This can be disabled by settingChart.validated_columns=False.Raise
MaxRowsExceededif the number of rows in the dataset is larger thanChart.max_rowsto guard against sending large datasets to the browser.Move the Vega-Lite 1.x api into
altair.v1to make it easier for us to migrate to Vega-Lite 2.x and continue to support 1.x. No import change are needed asaltair.v1is aliased toaltairin this release (#377).Moved the example notebooks into a separate repository (https://github.com/altair-viz/altair_notebooks) that has Binder support (#391).
Add
$schemato top-level JSON spec (#370).Minor documentation revisions.
Bug fixes
- Make sure default mark is a point (#344).
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 1.0.0
Initial release of Altair
Scientific Software - Peer-reviewed
- Python
Published by binste almost 2 years ago
Altair - Version 5.2.0
What's Changed
- Update Vega-Lite from version 5.15.1 to version 5.16.3; see Vega-Lite Release Notes.
Enhancements
- Support offline HTML export using vl-convert (#3251)
You now can use:
chart.save('chart.html', inline=True)
To create an HTML file with inline JavaScript dependencies. This enhancements takes advantage of HTML bundling support in vl-convert to replace the dependency on altair_viewer. Vega-Altair 5.2.0 expects vl-convert-python version 1.1.0 or higher for this enhancement.
- Support saving charts as PDF files using the vl-convert export engine (#3244)
You now can use:
chart.save('chart.pdf')
To create an PDF representation of your chart. This enhancements takes advantage of PDF support in vl-convert to replace the dependency on altair_saver. Vega-Altair 5.2.0 expects vl-convert-python version 1.1.0 or higher for this enhancement.
- Support converting charts to sharable Vega editor URLs with chart.to_url() (#3252)
You now can use:
chart.to_url()
To generate a Vega editor URL that opens the chart's specification in the online Vega editor. This enhancements takes advantage of lz-string URL-compatible compression in vl-convert. Vega-Altair 5.2.0 expects vl-convert-python version 1.1.0 or higher for this enhancement.
Example: ```python import altair as alt from vega_datasets import data
chart = alt.Chart(data.cars.url).markpoint().encode( x='Horsepower:Q', y='Milesper_Gallon:Q', color='Origin:N' )
print(chart.to_url()) ```
- Pass
format_localeandtime_format_localethrough to vl-convert to support locales in static image export (#3274)
The preferred format of numbers, dates, and currencies varies by language and locale. Vega-Altair takes advantage of D3’s localization support to make it easy to configure the locale for your chart using the global alt.renderers.set_embed_options function. Vega-Altair 5.2.0 expects vl-convert-python version 1.1.0 or higher for this enhancement.
See https://altair-viz.github.io/user_guide/customization.html#localization for more info (including the note with a caveat!).
- Vega-Altair is now a typed package, with type annotations for all public functions and classes and some of the internal code
See https://github.com/altair-viz/altair/issues/2951 for a full summary how we have implemented these. Type hints can help IDEs to provide a better development experience as well as static type checkers to catch potential errors before they appear at runtime.
Maintenance
- Vega-Altair now uses ruff for maintaining code quality & consistency (#3243)
- Vega-Altair is tested against Python 3.12 (#3235)
Bug Fixes
- None
Backward-Incompatible Changes
- None
Release Notes by Pull Request
- Perform minor consistency cleanup by @joelostblom in https://github.com/altair-viz/altair/pull/3215
- [Doc] Add integers to four digit year format example by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3218
- Maint: Do not pass literal json to read_json in test by @binste in https://github.com/altair-viz/altair/pull/3221
- Do not display search keyboard shortcut on home page by @joelostblom in https://github.com/altair-viz/altair/pull/3220
- [Doc] Add Label Position Based on Condition Example by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3226
- [Doc] Update UserGuide: Add Rotate Axis, Sort Legend Example, Citing Section by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3217
- [Doc] Add Show Image Marks With Selection/Show Local Images Examples by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3219
- [Doc] Add Reverse Scale and Update Example for Consistency by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3228
- Correct the method-based syntax for a few more gallery examples by @joelostblom in https://github.com/altair-viz/altair/pull/3005
- doc: update pandas to smallcase p by @mattijn in https://github.com/altair-viz/altair/pull/3232
- Type hint api.py by @binste in https://github.com/altair-viz/altair/pull/3143
- maint: change to ruff for formatting by @mattijn in https://github.com/altair-viz/altair/pull/3243
- maint: GitHub action include
python-version3.12 by @mattijn in https://github.com/altair-viz/altair/pull/3235 - Support saving to PDF with VlConvert 1.0 by @jonmmease in https://github.com/altair-viz/altair/pull/3244
- Support converting a Chart to a Vega editor URL by @jonmmease in https://github.com/altair-viz/altair/pull/3252
- Type hint utils/save.py and utils/mimebundle.py by @binste in https://github.com/altair-viz/altair/pull/3248
- docs: add range bar chart by @mattijn in https://github.com/altair-viz/altair/pull/3250
- doc: barchart highlighting values beyond a single threshold by @mattijn in https://github.com/altair-viz/altair/pull/3249
- Update image export error message with PDF format by @jonmmease in https://github.com/altair-viz/altair/pull/3255
- Use vl-convert for offline html export by @jonmmease in https://github.com/altair-viz/altair/pull/3251
- doc: add example interactive aggregation by @mattijn in https://github.com/altair-viz/altair/pull/3260
- [Doc] Add Arrow Vector Example by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3236
- [Doc] Add scatter plot with shaded area example by @ChiaLingWeng in https://github.com/altair-viz/altair/pull/3256
- Make facet error more informative by @joelostblom in https://github.com/altair-viz/altair/pull/3264
- Type hints: Infer types from vegalite schema for autogenerated code by @binste in https://github.com/altair-viz/altair/pull/3208
- Fix broken JupyterWidget chart by pinning Vega by @jonmmease in https://github.com/altair-viz/altair/pull/3269
- Type hints: Finish type hints and mark package as typed by @binste in https://github.com/altair-viz/altair/pull/3272
- Update to Vega-Lite 5.16.3 by @jonmmease in https://github.com/altair-viz/altair/pull/3273
- Pass locale info through to vl-convert, default to display embed options when not set by @jonmmease in https://github.com/altair-viz/altair/pull/3274
- doc: add example, interval selection on a map by @mattijn in https://github.com/altair-viz/altair/pull/3275
- doc: maintain colors by @mattijn in https://github.com/altair-viz/altair/pull/3276
New Contributors
- @ChiaLingWeng made their first contribution in https://github.com/altair-viz/altair/pull/3218
Full Changelog: https://github.com/altair-viz/altair/compare/v5.1.2...v5.2.0
Scientific Software - Peer-reviewed
- Python
Published by mattijn about 2 years ago
Altair - Version 5.1.2
What's changed
- Update Vega-Lite from version 5.14.1 to version 5.15.1; see Vega-Lite Release Notes.
- Use Facet/Trellis/Repeat consistently in the documentation by @NickCrews in #3180
Bug Fixes
- Remove usage of deprecated Pandas parameter
convert_dtypesby @binste in #3191 - Fix encoding type inference for boolean columns when pyarrow is installed by @jonmmease in #3210
Full Changelog: https://github.com/altair-viz/altair/compare/v5.1.1...v5.1.2
Scientific Software - Peer-reviewed
- Python
Published by joelostblom over 2 years ago
Altair - Version 5.1.1
What's Changed
- Fix doctest and run doctests in altair module by @jonmmease in https://github.com/altair-viz/altair/pull/3175
- infer dtype pandas fallback by @jonmmease in https://github.com/altair-viz/altair/pull/3179
Full Changelog: https://github.com/altair-viz/altair/compare/v5.1.0...v5.1.1
Scientific Software - Peer-reviewed
- Python
Published by mattijn over 2 years ago
Altair - Version 5.1.0
What's Changed
- Update Vega-Lite from version 5.8.0 to version 5.14.1; see Vega-Lite Release Notes.
Enhancements
- The
chart.transformed_data()method was added to extract transformed chart data
For example when having an Altair chart including aggregations: ```python import altair as alt from vega_datasets import data
cars = data.cars.url
chart = alt.Chart(cars).markbar().encode(
y='Cylinders:O',
x='meanacc:Q'
).transformaggregate(
meanacc='mean(Acceleration)',
groupby=["Cylinders"]
)
chart

Its now possible to call the `chart.transformed_data` method to extract a pandas DataFrame containing the transformed data.
python
chart.transformed_data()
```
This method is dependent on VegaFusion with the embed extras enabled.
- Introduction of a new data transformer named
vegafusion
VegaFusion is an external project that provides efficient Rust implementations of most of Altair's data transformations. Using VegaFusion as Data Transformer it can overcome the Altair MaxRowsError by performing data-intensive aggregations in Python and pruning unused columns from the source dataset.
The data transformer can be enabled as such:
python
import altair as alt
alt.data_transformers.enable("vegafusion") # default is "default"
cmd DataTransformerRegistry.enable('vegafusion')
And one can now visualize a very large DataFrame as histogram where the binning is done within VegaFusion: ```python import pandas as pd import altair as alt
prepare dataframe with 1 million rows
flights = pd.readparquet( "https://vegafusion-datasets.s3.amazonaws.com/vega/flights1m.parquet" )
delayhist = alt.Chart(flights).markbar(tooltip=True).encode(
alt.X("delay", bin=alt.Bin(maxbins=30)),
alt.Y("count()")
)
delay_hist
``

When thevegafusion` data transformer is active, data transformations will be pre-evaluated when displaying, saving and converting charts as dictionary or JSON.
See a detailed overview on the VegaFusion Data Transformer in the documentation.
- A
JupyterChartclass was added to support accessing params and selections from Python
The JupyterChart class makes it possible to update charts after they have been displayed and access the state of interactions from Python.
For example when having an Altair chart including a selection interval as brush: ```python import altair as alt from vega_datasets import data
source = data.cars() brush = alt.selection_interval(name="interval", value={"x": [80, 160], "y": [15, 30]})
chart = alt.Chart(source).markpoint().encode( x='Horsepower:Q', y='MilesperGallon:Q', color=alt.condition(brush, 'Cylinders:O', alt.value('grey')), ).addparams(brush)
jchart = alt.JupyterChart(chart)
jchart

It is now possible to return the defined interval selection within Python using the `JupyterChart`
python
jchart.selections.interval.value
```
cmd {'Horsepower': [80, 160], 'Miles_per_Gallon': [15, 30]}
The selection dictionary may be converted into a pandas query to filter the source DataFrame:
python
filter = " and ".join([
f"{v[0]} <= `{k}` <= {v[1]}"
for k, v in jchart.selections.interval.value.items()
])
source.query(filter)
Another possibility of the new
JupyerChart class is to use IPyWidgets to control parameters in Altair. Here we use an ipywidget IntSlider to control the Altair parameter named cutoff.
```python
import pandas as pd
import numpy as np
from ipywidgets import IntSlider, link, VBox
rand = np.random.RandomState(42)
df = pd.DataFrame({ 'xval': range(100), 'yval': rand.randn(100).cumsum() })
cutoff = alt.param(name="cutoff", value=23)
chart = alt.Chart(df).markpoint().encode( x='xval', y='yval', color=alt.condition( alt.datum.xval < cutoff, alt.value('red'), alt.value('blue') ) ).addparams( cutoff ) jchart = alt.JupyterChart(chart)
slider = IntSlider(min=0, max=100, description='ipywidget') link((slider, "value"), (jchart.params, "cutoff"))
VBox([slider, jchart])
``

TheJupyterChart` class is dependent on AnyWidget. See a detailed overview in the new documentation page on JupyterChart Interactivity.
- Support for field encoding inference for objects that support the DataFrame Interchange Protocol
We are maturing support for objects build upon the DataFrame Interchange Protocol in Altair. Given the following pandas DataFrame with an ordered categorical column-type: ```python import altair as alt from vega_datasets import data
Clean Title column
movies = data.movies() movies["Title"] = movies["Title"].astype(str)
Convert MPAA rating to an ordered categorical
rating = movies["MPAARating"].astype("category") rating = rating.cat.reordercategories( ['Open', 'G', 'PG', 'PG-13', 'R', 'NC-17', 'Not Rated'] ).cat.asordered() movies["MPAARating"] = rating
Build chart using pandas
chart = alt.Chart(movies).markbar().encode(
alt.X("MPAARating"),
alt.Y("count()")
)
chart

We can convert the DataFrame to a PyArrow Table and observe that the types are now equally infered when rendering the chart.
python
import pyarrow as pa
Build chart using PyArrow
chart = alt.Chart(pa.Table.frompandas(movies)).markbar().encode(
alt.X("MPAA_Rating"),
alt.Y("count()")
)
chart
```
Vega-Altair support of the DataFrame Interchange Protocol is dependent on PyArrow.
- A new transform method
transform_extentis available
See the following example how this transform can be used: ```python import pandas as pd import altair as alt
df = pd.DataFrame( [ {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}, ] )
base = alt.Chart(df, title="A Simple Bar Chart with Lines at Extents").transformextent(
extent="b", param="bextent"
)
bars = base.markbar().encode(x="b", y="a")
lowerextentrule = base.markrule(stroke="firebrick").encode(
x=alt.value(alt.expr("scale('x', bextent[0])"))
)
upperextentrule = base.markrule(stroke="firebrick").encode(
x=alt.value(alt.expr("scale('x', bextent[1])"))
)
bars + lowerextentrule + upperextent_rule
```
- It is now possible to add configurable pixels-per-inch (ppi) metadata to saved and displayed PNG images ```python import altair as alt from vega_datasets import data
source = data.cars()
chart = alt.Chart(source).markboxplot(extent="min-max").encode(
alt.X("Milesper_Gallon:Q").scale(zero=False),
alt.Y("Origin:N"),
)
chart.save("box.png", ppi=300)

python
alt.renderers.enable("png", ppi=144) # default ppi is 72
chart
```
Bug Fixes
- Don't call
lenon DataFrame Interchange Protocol objects (#3111)
Maintenance
- Add support for new referencing logic in version 4.18 of the jsonschema package
Backward-Incompatible Changes
- Drop support for Python 3.7 which is end-of-life (#3100)
- Hard dependencies: Increase minimum required pandas version to 0.25 (#3130)
- Soft dependencies: Increase minimum required vl-convert-python version to 0.13.0 and increase minimum required vegafusion version to 1.4.0 (#3163, #3160)
Release Notes by Pull Request
- Explicitly specify arguments for todict and tojson methods for top-level chart objects by @binste in https://github.com/altair-viz/altair/pull/3073
- Add Vega-Lite to Vega compiler registry and format arg to todict() and tojson() by @jonmmease in https://github.com/altair-viz/altair/pull/3071
- Sanitize timestamps in arrow tables by @jonmmease in https://github.com/altair-viz/altair/pull/3076
- Fix ridgeline example by @binste in https://github.com/altair-viz/altair/pull/3082
- Support extracting transformed chart data using VegaFusion by @jonmmease in https://github.com/altair-viz/altair/pull/3081
- Improve troubleshooting docs regarding Vega-Lite 5 by @binste in https://github.com/altair-viz/altair/pull/3074
- Make transformed_data public and add initial docs by @jonmmease in https://github.com/altair-viz/altair/pull/3084
- MAINT: Gitignore venv folders and use gitignore for black by @binste in https://github.com/altair-viz/altair/pull/3087
- Fixed Wheat and Wages case study by @thomend in https://github.com/altair-viz/altair/pull/3086
- Type hints: Parts of folders "vegalite", "v5", and "utils" by @binste in https://github.com/altair-viz/altair/pull/2976
- Fix CI by @jonmmease in https://github.com/altair-viz/altair/pull/3095
- Add VegaFusion data transformer with mime renderer, save, and todict/tojson integration by @jonmmease in https://github.com/altair-viz/altair/pull/3094
- Unpin vl-convert-python in dev/ci dependencies by @jonmmease in https://github.com/altair-viz/altair/pull/3099
- Drop support for Python 3.7 which is end-of-life by @binste in https://github.com/altair-viz/altair/pull/3100
- Add support to transformeddata for reconstructed charts (with fromdict/from_json) by @binste in https://github.com/altair-viz/altair/pull/3102
- Add VegaFusion data transformer documentation by @jonmmease in https://github.com/altair-viz/altair/pull/3107
- Don't call len on DataFrame interchange protocol object by @jonmmease in https://github.com/altair-viz/altair/pull/3111
- copied percentage calculation in example by @thomend in https://github.com/altair-viz/altair/pull/3116
- Distributions and medians of likert scale ratings by @thomend in https://github.com/altair-viz/altair/pull/3120
- Support for type inference for DataFrames using the DataFrame Interchange Protocol by @jonmmease in https://github.com/altair-viz/altair/pull/3114
- Add some 5.1.0 release note entries by @jonmmease in https://github.com/altair-viz/altair/pull/3123
- Add a code of conduct by @joelostblom in https://github.com/altair-viz/altair/pull/3124
- master -> main by @jonmmease in https://github.com/altair-viz/altair/pull/3126
- Handle pyarrow-backed columns in pandas 2 DataFrames by @jonmmease in https://github.com/altair-viz/altair/pull/3128
- Fix accidental requirement of Pandas 1.5. Bump minimum Pandas version to 0.25. Run tests with it by @binste in https://github.com/altair-viz/altair/pull/3130
- Add Roadmap and CoC to the documentation by @jonmmease in https://github.com/altair-viz/altair/pull/3129
- MAINT: Use importlib.metadata and packaging instead of deprecated pkg_resources by @binste in https://github.com/altair-viz/altair/pull/3133
- Add online JupyterChart widget based on AnyWidget by @jonmmease in https://github.com/altair-viz/altair/pull/3119
- feat(widget): prefer lodash-es/debounce to reduce import size by @manzt in https://github.com/altair-viz/altair/pull/3135
- Fix contributing descriptions by @thomend in https://github.com/altair-viz/altair/pull/3121
- Implement governance structure based on GitHub's MVG by @binste in https://github.com/altair-viz/altair/pull/3139
- Type hint schemapi.py by @binste in https://github.com/altair-viz/altair/pull/3142
- Add JupyterChart section to Users Guide by @jonmmease in https://github.com/altair-viz/altair/pull/3137
- Add governance page to the website by @jonmmease in https://github.com/altair-viz/altair/pull/3144
- MAINT: Remove altair viewer as a development dependency by @binste in https://github.com/altair-viz/altair/pull/3147
- Add support for new referencing resolution in jsonschema>=4.18 by @binste in https://github.com/altair-viz/altair/pull/3118
- Update Vega-Lite to 5.14.1. Add transform_extent by @binste in https://github.com/altair-viz/altair/pull/3148
- MAINT: Fix type hint errors which came up with new pandas-stubs release by @binste in https://github.com/altair-viz/altair/pull/3154
- JupyterChart: Add support for params defined in the extent transform by @jonmmease in https://github.com/altair-viz/altair/pull/3151
- doc: Add tooltip to Line example with custom order by @NickCrews in https://github.com/altair-viz/altair/pull/3155
- docs: examples: add line plot with custom order by @NickCrews in https://github.com/altair-viz/altair/pull/3156
- docs: line: Improve prose on custom ordering by @NickCrews in https://github.com/altair-viz/altair/pull/3158
- docs: examples: remove connected_scatterplot by @NickCrews in https://github.com/altair-viz/altair/pull/3159
- Refactor optional import logic and verify minimum versions by @jonmmease in https://github.com/altair-viz/altair/pull/3160
- Governance: Mark @binste as committee chair by @binste in https://github.com/altair-viz/altair/pull/3165
- Add ppi argument for saving and displaying charts as PNG images by @jonmmease in https://github.com/altair-viz/altair/pull/3163
- Silence AnyWidget warning (and support hot-reload) in development mode by @jonmmease in https://github.com/altair-viz/altair/pull/3166
- Update roadmap.rst by @mattijn in https://github.com/altair-viz/altair/pull/3167
- Add return type to transform_extent by @binste in https://github.com/altair-viz/altair/pull/3169
- Use importvlconvert in spectomimebundlewith_engine for better error message by @jonmmease in https://github.com/altair-viz/altair/pull/3168
- update example world projections by @mattijn in https://github.com/altair-viz/altair/pull/3170
- Send initial selections to Python in JupyterChart by @jonmmease in https://github.com/altair-viz/altair/pull/3172
New Contributors
- @thomend made their first contribution in https://github.com/altair-viz/altair/pull/3086
- @NickCrews made their first contribution in https://github.com/altair-viz/altair/pull/3155
Full Changelog: https://github.com/altair-viz/altair/compare/v5.0.1...v5.1.0
Scientific Software - Peer-reviewed
- Python
Published by mattijn over 2 years ago
Altair - Version 5.0.1
What's Changed
- Be clearer about how vegafusion works by @joelostblom in https://github.com/altair-viz/altair/pull/3052
- Use altairplot Sphinx directive of sphinxext_altair package by @binste in https://github.com/altair-viz/altair/pull/3056
- Fix test command in README by @binste in https://github.com/altair-viz/altair/pull/3058
- Remove extra files in site-packages from wheel by @jtilly in https://github.com/altair-viz/altair/pull/3057
- Add validation of Vega-Lite schema itself by @binste in https://github.com/altair-viz/altair/pull/3061
- Deprecate
.ref()instead of removing it by @mattijn in https://github.com/altair-viz/altair/pull/3063 - Update area.rst by @mattijn in https://github.com/altair-viz/altair/pull/3064
- Documentation: Improve homepage by @binste in https://github.com/altair-viz/altair/pull/3060
- TitleParam to Title in example gallery and sync scatterplot table by @joelostblom in https://github.com/altair-viz/altair/pull/3066
- Fix bug in reconstructing layered charts with fromjson/fromdict by @binste in https://github.com/altair-viz/altair/pull/3068
Full Changelog: https://github.com/altair-viz/altair/compare/v5.0.0...v5.0.1
Scientific Software - Peer-reviewed
- Python
Published by mattijn almost 3 years ago
Altair - Version 5.0.0
What's Changed
- Update Vega-Lite from version 4.17.0 to version 5.8.0; see Vega-Lite Release Notes.
Enhancements
- As described in the release notes for Vega-Lite 5.0.0, the primary change in this release of Altair is the introduction of parameters. There are two types of parameters, selection parameters and variable parameters. Variable parameters are new to Altair, and while selections are not new, much of the old terminology has been deprecated. See Slider Cutoff for an application of variable parameters (#2528).
- Grouped bar charts and jitter are now supported using offset channels, see Grouped Bar Chart with xOffset and Strip Plot Jitter.
vl-convertis now used as the default backend for saving Altair charts as svg and png files, which simplifies saving chart as it does not require external dependencies likealtair_saverdoes (#2701). Currently,altair_saverdoes not support Altair 5 and it is recommended to switch tovl-convert. See PNG, SVG, and PDF format for more details.- Saving charts with HTML inline is now supported without having
altair_saverinstalled (#2807). - The default chart width was changed from
400to300(#2785). - Ordered pandas categorical data are now automatically encoded as sorted ordinal data (#2522)
- The
TitleandImputealiases were added forTitleParamsandImputeParams, respectively (#2732). - The documentation page has been revamped, both in terms of appearance and content.
- More informative autocompletion by removing deprecated methods (#2814) and for editors that rely on type hints (e.g. VS Code) we added support for completion in method chains (#2846) and extended keyword completion to cover additional methods (#2920).
- Substantially improved error handling. Both in terms of finding the more relevant error (#2842), and in terms of improving the formatting and clarity of the error messages (#2824, #2568, #2979, #3009).
- Include experimental support for the DataFrame Interchange Protocol (through
__dataframe__attribute). This requirespyarrow>=11.0.0(#2888). - Support data type inference for columns with special characters (#2905).
- Responsive width support using
width="container"when saving charts to html or displaying them with the defaulthtmlrenderer (#2867).
Grammar Changes
- Channel options can now be set via a more convenient method-based syntax in addition to the previous attribute-based syntax. For example, instead of
alt.X(..., bin=alt.Bin(...))it is now recommend to usealt.X(...).bin(...)) (#2795). See Method-Based Syntax for details. selection_singleandselection_multiare now deprecated; useselection_pointinstead. Similarly,type=pointshould be used instead oftype=singleandtype=multi.add_selectionis deprecated; useadd_paramsinstead.- The
selectionkeyword argument must in many cases be replaced byparam(e.g., when specifying a filter transform). - The
emptykeyword argument for a selection parameter should be specified asTrueorFalseinstead ofallornone, respectively. - The
initkeyword argument for a parameter is deprecated; usevalueinstead.
Bug Fixes
- Displaying a chart not longer changes the shorthand syntax of the stored spec (#2813).
- Fixed
disable_debug_mode(#2851). - Fixed issue where the webdriver was not working with Firefox's geckodriver (#2466).
- Dynamically determine the jsonschema validator to avoid issues with recent jsonschema versions (#2812).
Backward-Incompatible Changes
- Colons in column names must now be escaped to remove any ambiguity with encoding types. You now need to write
"column\:name"instead of"column:name"(#2824). - Removed the Vega (v5) wrappers and deprecate rendering in Vega mode (save Chart as Vega format is still allowed) (#2829).
- Removed the Vega-Lite 3 and 4 wrappers (#2847).
- Removed the deprecated datasets.py (#3010).
- In regards to the grammar changes listed above, the old terminology will still work in many basic cases. On the other hand, if that old terminology gets used at a lower level, then it most likely will not work. For example, in the current version of Scatter Plot with Minimap, two instances of the key
paramare used in dictionaries to specify axis domains. Those used to beselection, but that usage is not compatible with the current Vega-Lite schema. - Removed the
altair.sphinxextmodule (#2792). Thealtair-plotSphinx directive is now part of the sphinxext-altair package.
Maintenance
- Vega-Altair now uses
hatchfor package management. - Vega-Altair now uses
rufffor linting.
Release Notes by Pull Request
- Add strict option to sphinx extension by @jtilly in https://github.com/altair-viz/altair/pull/2551
- docs: correcting regression equations by @robna in https://github.com/altair-viz/altair/pull/2559
- MAINT: Fix GH actions issues by @joelostblom in https://github.com/altair-viz/altair/pull/2567
- WIP: update to Vega-Lite 5.2 by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2528
- MAINT: Update actions' links to use https by @joelostblom in https://github.com/altair-viz/altair/pull/2575
- DOCS: Clarify steps in the contributing guidelines by @joelostblom in https://github.com/altair-viz/altair/pull/2569
- MAINT: Make sure that deprecation warnings are displayed by @joelostblom in https://github.com/altair-viz/altair/pull/2577
- DOCS: Revamp docs for the 5.0 release by @joelostblom in https://github.com/altair-viz/altair/pull/2566
- Pin selenium to avoid doctest breakage from deprecation by @joelostblom in https://github.com/altair-viz/altair/pull/2624
- Remove broken Wikipedia donations chart by @palewire in https://github.com/altair-viz/altair/pull/2625
- Tidy Falkensee case study by @palewire in https://github.com/altair-viz/altair/pull/2626
- Tidy up U.S. Population by Age and Sex case study by @palewire in https://github.com/altair-viz/altair/pull/2628
- Move bar chart with highlighted segment chart into the bar charts section by @palewire in https://github.com/altair-viz/altair/pull/2630
- No need to say "Example" in the example headline by @palewire in https://github.com/altair-viz/altair/pull/2631
- Isotype charts aren't case studies and should go in the other category by @palewire in https://github.com/altair-viz/altair/pull/2632
- Top k charts aren't case studies and should go with other charts by @palewire in https://github.com/altair-viz/altair/pull/2633
- Add pyramid pie chart to case studies by @palewire in https://github.com/altair-viz/altair/pull/2635
- Move image tooltip example to interactive charts section by @palewire in https://github.com/altair-viz/altair/pull/2636
- Move window rank technique to line charts section by @palewire in https://github.com/altair-viz/altair/pull/2637
- Style fix to chart headline by @palewire in https://github.com/altair-viz/altair/pull/2639
- Move scatter with histogram into scatter plots section by @palewire in https://github.com/altair-viz/altair/pull/2641
- Clean up airport maps by @palewire in https://github.com/altair-viz/altair/pull/2634
- Example of a line chart with a label annotating the final value by @palewire in https://github.com/altair-viz/altair/pull/2623
- Update rangeddotplot.py by @palewire in https://github.com/altair-viz/altair/pull/2642
- Tidy natural_disasters.py example by @palewire in https://github.com/altair-viz/altair/pull/2643
- Create a new tables section by @palewire in https://github.com/altair-viz/altair/pull/2646
- Tidy multiple_marks.py by @palewire in https://github.com/altair-viz/altair/pull/2640
- docs: Fix a few typos by @timgates42 in https://github.com/altair-viz/altair/pull/2649
- Create a new advanced calculations section of the example gallery by @palewire in https://github.com/altair-viz/altair/pull/2647
- Tidy line chart examples by @palewire in https://github.com/altair-viz/altair/pull/2644
- MAINT: Update examples and tests to VL5 syntax by @joelostblom in https://github.com/altair-viz/altair/pull/2576
- formatted rst list correctly by @tempdata73 in https://github.com/altair-viz/altair/pull/2652
- Added argmax example by @tempdata73 in https://github.com/altair-viz/altair/pull/2653
- Change naming to alt.param and alt.add_params by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2656
- minor: update readme code by @Ckend in https://github.com/altair-viz/altair/pull/2667
- use 'UndefinedLike = Any' as the type hint by @brahn in https://github.com/altair-viz/altair/pull/2681
- Add gallery example for empirical cumulative distribution function by @binste in https://github.com/altair-viz/altair/pull/2695
- MAINT: Replace
iteritemswithitemsby @joelostblom in https://github.com/altair-viz/altair/pull/2683 - Lifting parameters to the top level by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2702
- Clarify that a special field name is required to render images in tooltips by @joelostblom in https://github.com/altair-viz/altair/pull/2570
- Integrate vl-convert for saving to svg and png by @jonmmease in https://github.com/altair-viz/altair/pull/2701
- Documentation for each mark type by @hebarton5 in https://github.com/altair-viz/altair/pull/2607
- Include marks in sidebar/TOC by @mattijn in https://github.com/altair-viz/altair/pull/2709
- use default projection from vegalite by @mattijn in https://github.com/altair-viz/altair/pull/2710
- Geoshape docs revamp 5.0 by @mattijn in https://github.com/altair-viz/altair/pull/2699
- fix reference geoshape.rst to index.rst and some typos by @mattijn in https://github.com/altair-viz/altair/pull/2711
- Create new sections in the gallery for distributions and uncertainties and trend charts by @binste in https://github.com/altair-viz/altair/pull/2706
- Update docs styling based on the new pydata template by @joelostblom in https://github.com/altair-viz/altair/pull/2716
- Fix missing 's' from filename in quick start by @dwootton in https://github.com/altair-viz/altair/pull/2719
- Revert undefinedlike by @mattijn in https://github.com/altair-viz/altair/pull/2717
- Fix some formatting issues by @binste in https://github.com/altair-viz/altair/pull/2722
- Improve documentation titles by @binste in https://github.com/altair-viz/altair/pull/2721
- Make vl-convert saving work when the data server is enabled by @joelostblom in https://github.com/altair-viz/altair/pull/2724
- Add toggle to hidden code snippets by @joelostblom in https://github.com/altair-viz/altair/pull/2725
- MAINT: Update from v4 to v5 in some additional files by @joelostblom in https://github.com/altair-viz/altair/pull/2582
- Fix syntax for with statement in spectomimebundlewith_engine by @binste in https://github.com/altair-viz/altair/pull/2734
- Various smaller updates to documentation (harmonizing title cases, vega version numbers, browser compatibility, ...) by @binste in https://github.com/altair-viz/altair/pull/2737
- Improve mark type sections by @binste in https://github.com/altair-viz/altair/pull/2720
- Fix cut off property tables by @binste in https://github.com/altair-viz/altair/pull/2746
- Update _magics.py by @johnmarkpittman in https://github.com/altair-viz/altair/pull/2747
- Add waterfall chart example by @yanghung in https://github.com/altair-viz/altair/pull/2621
- Run tests with Python 3.11 by @binste in https://github.com/altair-viz/altair/pull/2757
- Improve waterfall example by @binste in https://github.com/altair-viz/altair/pull/2756
- Improve encoding section by @binste in https://github.com/altair-viz/altair/pull/2735
- documentation on spatial data by @mattijn in https://github.com/altair-viz/altair/pull/2750
- Address Sphinx warnings by @binste in https://github.com/altair-viz/altair/pull/2758
- fix(#2675): replace entrypoints with importlib.metadata by @daylinmorgan in https://github.com/altair-viz/altair/pull/2686
- DOC: add dendrogram example by @xujiboy in https://github.com/altair-viz/altair/pull/2615
- fix: remove duplicate / by @domoritz in https://github.com/altair-viz/altair/pull/2262
- Clarify that not all channels accept additional options by @binste in https://github.com/altair-viz/altair/pull/2773
- Consolidate docs and add section on Large Datasets by @binste in https://github.com/altair-viz/altair/pull/2755
- fix: remove webdriver default argument to save by @Midnighter in https://github.com/altair-viz/altair/pull/2466
- Fix docs for mobile devices by @binste in https://github.com/altair-viz/altair/pull/2778
- Merge data pages again by @binste in https://github.com/altair-viz/altair/pull/2781
- Update github actions by @binste in https://github.com/altair-viz/altair/pull/2780
- enh: remove slash from baseurl instead of htmltemplate by @mattijn in https://github.com/altair-viz/altair/pull/2782
- Test vl-convert engine in chart.save test by @jonmmease in https://github.com/altair-viz/altair/pull/2784
- Fix altair test save if vl-convert-python is installed and altair_saver is not by @binste in https://github.com/altair-viz/altair/pull/2786
- Remove update_subtraits as not used anywhere by @binste in https://github.com/altair-viz/altair/pull/2787
- Run tests for both save engines altair_saver and vl-convert-python by @binste in https://github.com/altair-viz/altair/pull/2791
- move tests and sphinxext outside folder application code by @mattijn in https://github.com/altair-viz/altair/pull/2792
- Add method-based attribute setting by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2795
- Modify generator to move autogenerated test to tests folder by @mattijn in https://github.com/altair-viz/altair/pull/2804
- Disable uri-reference format check in jsonsschema by @binste in https://github.com/altair-viz/altair/pull/2771
- Aliases for ImputeParams and TitleParams by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2732
- Update and simplify README by @binste in https://github.com/altair-viz/altair/pull/2774
- Add --check to black test command by @binste in https://github.com/altair-viz/altair/pull/2815
- Add test for layer properties by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2811
- docs: Use SVG thumbnail for emoji example and use VlConvert to build docs on CI by @jonmmease in https://github.com/altair-viz/altair/pull/2809
- Dynamically determine jsonschema validator by @binste in https://github.com/altair-viz/altair/pull/2812
- Change default chart width from 400 to 300 by @binste in https://github.com/altair-viz/altair/pull/2785
- Add inline argument to chart.save() for html export by @jonmmease in https://github.com/altair-viz/altair/pull/2807
- Remove side-effects of calling EncodingChannelMixin.to_dict by @binste in https://github.com/altair-viz/altair/pull/2813
- WIP Parameter tests by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2828
- Add missing object attributes to dir by @binste in https://github.com/altair-viz/altair/pull/2831
- Clean up development and documentation requirements by @binste in https://github.com/altair-viz/altair/pull/2830
- Add title section to customization page by @palewire in https://github.com/altair-viz/altair/pull/2838
- Fix disabledebugmode by @binste in https://github.com/altair-viz/altair/pull/2851
- Remove vegalite v3 and v4 wrappers by @binste in https://github.com/altair-viz/altair/pull/2847
- Remove vega v5 wrappers by @mattijn in https://github.com/altair-viz/altair/pull/2829
- Represent pandas ordered categoricals as ordinal data by @joelostblom in https://github.com/altair-viz/altair/pull/2522
- Add documentation for remaining config methods by @binste in https://github.com/altair-viz/altair/pull/2853
- Reformat code base with black version 23 and restrict version by @binste in https://github.com/altair-viz/altair/pull/2869
- Fix Altair import in tools scripts by @binste in https://github.com/altair-viz/altair/pull/2872
- Hide deprecated callables from code completion suggestions by @binste in https://github.com/altair-viz/altair/pull/2814
- Add changelog entries for 5.0 by @joelostblom in https://github.com/altair-viz/altair/pull/2859
- Remove deep validation and instead use error hierarchy to improve error messages by @binste in https://github.com/altair-viz/altair/pull/2842
- Make layer warnings clearer by @joelostblom in https://github.com/altair-viz/altair/pull/2874
- Update Large Datasets documentation with VegaFusion 1.0 information by @jonmmease in https://github.com/altair-viz/altair/pull/2855
- Add return type hints to improve code completion suggestions by @binste in https://github.com/altair-viz/altair/pull/2846
- Apply minor code formatting change in tools script by @binste in https://github.com/altair-viz/altair/pull/2881
- Expand mark spec when using to_dict by @joelostblom in https://github.com/altair-viz/altair/pull/2823
- Report filename of failing test by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2889
- Use most specific class possible in schema validation errors by @binste in https://github.com/altair-viz/altair/pull/2883
- Add announcement to docs by @mattijn in https://github.com/altair-viz/altair/pull/2891
- exclude
altair_saverinbuild.ymlas Github Actions tests are not passing anymore by @mattijn in https://github.com/altair-viz/altair/pull/2893 - Remove the automatic sort of categoricals for channels that do not support sorting by @joelostblom in https://github.com/altair-viz/altair/pull/2885
- Add Heat Lane example by @palewire in https://github.com/altair-viz/altair/pull/2882
- Support DataFrame Interchange Protocol (allow Polars DataFrames) by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2888
- Parse shorthand when creating the condition 2 by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2841
- Fix wrong json schema url in a test by @binste in https://github.com/altair-viz/altair/pull/2898
- Apply minor change from #2841 in correct tools script by @binste in https://github.com/altair-viz/altair/pull/2899
- Fix minor formatting issues in documentation by @binste in https://github.com/altair-viz/altair/pull/2897
- No longer use deprecated SelectableGroups dict interface of entry points by @binste in https://github.com/altair-viz/altair/pull/2900
- Add instructions on how to install release candidate by @binste in https://github.com/altair-viz/altair/pull/2902
- Add missing attribute descriptions by @binste in https://github.com/altair-viz/altair/pull/2892
- Rename 'Attributes' to 'Parameters' to fix documentation formatting by @binste in https://github.com/altair-viz/altair/pull/2901
- Docstring links class transform and mark methods by @mattijn in https://github.com/altair-viz/altair/pull/2912
- ENH: Make the schema validation error for non-existing params more informative by @joelostblom in https://github.com/altair-viz/altair/pull/2568
- Make error messages on typos and missing/incorrect data types more informative by @joelostblom in https://github.com/altair-viz/altair/pull/2824
- Include
alt.ExprRefcapabilities inalt.expr()by @mattijn in https://github.com/altair-viz/altair/pull/2886 - Move change introduced in #2824 to tools script by @binste in https://github.com/altair-viz/altair/pull/2921
- MAINT: Remove inheritance from object for classes by @binste in https://github.com/altair-viz/altair/pull/2922
- Update parameter docstrings and signatures by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2908
- Update from Vega-Lite 5.2.0 to 5.6.1 by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2871
- Deprecating selection by @ChristopherDavisUCI in https://github.com/altair-viz/altair/pull/2923
- Improve autocompletion for arguments to objects wrapped with use_signature by @binste in https://github.com/altair-viz/altair/pull/2920
- Update docs to better describe how to use checkboxes and logic-based bindings in general by @joelostblom in https://github.com/altair-viz/altair/pull/2926
- Fix testschemavalidator_selection for jsonschema<4 by @binste in https://github.com/altair-viz/altair/pull/2931
- Add more information about how to handle the max rows error by @palewire in https://github.com/altair-viz/altair/pull/2840
- Fix deprecation warning for SelectableGroup in Python 3.7 by @binste in https://github.com/altair-viz/altair/pull/2932
- include deprecation message in docstring by @mattijn in https://github.com/altair-viz/altair/pull/2930
- use selectionpoint or selectioninterval syntax by @mattijn in https://github.com/altair-viz/altair/pull/2929
- Expand and document support for column names with special characters by @joelostblom in https://github.com/altair-viz/altair/pull/2905
- Fix a few remaining ocurrences of
type=by @joelostblom in https://github.com/altair-viz/altair/pull/2933 - docs: Make rendering optional for tutorial by @dylancashman in https://github.com/altair-viz/altair/pull/2925
- include section on expressions for interaction by @mattijn in https://github.com/altair-viz/altair/pull/2928
- Add missing pandas import in docs by @joelostblom in https://github.com/altair-viz/altair/pull/2934
- fix docstrings errors by @mattijn in https://github.com/altair-viz/altair/pull/2936
- include issue in announcement by @mattijn in https://github.com/altair-viz/altair/pull/2938
- Add vega themes 'excel', 'googlecharts', 'powerbi' by @binste in https://github.com/altair-viz/altair/pull/2943
- Docs: Fix formatting of 2 links by @binste in https://github.com/altair-viz/altair/pull/2942
- Apply changes of #2931 in tools folder by @binste in https://github.com/altair-viz/altair/pull/2941
- Fail build workflow if generateschemawrapper produces changes by @binste in https://github.com/altair-viz/altair/pull/2940
- Update resource section by @joelostblom in https://github.com/altair-viz/altair/pull/2415
- Shorten page title by @joelostblom in https://github.com/altair-viz/altair/pull/2946
- Remove $ from bash examples on installation page by @palewire in https://github.com/altair-viz/altair/pull/2962
- Slight edits and trims to the overview page by @palewire in https://github.com/altair-viz/altair/pull/2961
- Include all options in enum error messages by @binste in https://github.com/altair-viz/altair/pull/2957
- Type hints: Improve for encoding channel attributes by @binste in https://github.com/altair-viz/altair/pull/2949
- Simplify and clean up tool folder by @binste in https://github.com/altair-viz/altair/pull/2944
- Temporarily use default data transformer while saving a chart by @binste in https://github.com/altair-viz/altair/pull/2954
- Cut dependencies from installation page by @palewire in https://github.com/altair-viz/altair/pull/2964
- Type hints: Add static type checker mypy by @binste in https://github.com/altair-viz/altair/pull/2950
- Maintenance: Remove test_schemapi.py in tools folder by @binste in https://github.com/altair-viz/altair/pull/2973
- Deduplicate error messages by @binste in https://github.com/altair-viz/altair/pull/2975
- Move disclaimer to the bottom of the index page by @palewire in https://github.com/altair-viz/altair/pull/2960
- Consolidate naming history into overview by @palewire in https://github.com/altair-viz/altair/pull/2968
- Reduce line-height in the gallery thumbnail headlines by @palewire in https://github.com/altair-viz/altair/pull/2969
- Add missing descriptions to tables created with altair-object-table by @binste in https://github.com/altair-viz/altair/pull/2952
- Clean tests folder by @mattijn in https://github.com/altair-viz/altair/pull/2974
- Trim that eliminates redundancy by @palewire in https://github.com/altair-viz/altair/pull/2985
- Trim index page language by @palewire in https://github.com/altair-viz/altair/pull/2970
- Add code copy button to docs by @joelostblom in https://github.com/altair-viz/altair/pull/2984
- Clarify differences between pandas and other dataframe packages by @joelostblom in https://github.com/altair-viz/altair/pull/2986
- Use more idiomatic
strokeoption by @joelostblom in https://github.com/altair-viz/altair/pull/2992 - Display more helpful error message when two fields strings are used in condition by @joelostblom in https://github.com/altair-viz/altair/pull/2979
- Restructure and clarify interactive docs by @joelostblom in https://github.com/altair-viz/altair/pull/2981
- Simplify syntax by @joelostblom in https://github.com/altair-viz/altair/pull/2991
- Sync
selection_*docstrings with signatures by @dpoznik in https://github.com/altair-viz/altair/pull/3001 - Prefer method-based syntax in docs and add tabbed interface for method and attribute syntax in gallery by @joelostblom in https://github.com/altair-viz/altair/pull/2983
- Fix a few doc build warnings by @joelostblom in https://github.com/altair-viz/altair/pull/3004
- use
ruffas linter by @mattijn in https://github.com/altair-viz/altair/pull/3008 - remove deprecated datasets.py by @mattijn in https://github.com/altair-viz/altair/pull/3010
- fix writing svg to file including emojis by @mattijn in https://github.com/altair-viz/altair/pull/3015
- Simplify package mangement by @mattijn in https://github.com/altair-viz/altair/pull/3007
- Update from Vega-Lite 5.6.1 to 5.7.1 by @binste in https://github.com/altair-viz/altair/pull/3022
- Categories transposed in data documentation by @m-charlton in https://github.com/altair-viz/altair/pull/3026
- Fix typo in docs causing code blocks to not render by @joelostblom in https://github.com/altair-viz/altair/pull/3029
- include underscore after view by @mattijn in https://github.com/altair-viz/altair/pull/3030
- include view definitions for a layercharts containing a repeat + toplevel selection parameter by @mattijn in https://github.com/altair-viz/altair/pull/3031
- Improve readme by @mattijn in https://github.com/altair-viz/altair/pull/3033
- Improve error prioritisation and messages by @binste in https://github.com/altair-viz/altair/pull/3009
- Enhancement of Vega-Embed CSS for Improved Display and Flexibility by @nlafleur in https://github.com/altair-viz/altair/pull/2867
- update vega expressions options by @mattijn in https://github.com/altair-viz/altair/pull/3034
- re-include interactivelayeredcrossfilter by @mattijn in https://github.com/altair-viz/altair/pull/3036
- Update from Vega-Lite 5.7.1 to 5.8.0 by @mattijn in https://github.com/altair-viz/altair/pull/3037
- Increase minimum required jsonschema (
>=4.0.01) by @mattijn in https://github.com/altair-viz/altair/pull/3039 - Add info that altair_saver does not yet support Altair 5 by @binste in https://github.com/altair-viz/altair/pull/3042
- geopandas.datasets is deprecated by @mattijn in https://github.com/altair-viz/altair/pull/3043
- reintroduce support
jsonschema>=3.0by @mattijn in https://github.com/altair-viz/altair/pull/3044 - Update core.py by @kunalghosh in https://github.com/altair-viz/altair/pull/3046
- update display.py, fix broken link by @mattijn in https://github.com/altair-viz/altair/pull/3047
New Contributors
- @robna made their first contribution in https://github.com/altair-viz/altair/pull/2559
- @tempdata73 made their first contribution in https://github.com/altair-viz/altair/pull/2652
- @Ckend made their first contribution in https://github.com/altair-viz/altair/pull/2667
- @brahn made their first contribution in https://github.com/altair-viz/altair/pull/2681
- @jonmmease made their first contribution in https://github.com/altair-viz/altair/pull/2701
- @hebarton5 made their first contribution in https://github.com/altair-viz/altair/pull/2607
- @dwootton made their first contribution in https://github.com/altair-viz/altair/pull/2719
- @johnmarkpittman made their first contribution in https://github.com/altair-viz/altair/pull/2747
- @yanghung made their first contribution in https://github.com/altair-viz/altair/pull/2621
- @daylinmorgan made their first contribution in https://github.com/altair-viz/altair/pull/2686
- @xujiboy made their first contribution in https://github.com/altair-viz/altair/pull/2615
- @Midnighter made their first contribution in https://github.com/altair-viz/altair/pull/2466
- @dylancashman made their first contribution in https://github.com/altair-viz/altair/pull/2925
- @dpoznik made their first contribution in https://github.com/altair-viz/altair/pull/3001
- @m-charlton made their first contribution in https://github.com/altair-viz/altair/pull/3026
- @nlafleur made their first contribution in https://github.com/altair-viz/altair/pull/2867
- @kunalghosh made their first contribution in https://github.com/altair-viz/altair/pull/3046
Full Changelog: https://github.com/altair-viz/altair/compare/v4.2.0...v5.0.0
Scientific Software - Peer-reviewed
- Python
Published by mattijn almost 3 years ago
Altair - Version 4.2.2
Bug Fixes
- Fix incompatibility with jsonschema < 4.5 which got introduced in Altair 4.2.1 (#2860).
Full Changelog: https://github.com/altair-viz/altair/compare/v4.2.1...v4.2.2
Scientific Software - Peer-reviewed
- Python
Published by mattijn about 3 years ago
Altair - Version 4.2.1
Note: This version requires jsonschema>=4.5.0 see (https://github.com/altair-viz/altair/issues/2857).
Bug Fixes
- Disable uri-reference format check in jsonsschema (#2771).
- Replace
iteritemswithitemsdue to pandas deprecation (#2683).
Maintenance
- Add deprecation and removal warnings for Vega-Lite v3 wrappers and Vega v5 wrappers (#2843).
Scientific Software - Peer-reviewed
- Python
Published by mattijn about 3 years ago
Altair - Version 4.2.0
- Update Vega-Lite from version 4.8.1 to version 4.17.0; see Vega-Lite Release Notes.
Enhancements
- Pie charts are now supported through the use of
mark_arc. (Examples: eg. Pie Chart and Radial Chart) - Support for the
datumencoding specifications from Vega-Lite; see Vega-Lite Datum Definition. (Examples: Line Chart with datum and Line Chart with datum for color.) angleencoding can now be used to control point styles (Example: Wind Vector Map)- Support for serialising pandas nullable data types for float data (#2399).
- Automatically create an empty data object when
Chartis called without a data parameter (#2515). - Allow the use of pathlib Paths when saving charts (#2355).
- Support deepcopy for charts (#2403).
Bug Fixes
- Fix
to_dict()for nested selections (#2120). - Fix item access for expressions (#2099).
Scientific Software - Peer-reviewed
- Python
Published by jakevdp about 4 years ago
Altair - Version 4.1.0
- Minimum Python version is now 3.6
- Update Vega-Lite to version 4.8.1; many new features and bug fixes from Vega-Lite versions 4.1 through 4.8; see Vega-Lite Release Notes.
Enhancements
strokeDashencoding can now be used to control line styles (Example: Multi Series Line Chartchart.save()now relies on altair_saver for more flexibility (#1943).- New
chart.show()method replaceschart.serve(), and relies on altair_viewer to allow offline viewing of charts (#1988).
Bug Fixes
- Support Python 3.8 (#1958)
- Support multiple views in JupyterLab (#1986)
- Support numpy types within specifications (#1914)
- Support pandas nullable ints and string types (#1924)
Maintenance
Scientific Software - Peer-reviewed
- Python
Published by jakevdp almost 6 years ago
Altair - Version 4.0.0 Release
Altair Version 4.0.0 release
Version 4.0.0 is based on Vega-Lite version 4.0, which you can read about at https://github.com/vega/vega-lite/releases/tag/v4.0.0.
It is the first version of Altair to drop Python 2 compatibility, and is tested on Python 3.5 and newer.
Enhancements
Support for interactive legends: (Example)

Responsive chart width and height: (Example)

Bins responsive to selections: (Example)

New pivot transform: (Example)

New Regression transform: (Example)

New LOESS transform: (Example)

New density transform: (Example)

Image mark (Example)

New default
htmlrenderer, directly compatible with Jupyter Notebook and JupyterLab without the need for frontend extensions, as well as tools like nbviewer and nbconvert, and related notebook environments such as Zeppelin, Colab, Kaggle Kernels, and DataBricks. To enable the old default renderer, use:alt.renderers.enable('mimetype')Support per-corner radius for bar marks: (Example)

Grammar Changes
Sort-by-field can now use the encoding name directly. So instead of
alt.Y('y:Q', sort=alt.EncodingSortField('x_field', order='descending'))you can now use::alt.Y('y:Q', sort="-x")The
rangeStepargument to :class:Scaleand :meth:Chart.configure_scaleis deprecated. instead, usechart.properties(width={"step": rangeStep})orchart.configure_view(step=rangeStep).align,center,spacing, andcolumnsare no longer valid chart properties, but are moved to the encoding classes to which they refer.
Scientific Software - Peer-reviewed
- Python
Published by jakevdp about 6 years ago
Altair - Version 3.3.0
Version 3.3.0
released Nov 27, 2019
Last release to support Python 2
Enhancements
- Add inheritance structure to low-level schema classes (#1803)
- Add
htmlrenderer which works across frontends (#1793) - Support Python 3.8 (#1740, #1781)
- Add
:Gshorthand for geojson type (#1714) - Add data generator interface:
alt.sequence,alt.graticule,alt.sphere()(#1667, #1687) - Support geographic data sources via
__geo_interface__(#1664)
Bug Fixes
- Support
pickleandcopy.deepcopyfor chart objects (#1805) - Fix bug when specifying
count()withintransform_joinaggregate()(#1751) - Fix
LayerChart.add_selection(#1794) - Fix arguments to
project()method (#1717) - Fix composition of multiple selections (#1707)
Scientific Software - Peer-reviewed
- Python
Published by jakevdp over 6 years ago
Altair - Version 3.2.0
Version 3.2.0 (released August 5, 2019)
Upgraded to Vega-Lite version 3.4 (See Vega-Lite 3.4 Release Notes).
Following are changes to Altair in addition to those that came with VL 3.4:
Enhancements
- Selector values can be used directly in expressions (#1599)
- Top-level chart repr is now truncated to improve readability of error messages (#1572)
Bug Fixes
- top-level
add_selectionmethods now delegate to sub-charts. Previously they produced invalid charts (#1607) - Unsupported
mark_*()methods removed from LayerChart (#1607) - New encoding channels are properly parsed (#1597)
- Data context is propagated when encodings are specified as lists (#1587)
Backward-Incompatible Changes
alt.LayerChartno longer hasmark_*()methods, because they never produced valid chart specifications) (#1607)
Scientific Software - Peer-reviewed
- Python
Published by jakevdp over 6 years ago
Altair - Version 3.0
Scientific Software - Peer-reviewed
- Python
Published by jakevdp almost 7 years ago
Altair -
Enhancements
better handling of datetimes and timezones (#1053)
all inline datasets are now converted to named datasets and stored at the top level of the chart. This behavior can be disabled by setting
alt.data_transformers.consolidate_datasets = False(#951 & #1046)more streamlined shorthand syntax for window transforms (#957)
Maintenance
Backward-incompatible changes
alt.SortFieldrenamed toalt.EncodingSortFieldandalt.WindowSortFieldrenamed toalt.SortField(#923)
Bug Fixes
Fixed serialization of logical operands on selections within
transform_filter(): (#1075)Fixed sphinx issue which embedded chart specs twice (#1088)
Avoid Selenium import until it is actually needed (#982)
Scientific Software - Peer-reviewed
- Python
Published by jakevdp over 7 years ago
Altair -
Enhancements
add a
scale_factorargument tochart.save()to allow the size/resolution of saved figures to be adjusted. (#918)add an
add_selection()method to add selections to charts (#832)add
chart.serve()andchart.display()methods for more flexiblity in displaying charts (#831)allow multiple fields to be passed to encodings such as
tooltipanddetail(#830)make
timeUnitspecifications more succinct, by parsing them in a manner similar to aggregates (#866)make
to_json()andto_csv()have deterministic filenames, so in json mode a single datasets will lead to a single on-disk serialization (#862)
Breaking Changes
make
datathe first argument for all compound chart types to match the semantics ofalt.Chart(this includesalt.FacetChart,alt.LayerChart,alt.RepeatChart,alt.VConcatChart, andalt.HConcatChart) (#895).update vega-lite to version 2.4.3 (#836)
- Only API change is internal:
alt.MarkPropertiesis nowalt.MarkConfig
- Only API change is internal:
Maintenance
- update vega to v3.3 & vega-embed to v3.11 in html output & colab renderer (#838)
Scientific Software - Peer-reviewed
- Python
Published by jakevdp over 7 years ago
Altair - Version 1.2
Nov 7, 2016
Major additions
- Update to Vega-Lite 1.2 and make all its enhancements available to Altair
- Add
Chart.servemethod (#197) - Add
altair.exprmachinery to specify transformations and filterings (#213) - Add
Chart.savechartmethod, which can output JSON, HTML, and (if Node is installed) PNG and SVG. See https://altair-viz.github.io/documentation/displaying.html
Bug Fixes
- Countless minor bug fixes
Maintenance:
- Update to Vega-Lite 1.2.1 and add its supported features
- Create website: http://altair-viz.github.io/
- Set up Travis to run conda & pip; and to build documentation
Scientific Software - Peer-reviewed
- Python
Published by jakevdp over 9 years ago