Published
Edited
Jun 24, 2018
Importers
25 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
/*
id - id of the google drive file - get from the link of the file, e.g. "1YZGlgoUjJFJk-1NmWdsqU6vecYmqFk7p"
w - width of the ifram - default width value in observable
h - height of the iframe - default 500
domain - domain that the folder exists in (e.g. "ucsd.edu")
type - not used as of now
*/
gDriveFile = (params) => {
if (typeof(params)==='string') {
params = {id:params}
}
let {id='', w=width, h=500, domain='', type='list'} = params;

return html`
<iframe src="https://drive.google.com${(domain)?`/a/${domain}`:''}/file/d/${id}/preview" width="${w}" height="${h}" style="border:0'"></iframe>
`
}
Insert cell
/*
id - id of the google drive folder - get from the link of the folder, e.g. "1YZGlgoUjJFJk-1NmWdsqU6vecYmqFk7p"
w - width of the ifram - default width value in observable
h - height of the iframe - default 500
domain - domain that the folder exists in (e.g. "ucsd.edu")
type - 'list' or 'grid', default 'grid'
*/

gDriveFolder = (params={}) => {
if (typeof(params)==='string') {
params = {id:params}
}
let {id='', w=width, h=500, domain='', type='list'} = params;
return html`
<iframe
src="https://drive.google.com${(domain) ? `/a/${domain}`:''}/embeddedfolderview?id=${id}#${type}"
width="${w}"
height="${h}"
style="width:100%; height:600px; border:0;">
</iframe>
`
}
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