Published
Edited
Sep 30, 2020
1 fork
Insert cell
md`# 2D Line Graph`
Insert cell
Insert cell
Insert cell
Insert cell
dataSample = [
{"u": 1, "v": 28}, {"u": 2, "v": 55},
{"u": 3, "v": 42}, {"u": 4, "v": 34},
{"u": 5, "v": 36}, {"u": 6, "v": 48}
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
LineGraph_3= LineMark({title:"Line Graph with zero set to false",values:dataSample,fieldx:"u",fieldy:"v",zero:false})
Insert cell
Insert cell
LineGraph_4= LineMark({title:"my Line Graph",values:dataSample,fieldx:"u",fieldy:"v",zero:false})
Insert cell
LineGraph_5= LineMark({title:"my Line Graph",fieldx:"date",fieldy:"close",zero:false})
Insert cell
Insert cell
Insert cell
Insert cell
theRates = InspectData('https://marketdata.tradermade.com/api/v1/timeseries?api_key=owKzCjjxp3n-SjZBHVWW&currency=USDIDR&start_date=2019-10-01&end_date=2019-10-10&format=records',{type:"json",property:"quotes"})
Insert cell
theArg = ({name:"theRates",
url:"https://marketdata.tradermade.com/api/v1/timeseries?api_key=owKzCjjxp3n-SjZBHVWW&currency=USDIDR&start_date=2019-10-01&end_date=2019-10-10&format=records",
format:{type:"json",property:"quotes",parse:{"date":"date:'%Y-%m-%d'"}}})
Insert cell
theRates2 = InspectData(theArg)
Insert cell
md`### Libraries and Tools`
Insert cell
import {VegaSpec, data, scales, axes,marks} from '@binarmaya/top-level-vega-spec'
Insert cell
embed = require("vega-embed@6")
Insert cell
import {InspectData} from '@binarmaya/parse-transform-and-inspect-vega-data'
Insert cell
spex = {
var spes = new VegaSpec()
spes.scales = [new scales({name:"x",type:"linear"})]
spes.scales[0]['type'] = "time"
return spes
}
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