Published
Edited
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3.csv('https://docs.google.com/spreadsheets/d/1165d0I7h8CeqH-eF71LsbnC7u3_XBTZuXn8x-ZXiH68/export?format=csv')
Insert cell
Insert cell
d3.json('https://raw.githubusercontent.com/maegul/melb_clim_change/master/cc_data.json')
Insert cell
Insert cell
d3.json('https://raw.githubusercontent.com/maegul/melb_clim_change/master/cc_data.json')
.then(function(data){
// All code for using the data goes in here
return data
})
Insert cell
Insert cell
Insert cell
Insert cell
plotly = require('https://cdn.plot.ly/plotly-latest.min.js')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
// Making a piece of HTML to put the plot into
var plot = html`<div></div>`
// Defining the plot ... here simply putting the appropriate data in
// In plotly, they're called traces
var trace1 = {
// data along x axis
x: fin_data.map(function(d){
return d.date
}),
// data along y axis
y: fin_data.map(function(d){
return d.close
})
}
// Adding the plot to the piece of HTML
plotly.react(plot, [trace1])
// For observable to display it, it must be returned out of this code chunk
return plot
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
var change = (Math.random() * 10) - (Math.random() * 10)
// var current_value = change_me
mutable change_me += change
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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