Platform
Resources
Pricing
Sign in
Get started
Kelvin Li
Workspace
Fork
Public
By
Kelvin Li
Edited
May 22, 2023
Insert cell
arrow
=
require
(
'apache-arrow@6.0.0'
)
Insert cell
Insert cell
timestamps
=
[
new
Date
(
'2022-01-30T00:00:00.000Z'
)
.
getTime
(
)
,
new
Date
(
'2022-02-01T00:00:00.000Z'
)
.
getTime
(
)
]
;
Insert cell
timestampVector
=
arrow
.
Builder
.
new
(
{
type
:
new
arrow
.
TimestampMillisecond
(
)
,
}
)
.
append
(
timestamps
[
0
]
)
.
append
(
timestamps
[
1
]
)
.
finish
(
)
.
toVector
(
)
;
Insert cell
table
=
arrow
.
Table
.
new
(
[
timestampVector
,
]
,
[
'datetime'
]
,
)
;
Insert cell
dateTimeColumn
=
table
.
getColumnAt
(
0
)
Insert cell
datetimeData
=
arrow
.
Data
.
Timestamp
(
new
arrow
.
Timestamp
(
)
,
0
,
1
,
0
,
[
]
,
dateTimeColumn
.
data
.
values
)
Insert cell
dateTimeColumn
.
get
(
0
)
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
arrow
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
timestamps
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
timestampVector
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
table
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dateTimeColumn
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
datetimeData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML