103 comments

[ 5.1 ms ] story [ 150 ms ] thread
"Sussex" as the name of the Among Us section had me laughing
How are connections between repos determined? I checked some of my repos and don't see any references in either direction for some of the connections.
In the first line: "Dots are close to each other if they have a lot of common stargazers."
That explains why they are "close to each other" but not what determines which nodes are connected by an edge.
I think it's the other way around. The similarity metric determines which repos have edges (possibly weighted?)

And then some clustering algorithm makes sense of this giant graph by laying out sets of nodes that have a lot of edges to each other, close to each other

The closeness is just layout, the edges is the data structure that determines closeness.

Jaccard similarity returns a value between 0 and 1 (in this case the vast majority of the values being close to 0). I suspect there's a hard-coded threshold value to determine an edge, e.g. if Jaccard similarity between A and B is > 0.2, create an edge.
The author answered that question in the original HN post: https://news.ycombinator.com/item?id=35933981

Basically what others are guessing, lines represent the highest similarity scores based on "stargazers", which also forms the entire map. To anyone confused, the lines only appear once you click into a specific country.

Surprised at how small Rustland is. Barely a province in Clouderra.

Also, interesting how both Bevy and Veloren are in Rustland. Probably, the stars come more from the Rust community than the game dev community. Which I guess makes sense: the Rust ecosystem is still relatively small and feels like a lot of people doing X but in Rust.

Also, lol at Zig being a suburb of Rust
Happy to see bevy between them though! :)
Tangent: not that often to see a fellow Ramon in hn :)
I'm also shocked how small "nodelandia" is and that its not even its own continent. I guess we all overestimate the size of our bubbles
Most of the mass is concentrated in the node_modules folder.
OTOH the vim and emacs lands seem to be huge!
Vim land seems much larger than I expected.
Not that surprised. Rust is known for being evangelized by a very loud minority.
The data is a from March 2023 according to OP so a lot of the more recent rust projects just won't be included yet.
Yes...

Aiming to redo it some time in early 2025!

I can see many osdev Rust projects in "PlusPlus Nation" near other kernels, which mean that "X but in Rust" might be in "X" instead of "RustLand".
I've been thinking something similar for identifying ownership areas within an organization would be cool.
Interesting that azureland is under l33t nation and not clouderia
Somehow torvalds/linux is in Fronterra, next to JS projects, awesome-X lists, and frontend checklists.

Either kernel hackers unexpectedly love frontend, or more likely the people that write the code don't overlap much with the people that star Github projects!

Perhaps the same reason heat maps are often really the underlining population map https://xkcd.com/1138/
That’s why in NLP we use term frequency over inverse document frequency. It gives you a measure of common uncommon things are.

Wonder how you’d implement that in a heat map. Just call each pixel a document and see where it takes you?

Winsorize the data points to remove outliers and then divide it by the population count for the case of the heatmap?
People have been critiquing the collaborative filtering aspect of this work vs content analysis ("[why use stars instead of code similarity]") but there's something elegant about the simplicity of using less priors here.

A tf*idf matrix could be applied to the star-feature matrix too. Document = github repo. Term = name of user who starred it.

THUS, users who overstar are simply less important for computing similarities.

This would mitigate the phenomenon of massively popular github repos being clustered together because of folks who blithely star the most well known stuff.

I wonder if code embeddings might have been a better way to organize the projects, although probably infeasible given the amount of resources required to download and compute embeddings for each file.
Jaccard similarity is not particularly good for "celebrity" projects.

They are similar because they are popular, not because there is semantic relationship.

It's the same problem I faced with the map of reddit (https://anvaka.github.io/map-of-reddit/ ) - all popular subreddits are just "similar" to each other.

Stil works great for smaller, non-celebrity projects :D

Very neat and creative approach but I'm honestly conflicted whether the country/map metaphor is the best choice. In many cases the names are not that clear, so one has to zoom in to understand what they represent. It would perhaps be more interesting to do hierarchical clustering and show something like average connectiveness between the (super)clusters with lines, possibly with more descriptive/faithful LLM-generated labels for each cluster.
They could have done that, but they decided to do a map
I was pleasantly surprised that it wasn’t a heavy line drawing creation. As someone who first did those in the 90’s and almost immediately learned their limits, I think this is nice because it doesn’t overclaim. It’s just a view, not a thesis.

I like diagrams where the axes mean something. Lines, shape, boxes/groups, distance, X vs Y, colour, thickness, texture, background, foreground. I also like simple. So often it’s lines to be fancy with no meaning. This one is just a pic, with some grouping, and it has personality. Yay?

(Still love lines, just not everywhere always.)

I couldn't find a universal clustering algorithm yet: Frequently there is more than one way to group data that still makes sense, and as a result whichever final clustering option we choose - it will not be perfect.

Hm... unless maybe we do some sort of quantum clustering, which could be a fun project to explore!

It's a bit hazy now, but I remember trying hdbscan algorithm (hierarchical clustering), and on the graph of the GitHub size - I just couldn't fit it in memory.

I did end up using something similar to hierarchical clustering (mix of louvain/leiden/my own), and that's what we see in the final map.

Wikimedia is right next to GPT Nation. I think an invasion is imminent.
Lispaña is a really excellent name for a lisp country :)
couldn't find any of my stuff so that means i gotta do more lol
yay anvaka reaches front page!

fun times from reddit map

I'm not sure why BinanceLand is in AILandia though, please dont encourage them XD
It would make sense that there's an overlap between crypto fans and a certain subset of AI fans.
Clearly crypto should be a sinking ship with people swimming to the shores of other places in this metaphor
ZH.Pyscrapia had an island of its own.
A fun minigame is trying to find a particular project using the map only, without the search feature :-)
or start with one project and find your way to another, you can imagine there are shipping lines :)
> Homelabia

Definitely some unique naming choices there lol

This is truly a work of art! Great job!
Why was jaccard similarity preferred here i would love to learn more about the choice process. Fantastic Work though love it
Thank you!

I tried quite a few various similarity metrics, and Jaccard was giving me the best results. This is all very subjective, of course.

Cool visualisation!

It was somewhat amusing that MicroPython isn't in MicroPythonia but Arduinoria...and CircuitPython is in PicoPythonia. :)

Django is in the middle of Pythonia, and not in Djangonia. Weird!
It's similar to how SpringBootia is almost as big as Javaland, but Spring Boot itself is in Javaland and not it's "homeland"
If you develop on Linux you generally probably don't star linux/kernel. But you do star other projects developing on Linux.

Ditto if you develop Django, you star Python libraries, not Django downstream plugins.

I do have the theory that the more untyped the language is, the larger the islands are: Fronterra (JavaScript), Cloudderra (YAML), AILandia (Python) are way bigger than Java, Swift, DotNet, etc. even though the prejudice saying goes that the problem of software engineering is stale old enterprise code in Java/DotNet.

That might be the case, but the libraries seems to be more reusable!

Javascript made the barrier to entry for creating a package nearly zero. In contrast, it's fairly difficult to publish something on Maven Central (the main Java repository). You need to prove you own a domain, setup a GPG key for signing, manually register with Sonatype, which is more than many people are willing to do. I think that explains it much better.
The stale old enterprise code is not in public repositories.