Platform
Resources
Pricing
Sign in
Contact us
John Alexis Guerra Gómez
I love to build dataviz for insight discovery. I also love to put technology to the service of humanity
Workspace
Fork
Published
Observable Tricks
By
John Alexis Guerra Gómez
Edited
May 29, 2021
9 stars
1
Observable Tricks
Scented Checkbox
Vega crossfilter
Faceted Search
How to add a tooltip in D3
ColorAreaRange
d3.stack with d3.group
Persist Input
Conditional Show
Export a cell value
Multi Auto Select
Search Checkbox 🔎☑
Data Input
Save Modified SQLite file
Require npm module from local file
Insert cell
Insert cell
Insert cell
localUrl
=
"http://127.0.0.1:8080/dist/navio.js"
Insert cell
// The Date.now() is there to avoid the browser caching your file
require
(
`${
localUrl
}?${
Date
.
now
(
)
}`
)
Insert cell
Insert cell
Insert cell
navio1
=
FileAttachment
(
"navio.js"
)
.
url
(
)
.
then
(
require
)
Insert cell
Insert cell
Insert cell
navio_npm
=
require
(
"https://gitcdn.xyz/repo/john-guerra/2e68feffb2997e4f57401c426d5c6bdf/raw/1d64d289c347d8090fc9cd352250c18e95124532/navio.min.js"
)
Insert cell
Insert cell
Insert cell
viewof
file
=
Object
.
defineProperty
(
html
`<div><input type=file>`
,
'value'
,
{
get
(
)
{
const
[
f
]
=
this
.
firstChild
.
files
;
return
f
?
URL
.
createObjectURL
(
f
)
:
undefined
;
}
}
)
Insert cell
your_local_module
=
require
(
file
)
Insert cell
Insert cell
navio5
=
require
.
alias
(
{
d3
}
)
(
await
FileAttachment
(
"navio.js"
)
.
url
(
)
)
Insert cell
d3
=
require
(
"d3@4"
)
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
localUrl
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
navio1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
navio_npm
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
file
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
your_local_module
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
navio5
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML