Platform
Resources
Pricing
Sign in
Get started
Tom Larkworthy
Tech Lead at Taktile. Formerly Firebase, Google
Workspace
Fork
Published unlisted
By
Tom Larkworthy
Edited
May 17, 2021
Insert cell
Insert cell
Insert cell
results
=
fetchp
(
insee_csv_zipped
,
{
headers
:
{
'x-requested-with'
:
"observablehq.com"
// Upstream blocks us without this, silly
}
,
responseHeaders
:
{
'transfer-encoding'
:
null
,
// Its trying to send them in a chunked reponse which is not working ATM
'Cache-control'
:
`public, max-age=${
24
*
7
*
3600
}`
// We can cache at the proxy level now too!
}
}
)
Insert cell
content
=
results
.
arrayBuffer
(
)
Insert cell
Insert cell
Insert cell
// deploy the subset as a csv
deploy
(
"insee_bdm_idbanks_150521.csv"
,
async
(
req
,
res
)
=>
{
res
.
header
(
"Cache-control"
,
`public, max-age=${
24
*
7
*
3600
}`
)
;
//
res
.
header
(
"Content-Type"
,
"text/plain"
)
;
res
.
send
(
unzip
)
;
}
)
Insert cell
Insert cell
jszip
=
require
(
"jszip@3/dist/jszip.min.js"
)
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
insee_csv_zipped
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
results
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
content
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
unzip
Edit
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
jszip
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML