Skip to content

Instantly share code, notes, and snippets.

@bwv988
Created April 24, 2018 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwv988/24f9b0bb5052eef8fab6494081b74f2c to your computer and use it in GitHub Desktop.
Save bwv988/24f9b0bb5052eef8fab6494081b74f2c to your computer and use it in GitHub Desktop.
airlinePlot = {
var myPlot = html`<div></div>`;
var trace1 = {
x: airlineData.map(function(d){
return d["Month"];
}),
y: airlineData.map(function(d){
return d["International airline passengers: monthly totals in thousands. Jan 49 ? Dec 60"];
})
};
var layout = {
title:'International Airline Passengers 1949-1960',
xaxis: {title: 'Year'},
yaxis: {title: 'Passenger Number (in Thousands)'}
};
// For observable to display it, it must be returned out of this code chunk
return plotly.newPlot(myPlot, [trace1], layout);
}
airlineData = d3.csv('https://raw.githubusercontent.com/bwv988/lstm-neural-net-tests/master/data/international-airline-passengers.csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment