vega-datasets
Common repository for example datasets used by Vega related projects.
Last updated 3 years ago by arvindsatya1 .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vega-datasets 
SYNC missed versions from official npm registry.

Vega Datasets

npm version Build Status

Collection of datasets used in Vega and Vega-Lite examples. This data lives at https://github.com/vega/vega-datasets and https://cdn.jsdelivr.net/npm/vega-datasets.

Common repository for example datasets used by Vega related projects. Keep changes to this repository minimal as other projects (Vega, Vega Editor, Vega-Lite, Polestar, Voyager) use this data in their tests and for examples.

The list of sources is in SOURCES.md.

To access the data in Observable, you can import vega-dataset. Try our example notebook. To access these datasets from Python, you can use the Vega datasets python package. To access them from Julia, you can use the VegaDatasets.jl julia package.

Versioning

We use semantic versioning. However, since this package serve datasets we have additional rules about how we version data.

We do not change data in patch releases except to resolve formatting issues. Minor releases may change the data but only update datasets in ways that do not change field names or file names. Minor releases may also add datasets. Major versions may change file names, file contents, and remove or update files.

How to use it

HTTP

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

https://vega.github.io/vega-datasets/data/cars.json or with a fixed version (recommended) such as https://cdn.jsdelivr.net/npm/vega-datasets@2/data/cars.json.

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

NPM

Get the data on disk

npm i vega-datasets

Now you have all the datasets in a folder in node_modules/vega-datasets/data/.

Get the URLs or Data via URL

npm i vega-datasets

Now you can import data = require('vega-datasets') and access the URLs of any dataset with data[NAME].url. data[NAME]() returns a promise that resolves to the actual data fetched from the URL. We use d3-dsv to parse CSV files.

Here is a full example

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);

Development process

Install dependencies with yarn.

Release process

To make a release, run npm run release.

Current Tags

  • 2.5.3--canary.395.5228498.0                                ...           canary (4 years ago)
  • 2.7.0                                ...           latest (3 years ago)
  • 2.5.3-next.0                                ...           next (4 years ago)

64 Versions

  • 2.7.0                                ...           3 years ago
  • 2.5.4                                ...           3 years ago
  • 2.5.3                                ...           4 years ago
  • 2.5.3-next.0                                ...           4 years ago
  • 2.5.3--canary.395.5228498.0                                ...           4 years ago
  • 2.5.2                                ...           4 years ago
  • 2.5.2-next.0                                ...           4 years ago
  • 2.5.2--canary.393.6152f95.0                                ...           4 years ago
  • 2.5.1                                ...           4 years ago
  • 2.5.1-next.0                                ...           4 years ago
  • 2.5.0                                ...           4 years ago
  • 2.5.0-next.0                                ...           4 years ago
  • 2.4.1--canary.388.dd21c71.0                                ...           4 years ago
  • 2.4.1--canary.388.7c50dc9.0                                ...           4 years ago
  • 2.4.1--canary.388.b183e3b.0                                ...           4 years ago
  • 2.4.1--canary.384.8ab3149.0                                ...           4 years ago
  • 2.4.0                                ...           4 years ago
  • 2.3.1                                ...           4 years ago
  • 2.3.0                                ...           4 years ago
  • 2.2.1--canary.312.32a9ed7.0                                ...           5 years ago
  • 2.2.0                                ...           6 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 2.0.0-beta.6                                ...           6 years ago
  • 2.0.0-beta.5                                ...           6 years ago
  • 2.0.0-beta.4                                ...           6 years ago
  • 2.0.0-beta.3                                ...           6 years ago
  • 2.0.0-beta.2                                ...           6 years ago
  • 1.31.1                                ...           6 years ago
  • 1.31.0                                ...           6 years ago
  • 2.0.0-beta.1                                ...           6 years ago
  • 1.30.4                                ...           6 years ago
  • 1.30.3                                ...           6 years ago
  • 1.30.2                                ...           6 years ago
  • 1.30.1                                ...           6 years ago
  • 1.29.0                                ...           6 years ago
  • 1.28.0                                ...           6 years ago
  • 1.27.0                                ...           6 years ago
  • 1.26.0                                ...           7 years ago
  • 1.25.0                                ...           7 years ago
  • 1.24.5                                ...           7 years ago
  • 1.24.4                                ...           7 years ago
  • 1.24.3                                ...           7 years ago
  • 1.24.2                                ...           7 years ago
  • 1.24.1                                ...           7 years ago
  • 1.24.0                                ...           7 years ago
  • 1.23.0                                ...           7 years ago
  • 1.22.0                                ...           7 years ago
  • 1.21.1                                ...           7 years ago
  • 1.21.0                                ...           7 years ago
  • 1.20.0                                ...           7 years ago
  • 1.19.0                                ...           8 years ago
  • 1.18.0                                ...           8 years ago
  • 1.17.0                                ...           8 years ago
  • 1.16.0                                ...           8 years ago
  • 1.15.0                                ...           8 years ago
  • 1.14.0                                ...           8 years ago
  • 1.13.0                                ...           8 years ago
  • 1.12.0                                ...           8 years ago
  • 1.11.0                                ...           8 years ago
  • 1.10.0                                ...           9 years ago
  • 1.8.0                                ...           10 years ago
  • 1.7.0                                ...           10 years ago
  • 1.5.0 [deprecated]           ...           10 years ago
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 10
Last Month 46
Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |