Public
Edited
Dec 21, 2022
Insert cell
Insert cell
Insert cell
Insert cell
stargazers

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
datasets = [
alphabet,
aapl,
anscombe,
athletes,
availability,
barley,
blsIndustryUnemployment,
blsMetroUnemployment,
caltrain,
cars,
covidProjectedDeaths,
crimeanWar,
d3survey2015,
decathlon,
driving,
diamonds,
energyProduction,
firstLadies,
footballCoverage,
fruitSales,
gdp,
gistemp,
goog,
googleTrends2020,
hadcrutAnnual,
ibm,
learningPoverty,
metros,
mobydick,
morley,
movies,
ncAbsenteeVotes,
penguins,
plotDocumentation,
policeDeaths,
riaa,
seattleWeather,
sfCovid,
sfTemperatures,
simpsons,
softwareVersions,
stargazers,
survey,
timestamps,
traffic,
travelers,
usCongressMembers,
usPopulationStateAge,
usPresidentFavorability,
usPresidentialElection2020,
usPresidentialForecast2016Histogram,
usRetailSales,
usStateGrid,
usStatePopulation20102019,
wealthBritain
]
Insert cell
Insert cell
Insert cell
unattributed = datasets.filter(d => !d.link)
Insert cell
Insert cell
aapl = ({
name: "AAPL",
notes: `Yahoo! Finance`,
link: `https://finance.yahoo.com/lookup`,
data: await FileAttachment("aapl.csv").csv({typed: true}),
id: "aapl"
})
Insert cell
alphabet = ({
name: "Alphabet",
notes: `Cryptographical Mathematics by Robert Edward Lewand`,
link: `http://cs.wellesley.edu/~fturbak/codman/letterfreq.html`,
data: await FileAttachment("alphabet.csv").csv({typed: true}),
id: "alphabet"
})
Insert cell
amzn = ({
name: "AMZN",
notes: `Yahoo! Finance`,
link: `https://finance.yahoo.com/lookup`,
data: await FileAttachment("amzn.csv").csv({typed: true}),
id: "amzn"
})
Insert cell
anscombe = ({
name: "Anscombe's quartet",
notes: `Anscombe’s quartet`,
link: `https://en.wikipedia.org/wiki/Anscombe%27s_quartet`,
data: await FileAttachment("anscombe.csv").csv({typed: true }),
id: "anscombe"
})
Insert cell
athletes = ({
name: "Athletes",
notes: `Matt Riggott/IOC`,
link: `https://www.flother.is/2017/olympic-games-data/`,
data: await FileAttachment("athletes.csv").csv({typed: true}),
id: "athletes"
})
Insert cell
barley = ({
name: "Barley",
notes: ``,
link: `http://search.r-project.org/R/library/lattice/html/barley.html`,
data: await FileAttachment("barley.csv").csv({typed: true}),
id: "barley"
})
Insert cell
blsIndustryUnemployment = ({
name: "BLS Industry Unemployment",
notes: `Bureau of Labor Statistics`,
link: `https://www.bls.gov/`,
data: await FileAttachment("bls-industry-unemployment.csv").csv({typed: true}),
id: "blsIndustryUnemployment"
})
Insert cell
blsMetroUnemployment = ({
name: "BLS Metro Unemployment",
notes: `Bureau of Labor Statistics`,
link: `https://www.bls.gov/`,
data: await FileAttachment("bls-metro-unemployment.csv").csv({typed: true}),
id: "blsMetroUnemployment"
})
Insert cell
caltrain = ({
name: "Caltrain",
notes: ``,
link: ``,
data: await FileAttachment("caltrain.csv").csv({typed: true}),
id: "caltrain"
})
Insert cell
cars = ({
name: "Cars",
notes: `1983 ASA Data Exposition`,
link: `http://lib.stat.cmu.edu/datasets/`,
data: await FileAttachment("cars.csv").csv({typed: true}),
id: "cars"
})
Insert cell
covidProjectedDeaths = ({
name: "COVID IHME Projected Deaths",
notes: `Institute for Health Metrics and Evaluation`,
link: `https://covid19.healthdata.org/`,
data: await FileAttachment("covid-ihme-projected-deaths.csv").csv({typed: true}),
id: "covidProjectedDeaths"
})
Insert cell
crimeanWar = ({
name: "Crimean War",
notes: ``,
link: ``,
data: await FileAttachment("crimean-war.csv").csv({typed: true}),
id: "crimeanWar"
})
Insert cell
d3survey2015 = ({
name: "D3 Community Survey 2015",
notes: `D3 Community Survey, 2015`,
link: `https://github.com/enjalot/d3surveys`,
data: await FileAttachment("d3-survey-2015.json").json(),
id: "d3survey2015"
})
Insert cell
availability = ({
name: "Availability",
notes: ``,
link: ``,
data: await FileAttachment("availability.csv").csv({typed: true }),
id: "availability"
})
Insert cell
decathlon = ({
name: "Decathlon",
notes: ``,
link: ``,
data: await FileAttachment("decathlon@2.csv").csv({typed: true }),
id: "decathlon"
})
Insert cell
diamonds = ({
name: "Diamonds",
notes: `ggplot2 “diamonds” dataset (carat and price columns only)`,
link: `https://github.com/tidyverse/ggplot2/blob/master/data-raw/diamonds.csv`,
data: await FileAttachment("diamonds.csv").csv({typed: true }),
id: "diamonds"
})
Insert cell
driving = ({
name: "Driving",
notes: `Based on Hannah Fairfield’s Driving Shifts Into Reverse`,
link: `https://archive.nytimes.com/www.nytimes.com/imagepages/2010/05/02/business/02metrics.html`,
data: await FileAttachment("driving.csv").csv({typed: true }),
id: "driving"
})
Insert cell
downloads = ({
name: "Downloads",
notes: ``,
link: ``,
data: await FileAttachment("downloads.csv").csv({typed: true }),
id: "downloads"
})
Insert cell
energyProduction = ({
name: "Energy Production",
notes: `U.S. Energy Information Administration; monthly energy review, primary energy production by source, Jan. 2022`,
link: `https://www.eia.gov/totalenergy/data/monthly/index.php`,
data: await FileAttachment("energy-production.csv").csv({typed: true }),
id: "energyProduction"
})
Insert cell
firstLadies = ({
name: "First Ladies",
notes: ``,
link: ``,
data: await FileAttachment("first-ladies.csv").csv({typed: true }),
id: "firstLadies"
})
Insert cell
fruitSales = ({
name: "Fruit Sales",
notes: ``,
link: ``,
data: await FileAttachment("fruit-sales.csv").csv({typed: true }),
id: "fruitSales"
})
Insert cell
footballCoverage = ({
name: "Football Coverage",
notes: ``,
link: ``,
data: await FileAttachment("football-coverage.csv").csv({typed: true }),
id: "footballCoverage"
})
Insert cell
gdp = ({
name: "GDP Per Capita",
notes: `🌶 The source is not really a csv, but a zip file containing 3 csv files with spurious initial lines. It has been pre-processed before being attached to this notebook.`,
link: `http://api.worldbank.org/v2/en/indicator/NY.GDP.PCAP.PP.CD?downloadformat=csv`,
data: await FileAttachment("gdp-per-capita.csv").csv({typed: true}),
id: "gdp",
})
Insert cell
gistemp = ({
name: "Temperature Anomalies",
notes: `NASA Goddard Institute for Space Studies`,
link: `https://data.giss.nasa.gov/gistemp/`,
data: await FileAttachment("gistemp.csv").csv({typed: true}),
id: "gistemp",
})
Insert cell
goog = ({
name: "GOOG",
notes: `Yahoo! Finance`,
link: `https://finance.yahoo.com/lookup`,
data: await FileAttachment("goog.csv").csv({typed: true}),
id: "goog"
})
Insert cell
googleTrends2020 = ({
name: "Google Trends 2020",
notes: ``,
link: ``,
data: await FileAttachment("google-trends-2020.csv").csv({typed: true}),
id: "googleTrends2020"
})
Insert cell
hadcrutAnnual = ({
name: "HadCRUT Annual",
notes: `Met Office Hadley Centre`,
link: `https://www.metoffice.gov.uk/hadobs/hadcrut4/data/current/series_format.html`,
data: (await FileAttachment("hadcrut-annual.txt").text()).trim() // trim trailing newline
.split(/\n/g) // split into lines
.map(line => line.split(/\s+/g)) // split each line into fields
.map(([year, anomaly]) => ({ // extract the year and median anomaly
year: new Date(Date.UTC(year, 0, 1)),
anomaly: +anomaly
})),
id: "hadcrutAnnual"
})
Insert cell
ibm = ({
name: "IBM",
notes: `Yahoo! Finance`,
link: `https://finance.yahoo.com/lookup`,
data: await FileAttachment("ibm.csv").csv({typed: true}),
id: "ibm"
})
Insert cell
learningPoverty = ({
name: "Learning Poverty",
notes: ``,
link: ``,
data: await FileAttachment("learning-poverty.csv").csv({typed: true}),
id: "learningPoverty"
})
Insert cell
metros = ({
name: "Metros",
notes: `The New York Times`,
link: `https://www.nytimes.com/2019/12/02/upshot/wealth-poverty-divide-american-cities.html`,
data: await FileAttachment("metros.csv").csv({typed: true}),
id: "metros"
})
Insert cell
mobydick = {
let data = await FileAttachment("moby-dick-chapter-1.txt").text()
// First compute a set of “words” from the text. As with any natural language
// task, this is messy and approximate.
let words = data.replace(/’/g, "") // remove apostrophes
.split(/\b/g) // split at word boundaries
.map(word => word.replace(/[^a-z]+/ig, "")) // strip non-letters
.filter(word => word) // ignore (now) empty words
.map(word => word.toUpperCase())
// Then given the words, compute an array of [position, character] tuples for
// each character in the input. A zero position indicates that it’s the first
// letter of the word, a one position the second letter, and so on.
let positions = words
.flatMap(word => [...word].map((c, i) => [i, c])); // compute position
return {
name: "Moby Dick",
data,
notes: `Moby Dick; or The Whale by Herman Melville`,
link: `https://www.gutenberg.org/files/2701/2701-h/2701-h.htm`,
words,
positions,
id: "mobydick"
}
}
Insert cell
morley = ({
name: "Metros",
notes: `Michelson Speed of Light Data`,
link: `https://github.com/vincentarelbundock/Rdatasets/blob/master/csv/datasets/morley.csv`,
data: await FileAttachment("morley.csv").csv({typed: true}),
id: "morley"
})
Insert cell
movies = {
const data = await FileAttachment("movies.json").json();
data.columns = Object.keys(data[0]);
return {
name: "Movies",
notes: `Vega`,
link: `https://github.com/vega/vega-datasets/blob/master/SOURCES.md#moviesjson`,
data,
id: "movies"
}
}
Insert cell
ncAbsenteeVotes = ({
name: "North Carolina Absentee Votes",
data: await FileAttachment("nc-absentee-votes.csv").csv({typed: true}),
notes: "See *statuses* for simplified status",
link: `https://observablehq.com/@observablehq/rejected-mail-ballots-in-north-carolina`,
statuses: new Map([
["ACCEPTED - CURED", "ACCEPTED"],
["PENDING CURE", "PENDING"],
["SPOILED", "REJECTED"],
["RETURNED UNDELIVERABLE", "REJECTED"],
["WITNESS INFO INCOMPLETE", "REJECTED"],
["DUPLICATE", "REJECTED"],
["ASSISTANT INFO INCOMPLETE", "REJECTED"],
["E-TRANSMISSION FAILURE", "REJECTED"],
["CONFLICT", "REJECTED"],
["SIGNATURE DIFFERENT", "REJECTED"],
["NO TIME FOR CURE - CONTACTED", "REJECTED"],
["NOT PROPERLY NOTARIZED", "REJECTED"]
]),
id: "ncAbsenteeVotes"
})
Insert cell
penguins = ({
name: "Palmer Penguins",
notes: `Dr. Kristen Gorman`,
link: `https://github.com/allisonhorst/palmerpenguins`,
data: await FileAttachment("penguins.csv").csv({typed: true}),
id: "penguins"
})
Insert cell
plotDocumentation = ({
name: "Plot Documentation",
notes: ``,
link: `https://observablehq.com/@observablehq/plot`,
data: await FileAttachment("plot-documentation.json").json(),
id: "plotDocumentation"
})
Insert cell
policeDeaths = ({
name: "Police Deaths",
notes: ``,
link: ``,
data: await FileAttachment("police-deaths.csv").csv({typed: true}),
id: "policeDeaths"
})
Insert cell
riaa = ({
name: "RIAA US Revenue",
notes: ``,
link: ``,
data: await FileAttachment("riaa-us-revenue.csv").csv({typed: true}),
id: "riaa"
})
Insert cell
seattleWeather = ({
name: "Seattle Weather",
notes: `NOAA/Vega`,
link: `https://github.com/vega/vega-datasets/blob/master/scripts/weather.py`,
data: await FileAttachment("seattle-weather.csv").csv({typed: true}),
id: "seattleWeather"
})
Insert cell
sfTemperatures = ({
name: "SF Temperatures",
notes: `National Climatic Data Center`,
link: `https://www.ncdc.noaa.gov/`,
data: await FileAttachment("sf-temperatures.csv").csv({typed: true}),
id: "sfTemperatures"
})
Insert cell
sfCovid = ({
name: "SF Covid",
notes: ``,
link: ``,
data: await FileAttachment("sf-covid.csv").csv({typed: true}),
id: "sfCovid"
})
Insert cell
simpsons = ({
name: "Simpsons",
notes: `IMDb/Todd W. Schneider`,
link: `https://data.world/data-society/the-simpsons-by-the-data`,
data: await FileAttachment("simpsons.csv").csv({typed: true}),
id: "simpsons"
})
Insert cell
softwareVersions = ({
name: "Software Versions",
notes: ``,
link: ``,
data: await FileAttachment("software-versions.csv").csv({typed: true}),
id: "softwareVersions"
})
Insert cell
stargazers = ({
name: "Stargazers",
notes: ``,
link: ``,
data: await FileAttachment("stargazers.csv").csv({typed: true}),
id: "stargazers"
})
Insert cell
stocks = ({
name: "Stocks (AMZN, AAPL, GOOG, IBM)",
notes: `Yahoo! Finance`,
link: `https://finance.yahoo.com/lookup`,
data: [amzn, aapl, goog, ibm].flatMap(({name, data}) => data.map(d => ({...d, Symbol: name}))),
id: "stocks"
})
Insert cell
survey = ({
name: "Survey",
notes: `Eitan Lees`,
link: `https://talk.observablehq.com/t/diverging-stacked-bar-chart-in-plot/6028`,
data: await FileAttachment("survey.csv").csv({typed: true}),
id: "survey"
})
Insert cell
timestamps = ({
name: "timestamps",
notes: ``,
link: ``,
data: await FileAttachment("timestamps.csv").csv({typed: true}),
id: "timestamps"
})
Insert cell
traffic = ({
name: "Traffic",
notes: `Moritz Klack`,
link: `https://observablehq.com/@moklick`,
data: await FileAttachment("traffic.csv").csv({typed: true}),
id: "traffic"
})
Insert cell
travelers = ({
name: "TSA Travelers",
notes: `TSA`,
link: `https://www.tsa.gov/coronavirus/passenger-throughput`,
data: await FileAttachment("travelers.csv").csv({typed: true}),
id: "travelers"
})
Insert cell
usCongressMembers = ({
name: "U.S. Congress Members",
notes: ``,
link: ``,
data: await FileAttachment("us-congress-members.csv").csv({typed: true}),
id: "usCongressMembers"
})
Insert cell
usPopulationStateAge = ({
name: "U.S. Population State Age",
notes: `U.S. Census Bureau`,
link: `https://observablehq.com/@d3/barcode-plot`,
data: await FileAttachment("us-population-state-age.csv").csv({typed: true}),
id: "usPopulationStateAge"
})
Insert cell
usPresidentialElection2020 = ({
name: "U.S. Presidential Election 2020",
notes: `Fabio Votta/Edison Research/NYT`,
link: `https://github.com/favstats/USElection2020-EdisonResearch-Results`,
data: await FileAttachment("us-presidential-election-2020.csv").csv({typed: true}),
id: "usPresidentialElection2020"
})
Insert cell
usRetailSales = ({
name: "U.S. Retail Sales",
notes: `U.S. Census Bureau`,
link: `https://www.census.gov/retail/mrts/historic_releases.html`,
data: await FileAttachment("us-retail-sales.csv").csv({typed: true}),
id: "usRetailSales"
})
Insert cell
usStatePopulation20102019 = ({
name: "U.S. State Population 2010-2019",
notes: `U.S. Census Bureau`,
link: `https://observablehq.com/@d3/diverging-bar-chart`,
data: await FileAttachment("us-state-population-2010-2019.csv").csv({typed: true}),
id: "usStatePopulation20102019"
})
Insert cell
usStateGrid = ({
name: "U.S. State Grid",
notes: ``,
link: ``,
data: await FileAttachment("us-state-grid.csv").csv({typed: true}),
id: "usStateGrid"
})
Insert cell
usPresidentialForecast2016Histogram = ({
name: "U.S. Presidential Forecast 2016 Histogram",
notes: ``,
link: ``,
data: await FileAttachment("us-presidential-forecast-2016-histogram.csv").csv({typed: true}),
id: "usPresidentialForecast2016Histogram"
})
Insert cell
usPresidentFavorability = ({
name: "U.S. President Favorability",
notes: `YouGov (polling data) and Wikipedia (presidential portraits) https://today.yougov.com/topics/politics/articles-reports/2021/07/27/most-and-least-popular-us-presidents-according-ame`,
link: `https://en.wikipedia.org/wiki/List_of_presidents_of_the_United_States`,
data: await FileAttachment("us-president-favorability.csv").csv({typed: true}),
id: "usPresidentFavorability"
})
Insert cell
wealthBritain = ({
name: "Who owns Britain?",
notes: `U.K. Office for National Statistics A recreation of “Who owns Britain?” by Richard Speigal; proportion plot chart type by Stephanie Evergreen https://stephanieevergreen.com/proportion-plots/ `,
link: `https://www.linkedin.com/feed/update/urn:li:activity:6758306750174138368/`,
data: await FileAttachment("wealth-britain.csv").csv({typed: true}),
id: "wealthBritain"
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more