npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vega-datasets

v3.2.1

Published

Common repository for example datasets used by Vega related projects.

Downloads

20,994

Readme

Vega Datasets

npm version Build Status

Vega Datasets is the centralized hub for over 70 datasets featured in the examples and documentation of Vega, Vega-Lite, Altair and related projects. A dataset catalog conforming to the Data Package Standard v2 provides information on data structure, sourcing, and licensing. Generation scripts document data provenance and transformation, enabling reproducibility and transparency throughout the data preparation process. Each dataset is curated to illustrate essential visualization concepts, statistical methods, or domain-specific applications.

This data lives at https://github.com/vega/vega-datasets and can be accessed via CDN at https://cdn.jsdelivr.net/npm/vega-datasets.

Contributing

Modifications of existing datasets should be kept to a minimum as other projects (Vega, Vega Editor, Vega-Lite, Polestar, Voyager) use this data in their tests and examples. Contributions of new datasets, documentation, scripts, corrections and bug fixes are encouraged. Please review the contribution guidelines.

[!IMPORTANT]
Dataset Licensing: Each dataset hosted in this repository maintains its original license as documented in the datapackage metadata. While we've made efforts to provide accurate licensing information, this metadata should be considered a starting point rather than definitive guidance. Users should verify their intended use complies with original source licensing terms.

Installation

Install Vega Datasets via npm:

npm install vega-datasets

Usage

HTTP Direct Access

You can get the data directly via HTTP served by GitHub or jsDelivr (a fast CDN):

  • GitHub: https://vega.github.io/vega-datasets/data/cars.json
  • jsDelivr (with fixed version, recommended): https://cdn.jsdelivr.net/npm/vega-datasets@3/data/cars.json

You can find a full listing of available datasets at https://cdn.jsdelivr.net/npm/vega-datasets/data/.

Using ESM Import

import data from 'vega-datasets';

const cars = await data['cars.json']();
// equivalent to
// const cars = await (await fetch(data['cars.json'].url)).json();

console.log(cars);

In Vega/Vega-Lite Specifications

Reference a dataset via URL:

{
  "data": {
    "url": "https://cdn.jsdelivr.net/npm/vega-datasets@latest/data/cars.json"
  },
  "mark": "point",
  "encoding": {
    "x": {"field": "Horsepower", "type": "quantitative"},
    "y": {"field": "Miles_per_Gallon", "type": "quantitative"}
  }
}

Language Interfaces

Available Datasets

Repository highlights include:

For the complete list and details, see the data directory or review the datapackage.md file.

Dataset Information

Each dataset comes with:

  • Detailed Metadata: Source, structure, and licensing information, following Data Package Standard v2 for enhanced interoperability.
  • Generation Scripts: Automation tools that facilitate data processing and updates, ensuring consistency and reproducibility.

Further information is available in datapackage.md (human-readable) and datapackage.json (machine-readable).

Example Galleries

Visualizations built with these datasets are showcased in several galleries:

Data Usage Note

  • The datasets are designed for instructional and demonstration purposes.
  • Some datasets include intentional inconsistencies to offer opportunities for data cleaning exercises.

Versioning

Vega Datasets follows semantic versioning with additional data-specific guidelines:

  • Patch Releases: Minor formatting or documentation updates without changes to the data.
  • Minor Releases: Data content updates that maintain existing file and field names, including new datasets.
  • Major Releases: Potential changes to file names or removal of datasets that may break backward compatibility.

Development and Release

For development setup:

npm install

For releasing:

npm run release

License

The repository code is licensed under the BSD-3-Clause License. Note that individual datasets have distinct licensing terms as specified in their metadata.

Acknowledgments

Appreciation is extended to the numerous organizations and individuals who have generously shared their data for use in this collection.