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

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