пятница, ноября 22, 2024

Bluesky Mapping

Update: I got busy and created a second map. Social Media Locations (comment below with suggestions for a better name). This map allows you to search for real-time Bluesky mentions of locations around the world. To start a search you just need to click on a map label for a country, state, city, town or neighborhood. 

Once you click on a place name messages will (often very slowly) begin to appear in the map sidebar. Warning: this is a real-time search of Bluesky messages so you may have to wait a very long time before someone actually mentions your location!


Yesterday I came across two interesting Bluesky visualizations.

Rainbow Sky (created by Martin Wattenberg) scans incoming Bluesky posts and draws a stripe every time it finds a color word. Martin’s map was inspired by EmojiRain (created by Jared Short)  (created by Jared Short), which scans Bluesky posts for emojis and animates those emojis as they fall from above.

Inspired by these two visualizations I've created the first Bluesky interactive map that I have seen (although almost definitely not the first to have been created). My map, US State Social, scans Bluesky posts for mentions of the 50 US states. When it detects a mention, it adds a marker to the map and displays the associated message in the map’s sidebar. Once the map has found messages for all 50 states, it removes all the markers and starts the process all over again.

All three visualizations leverage the power of WebSockets to work in real-time, making them dynamic and interactive. WebSockets allow the visualizations to maintain an open connection with the Bluesky platform, receiving incoming posts as they happen. This means that as new posts are made, the visualizations can instantly detect color words, emojis, or state mentions and update accordingly.

When I first started building US State Social, I had the idea of scanning all Bluesky posts for locations and adding a marker for every location mentioned. However, scanning every single word in every Bluesky message and sending each word to a geocoding service turned out to be inefficient - I quickly hit the rate limits for the geocoder. Then I came up with the idea of limiting markers to the 50 US states, which allowed me to avoid using a geocoding API. Now, I only need to scan Bluesky messages for 50 words, and since I already know the locations of all 50 states, I no longer need to rely on an external geocoding service.

Honestly, my map visualization really isn’t very interesting, but I thought I’d share a link to it in case anyone wants to try building their own Bluesky map. You can check out the code for the map on Glitch, and maybe even build a more interesting map yourself.

1 комментарий:

Paul R. Pival комментирует...

Neat! I made one for Canada: https://distlib.blogs.com/distlib/2024/11/bluesky-mapping-canadian-skeets.html