VegaDatasets

Sample datasets used by Vega related projects.

ResourceFunction["VegaDatasets"][name]

gives the Vega dataset for name.

Details and Options

This function replies on the Python “vega_datasets” package, and installs it if necessary.
Supported datasets include:
"airports"US airports, including airport code, city, state, latitude, and longitude.
"barley"Crop yields over different regions and different years in the 1930s.
"burtin"Effectiveness of various antibiotics in treating a variety of bacterial infections.
"cars"Acceleration, horsepower, fuel efficiency, weight, and other characteristics of different makes and models of cars.
"crimea"Monthly casualty counts from the Crimean war.
"driving"Miles driven per capita along with gas prices annually from 1956 to 2010.
"iris"Lengths and widths of petals and sepals for 150 iris flowers, drawn from three species.
"stocks"Daily closing stock prices for AAPL, AMZN, GOOG, IBM, and MSFT between 2000 and 2010.
"wheat"250 years of prices alongside weekly wages and the reigning monarch.

Examples

Basic Examples

Lengths and widths of petals and sepals for 150 iris flowers, drawn from three species:

In[1]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["iris"]
Out[1]=
In[2]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["iris", \
"Description"]
Out[2]=
In[3]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["iris", "URL"]
Out[3]=
In[4]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["iris", \
"FilePath"]
Out[4]=

Scope

List US airports, including airport code, city, state, latitude, and longitude:

In[5]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["airports"]
Out[5]=

250 years of wheat prices alongside weekly wages and the reigning monarch:

In[6]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/VegaDatasets"]["wheat"]
Out[6]=

Publisher Information