question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timestamps: proper support for temporal maps (client-side)

See original GitHub issue

Right now the only supported data types are numbers and categories in the form of strings.

We need to support timestamps and give the proper Date/Time utils to work with them.

The WWI_Ships example is a good starting point since it is working thanks to a column which is the number of days since 1917 instead of using the timestamp column.

We need to define the syntax/style API first.

I imagine something like: torque($date, from: '15/01/1917', to: '1/01/1922', speed: '15 days'/'1 second', range: '10 days', trail: '10 days')

Where from and to are the start and end timestamps (should be optional, by default it should take the minimum and maximum timestamps of the dataset), speed is the simulated time that passes each real-time second of the simulation, in this case 15 days per second, range is the time duration in which the input is considered active (i.e. temporalSimulation returns 1), trail is the time duration in which the input is considered semiactive (i.e. temporalSimulation returns a number greater than 0 and less than 1).

The output of this function is (regarding the input $date) is:

Output
 ^
|1.66|
|1.33|
|1.0 |        ______
|0.66|       /      \
|0.33|      /        \
|0.0 | ____/          \____
=================================> Time

Note: I’ve used named arguments, IMO this improves clarity, but we haven’t implemented this yet.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Jesus89commented, Mar 9, 2018

I replaced moment.js by little maths with Date some time ago, saving half size of the Carto.js bundle: https://github.com/CartoDB/cartodb.js/pull/1981

1reaction
rochoacommented, Mar 6, 2018

Literal timestamps should follow ISO 8601, as it would be easier to support time zones and adjusting that to the client configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timestamps: proper support for temporal maps (client-side) · Issue ...
We need to support timestamps and give the proper Date/Time utils to work with them. The WWI_Ships example is a good starting point...
Read more >
java - Timestamp from the client or the server - What's the best ...
Go server-side. If you want to capture the current moment when inserted in the database, certainly the best approach is capturing that ...
Read more >
GeoJSONLayer | ArcGIS Maps SDK for JavaScript 4.25
Indicates whether the client-side features in the layer have Z ... Determines if the layer will update its temporal data based on the...
Read more >
Understand and use the distributed tracing UI
For New Relic's distributed tracing feature: learn how to use the UI and understand the data displayed.
Read more >
How to set client-side date fields from a unix epoch timestamp
Let's say you want to set a date field in a client-side script based on some serialized data (perhaps from a GlideAjax response)......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found