Published
Edited
Jan 6, 2021
8 forks
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`Here is some Markdown. Edit me! You can add...
# Headers of
### different sizes,
* bullet
* points

\`fixed width font\`

1. Ordered
2. Lists,

and more. For reference, here is a [guide to formatting using the Markdown syntax](https://observablehq.com/@jaynel/markdown-summary)`
Insert cell
Insert cell
html`<h4>Here is some HTML</h4>`
Insert cell
{
let message = "Here is some JavaScript"
return message
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
currentWeek = 1
Insert cell
"There are " + (10 - currentWeek) + " weeks left in the quarter"
Insert cell
Insert cell
// Instantiate a variable named exponent here
Insert cell
2**exponent
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
cars = (await require('vega-datasets@1'))['cars.json']()
Insert cell
Insert cell
printTable(cars.slice(0,10))
Insert cell
Insert cell
population = (await require('vega-datasets@1'))['population.json']()
Insert cell
// viewof shows the table view, but assigns the table value
viewof population_table = aq.from(population).view()
Insert cell
Insert cell
Insert cell
Insert cell
md `Jot your ideas here!`
Insert cell
Insert cell
Insert cell
cars_table = aq.from(cars)
Insert cell
Insert cell
cars_table
.filter(d => op.includes(op.upper(d.Origin), 'USA'))
.view()
Insert cell
Insert cell
cars_table
.filter(d => op.includes(op.upper(d.Origin), 'USA'))
.orderby("Miles_per_Gallon")
.view()
Insert cell
Insert cell
cars_table
.filter(d => op.includes(op.upper(d.Origin), 'USA'))
.orderby(aq.desc("Miles_per_Gallon"))
.view(5)
Insert cell
Insert cell
Insert cell
// Add your transformations here!
population_table
Insert cell
Insert cell
{
let popPivot = aq.fromCSV(await FileAttachment('population.csv').text())
return popPivot
.fold(aq.range(1,15), {as:['year', 'population']})
.view()
}
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more