Platform
Resources
Pricing
Sign in
Get started
satspatel
Workspace
Fork
Published
By
satspatel
Edited
Oct 17, 2020
Importers
1
Insert cell
Insert cell
Insert cell
Insert cell
site_search
=
{
let
result
for
(
let
i
=
0
;
i
<
codes
.
length
;
i
++
)
{
if
(
codes
[
i
]
[
0
]
==
test
)
{
let
result
=
codes
[
i
]
[
1
]
;
return
result
}
}
return
result
;
}
Insert cell
Insert cell
Insert cell
d3
.
csvParse
(
await
file
.
text
(
)
)
Insert cell
Insert cell
header
=
{
let
str
=
''
;
for
(
let
i
=
0
;
i
<
27
;
i
++
)
{
str
+=
`"`
str
+=
i
.
toString
(
)
;
str
+=
`"`
str
+=
`,`
;
}
str
+=
'\r'
return
str
}
Insert cell
//header = `"ODS_CODE","NAME","3","4","5"\r`
Insert cell
new_file
=
header
+
(
await
file
.
text
(
)
)
Insert cell
codes
=
d3
.
csvParse
(
new_file
)
Insert cell
codes
[
0
]
[
1
]
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
test
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
site_search
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
file
Edit
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
header
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
new_file
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
codes
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
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML