Published
Edited
Jun 20, 2019
1 fork
Importers
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
plotNow([{
y:getURL.mRNASeq.map(ex=>ex['expression_log2']),
x:getURL.mRNASeq.map(ex=>ex['z-score']),
ids:getURL.mRNASeq.map(ex=>ex['tcga_participant_barcode']),
mode: 'markers',
type: 'scatter',
}],{
title:'BLCA, FireBrowse mRNASeq expression data on TP53',
yaxis:{
title:'gene expression, log2',
},
xaxis:{
title:'z-score',
}
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
flexibleData = async function(url,fields,from,size){
let body = ({
'fields': fields,
'from': from,
'size': size
})
return(await betterFetch(url,body))
}
Insert cell
fieldData = flexibleData('https://api.gdc.cancer.gov/projects', "disease_type", 0, 100)
Insert cell
fieldPlotter= async function(field){
let dtt={}
let y = fieldData.data.hits.map(x=>{
if(!dtt[x.field]){
dtt[x.field]=0
}
dtt[x.field]+=1
})
return dtt
}
Insert cell
fieldPlot = fieldPlotter('disease_type')
Insert cell
fieldGraph= {
let div = DOM.element('div')
let trace={
x:Object.keys(fieldPlot),
y:Object.keys(fieldPlot).map(tp=>fieldPlot[tp]),
type:'bar'
}
return plt.plot(div,[trace])
}
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
Insert cell
Insert cell
cancerGraph= {
let div = DOM.element('div')
let trace={
x:Object.keys(cancerPlot),
y:Object.keys(cancerPlot).map(tp=>cancerPlot[tp]),
type:'bar'
}
return plt.plot(div,[trace])
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
femaleData=(await fetch('https://api.gdc.cancer.gov/files?from=0&size=250&filters={"op":"=","content":{"field":"cases.demographic.gender","value":["female"]}}')).json()
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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