🌍 Waking up and Sleeping 🌎 - Live Twitter Map

This is a live map of “good morning” and “good night” tweets made with the Twitter API + CesiumJS. Anyone who tweets “good morning” or “good night”, in any language, shows up on this map.

App URL: http://wakingandsleeping-globe.glitch.me/

I was inspired to try this after seeing Katherine Yang’s project: https://twitter.com/bookwormgirl910/status/1312820041268690945. Credit to the original idea & implementation to her. I just made a 3D Cesium version of it.

It was a lot of fun trying to polish this up to get a nice look and feel.

Some highlights:

  • Click on any point to see the full tweet text and a link to the tweet
  • Each point on the globe is tagged with a time so you can scrub the timeline and see how the red/blue tweets around the world happened over time
  • This uses the new day/night imagery blending in CesiumJS 1.66, see example here: Cesium Sandcastle
  • The camera moves to each new tweet, while keeping its distance from the Earth, so you can zoom in/out to adjust the view and it’ll stay there as it gently rotates around as tweets come in
  • Click G to toggle “ICRF” mode. This will lock the camera in place so you can see the globe itself rotating over time. Fun for timelapses.

You can find the source on Glitch: Glitch :・゚✧

3 Likes

I created a timelapse after leaving it overnight here: https://twitter.com/Omar4ur/status/1315325135990202369.

Cesium handles 16,000 tweets on the globe really well! Just posting this for posterity here since a lot of people asked to be able to see past tweets, if anyone wants to play around with this, here’s the last 13,000 tweets as a JSON you could modify the app to load directly to explore them visually on the globe: log2(1).zip (559.9 KB)

1 Like

Nice! First I thought it’s all feeding CZML from a server, with live updating CZML packets, but it’s all client side.

1 Like

Thanks Michael!

Yeah I didn’t really consider using CZML partially because the app I based this off of already had the server sending { lat/lon/tweet } so it was easier to just add that directly, but that would have been nice since a lot of people have asked to see the last X hours of tweets upon loading the app so they don’t have to wait for data to come in, and that’s not currently stored in any way.

On the other hand, the label is intentionally not “time dynamic” in that there’s only one label entity that moves around, so that’s less stuff the CesiumJS engine has to check and show/hide every frame. I believe this is how Celestrak works to get thousands of moving entities with good performance: Celestrak - New Cesium App

I didn’t explore the time-dynamic features of CZML yet. It may be better on the server side if you have many requests from browsers, like the live tracking for the Redbull X-Alps events. You would essentially get moving back in time for free.