{"id":29610015,"url":"https://github.com/altair-viz/altair","last_synced_at":"2025-07-20T20:05:08.519Z","repository":{"id":37579771,"uuid":"42757577","full_name":"vega/altair","owner":"vega","description":"Declarative visualization library for Python","archived":false,"fork":false,"pushed_at":"2025-07-17T22:15:26.000Z","size":46151,"stargazers_count":9897,"open_issues_count":159,"forks_count":810,"subscribers_count":136,"default_branch":"main","last_synced_at":"2025-07-19T09:34:51.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://altair-viz.github.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vega.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://app.hubspot.com/payments/GyPC972GD9Rt?referrer=PAYMENT_LINK"}},"created_at":"2015-09-19T03:14:04.000Z","updated_at":"2025-07-18T16:27:49.000Z","dependencies_parsed_at":"2024-01-05T19:45:58.863Z","dependency_job_id":"3e498951-840e-4873-85a2-7968ed721e5d","html_url":"https://github.com/vega/altair","commit_stats":{"total_commits":2891,"total_committers":188,"mean_commits":"15.377659574468085","dds":0.6810792113455552,"last_synced_commit":"7b3d47975dfb0af5c935780bebdb6455eba9c09e"},"previous_names":["vega/altair","altair-viz/altair"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/vega/altair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vega%2Faltair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vega%2Faltair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vega%2Faltair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vega%2Faltair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vega","download_url":"https://codeload.github.com/vega/altair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vega%2Faltair/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266189676,"owners_count":23890065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-20T20:01:50.198Z","updated_at":"2025-07-20T20:05:08.509Z","avatar_url":"https://github.com/vega.png","language":"Python","funding_links":["https://app.hubspot.com/payments/GyPC972GD9Rt?referrer=PAYMENT_LINK"],"categories":["Data Visualization","资源列表","数据可视化","Python","📦 Packages","others","Visualization","Data Visualization [🔝](#readme)","Official","Technologies","Awesome Python","Uncategorized"],"sub_categories":["数据可视化","General-Purpose Machine Learning","Python","Data Management","Data Visualization","Uncategorized"],"readme":"# Vega-Altair \u003ca href=\"https://altair-viz.github.io/\"\u003e\u003cimg align=\"right\" src=\"https://altair-viz.github.io/_static/altair-logo-light.png\" height=\"50\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n[![github actions](https://github.com/vega/altair/workflows/build/badge.svg)](https://github.com/vega/altair/actions?query=workflow%3Abuild)\n[![typedlib_mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://www.mypy-lang.org)\n[![JOSS Paper](https://joss.theoj.org/papers/10.21105/joss.01057/status.svg)](https://joss.theoj.org/papers/10.21105/joss.01057)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/altair)](https://pypi.org/project/altair)\n\n**Vega-Altair** is a declarative statistical visualization library for Python. With Vega-Altair, you can spend more time understanding your data and its meaning. Vega-Altair's\nAPI is simple, friendly and consistent and built on top of the powerful\n[Vega-Lite](https://github.com/vega/vega-lite) JSON specification. This elegant\nsimplicity produces beautiful and effective visualizations with a minimal amount of code. \n\n*Vega-Altair was originally developed by [Jake Vanderplas](https://github.com/jakevdp) and [Brian\nGranger](https://github.com/ellisonbg) in close collaboration with the [UW\nInteractive Data Lab](https://idl.cs.washington.edu/).*\n*The Vega-Altair open source project is not affiliated with Altair Engineering, Inc.*\n\n## Documentation\n\nSee [Vega-Altair's Documentation Site](https://altair-viz.github.io) as well as the [Tutorial Notebooks](https://github.com/altair-viz/altair_notebooks). You can\nrun the notebooks directly in your browser by clicking on one of the following badges:\n\n[![Binder](https://beta.mybinder.org/badge.svg)](https://beta.mybinder.org/v2/gh/altair-viz/altair_notebooks/master)\n[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/altair-viz/altair_notebooks/blob/master/notebooks/Index.ipynb)\n\n## Example\n\nHere is an example using Vega-Altair to quickly visualize and display a dataset with the native Vega-Lite renderer in the JupyterLab:\n\n```python\nimport altair as alt\n\n# load a simple dataset as a pandas DataFrame\nfrom vega_datasets import data\ncars = data.cars()\n\nalt.Chart(cars).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n)\n```\n\n![Vega-Altair Visualization](https://raw.githubusercontent.com/altair-viz/altair/main/images/cars.png)\n\nOne of the unique features of Vega-Altair, inherited from Vega-Lite, is a declarative grammar of not just visualization, but _interaction_. \nWith a few modifications to the example above we can create a linked histogram that is filtered based on a selection of the scatter plot.\n\n```python \nimport altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nbrush = alt.selection_interval()\n\npoints = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color=alt.when(brush).then(\"Origin\").otherwise(alt.value(\"lightgray\"))\n).add_params(\n    brush\n)\n\nbars = alt.Chart(source).mark_bar().encode(\n    y='Origin',\n    color='Origin',\n    x='count(Origin)'\n).transform_filter(\n    brush\n)\n\npoints \u0026 bars\n```\n\n![Vega-Altair Visualization Gif](https://raw.githubusercontent.com/altair-viz/altair/main/images/cars_scatter_bar.gif)\n\n## Features\n\n* Carefully-designed, declarative Python API.\n* Auto-generated internal Python API that guarantees visualizations are type-checked and\n  in full conformance with the [Vega-Lite](https://github.com/vega/vega-lite)\n  specification.\n* Display visualizations in JupyterLab, Jupyter Notebook, Visual Studio Code, on GitHub and\n  [nbviewer](https://nbviewer.jupyter.org/), and many more.\n* Export visualizations to various formats such as PNG/SVG images, stand-alone HTML pages and the\n[Online Vega-Lite Editor](https://vega.github.io/editor/#/).\n* Serialize visualizations as JSON files.\n\n## Installation\n\nVega-Altair can be installed with:\n```bash\npip install altair\n```\n\nIf you are using the conda package manager, the equivalent is:\n```bash\nconda install altair -c conda-forge\n```\n\nFor full installation instructions, please see [the documentation](https://altair-viz.github.io/getting_started/installation.html).\n\n## Getting Help\n\nIf you have a question that is not addressed in the documentation, \nyou can post it on [StackOverflow](https://stackoverflow.com/questions/tagged/altair) using the `altair` tag.\nFor bugs and feature requests, please open a [Github Issue](https://github.com/vega/altair/issues).\n\n## Development\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pytest](https://img.shields.io/badge/logo-pytest-blue?logo=pytest\u0026labelColor=5c5c5c\u0026label=%20)](https://github.com/pytest-dev/pytest)\n\nFor information on how to contribute your developments back to the Vega-Altair repository, see\n[`CONTRIBUTING.md`](https://github.com/vega/altair/blob/main/CONTRIBUTING.md)\n\n## Citing Vega-Altair\n\n[![JOSS Paper](https://joss.theoj.org/papers/10.21105/joss.01057/status.svg)](https://joss.theoj.org/papers/10.21105/joss.01057)\n\nIf you use Vega-Altair in academic work, please consider citing https://joss.theoj.org/papers/10.21105/joss.01057 as\n\n```bib\n@article{VanderPlas2018,\n    doi = {10.21105/joss.01057},\n    url = {https://doi.org/10.21105/joss.01057},\n    year = {2018},\n    publisher = {The Open Journal},\n    volume = {3},\n    number = {32},\n    pages = {1057},\n    author = {Jacob VanderPlas and Brian Granger and Jeffrey Heer and Dominik Moritz and Kanit Wongsuphasawat and Arvind Satyanarayan and Eitan Lees and Ilia Timofeev and Ben Welsh and Scott Sievert},\n    title = {Altair: Interactive Statistical Visualizations for Python},\n    journal = {Journal of Open Source Software}\n}\n```\nPlease additionally consider citing the [Vega-Lite](https://vega.github.io/vega-lite/) project, which Vega-Altair is based on: https://dl.acm.org/doi/10.1109/TVCG.2016.2599030\n\n```bib\n@article{Satyanarayan2017,\n    author={Satyanarayan, Arvind and Moritz, Dominik and Wongsuphasawat, Kanit and Heer, Jeffrey},\n    title={Vega-Lite: A Grammar of Interactive Graphics},\n    journal={IEEE transactions on visualization and computer graphics},\n    year={2017},\n    volume={23},\n    number={1},\n    pages={341-350},\n    publisher={IEEE}\n} \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltair-viz%2Faltair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltair-viz%2Faltair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltair-viz%2Faltair/lists"}