Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time slider #22

Open
alexey-milovidov opened this issue May 4, 2024 · 8 comments
Open

Time slider #22

alexey-milovidov opened this issue May 4, 2024 · 8 comments

Comments

@alexey-milovidov
Copy link
Member

It can span for the whole time range (2022 .. now).

Workaround: it is already possible to simply add AND time BETWEEN ... AND ... in the WHERE condition in the query.

@Aleshere
Copy link

Hey Alexey, do we have data for 2024? It looks like this is up until 2023?

@alexey-milovidov
Copy link
Member Author

@Aleshere yes, we have real-time data, updated every few seconds.
You need to add

AND time >= '2024-01-01' AND data_source = 'airplanes.live' to the WHERE condition.

Example: https://adsb.exposed/?zoom=6&lat=48.8503&lng=7.0313&query=5a39e027e487062e9944dc28315fa0e9

Last five minutes: https://adsb.exposed/?zoom=5&lat=39.6565&lng=-96.2402&query=56c83c59f309758aa839b61b6ecacd6c

@Aleshere
Copy link

Amazing, works like a charm. Thank you

@syonist
Copy link

syonist commented Oct 8, 2024

If I only wanted to display flights between midnight and 7 am what can I add to the WHERE condition ? Looking in the tables I thought tohour(DateTime64) BETWEEN 0 AND 7 or hour BETWEEN 0 AND 7 might work. But neither did !

@alexey-milovidov
Copy link
Member Author

@syonist, write toHour(time) BETWEEN 0 AND 7:

https://adsb.exposed/?zoom=5&lat=48.6313&lng=7.9321&query=ece72146892a323b5329eab3af09f667

Keep in mind that this is the time in UTC. The local time will be different.

You can get something resembling the local time with

time + INTERVAL lon / 15 HOUR AS local_time

https://adsb.exposed/?zoom=4&lat=43.4419&lng=-82.2930&query=61ea9941cfab051e0dde29fdb4ca6b36

@alexey-milovidov
Copy link
Member Author

Red: night flights, Green: day flights, Blue: evening flights:

https://adsb.exposed/?zoom=4&lat=66.1708&lng=22.2566&query=92cc010e703e3bb32d853f98c6b073e0

@syonist
Copy link

syonist commented Oct 13, 2024 via email

@alexey-milovidov
Copy link
Member Author

There is also limited direct access to the data:

clickhouse-client --host kvzqttvc2n.eu-west-1.aws.clickhouse-staging.com --user website --secure

(it has limits on the number of scanned records and queries)

Note: to install clickhouse-client on Linux or Mac, do

curl https://clickhouse.com/ | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants