r/dataisbeautiful • OC: 16 • Mar 29 '21

OC [OC] I've made an interactive map of reddit based on 176 million comments

59k Upvotes

1.1k comments sorted by

View all comments

4.3k

u/anvaka OC: 16 Mar 29 '21 edited Mar 29 '21

https://anvaka.github.io/map-of-reddit/ - here it is. This is my hobby project of the past several years.

The website is open source, and you can edit both the source code and the map.

What follows is a technical description of how this was produced. There is a lot to unpack there, but most importantly, I hope you find this work useful and enjoy the results.

First, I collected approximately 176M unique pairs of (user, subreddit). Then, I computed various binary distances between subreddits (Cosine, Jaccard, Pearson, and many others ). Jaccard similarity seemed to produce the most compelling results...

Based on Jaccard similarity I created a graph of related subreddits, performed a clustering algorithm, created a layout algorithm to place clusters in a map-like fashion. 

I spent a good amount of time thinking how to best deliver the map to a browser and decided to go with SVG format. Default rendering of large SVG files in the browser can be very slow, so I created my own WebGL renderer to render a subset of SVG commands on the video card.I have also created a streaming SVG parser, so that I can render the map without waiting until the entire file is transferred. I hope this gives a snappy experience.

It was a very long journey. I loved it a lot and sincerely hope you like it too.

Please let me know if you have any questions or suggestions.

Edit: Wow! Thank you for all your kind words and awards. I'm beyond happy! I created a community /r/MofR - if you want to join the discussion and contribute to the project after this post goes into abyss of time.

341

u/666moist Mar 29 '21

Well since you asked for suggestions, my two would be:

  1. When you click on a subreddit, pop up a list somewhere off to the side of all the subreddits whose connections to it light up. Would be much more convenient to see them all in one place than zooming in and out and panning around to see all of them.
  2. Label each color cluster so it's clear what's in each one. There's too many to click through and figure out one by one. If it's too much work (or too subjective) to manually determine all of them, then you could just label them each by the biggest subreddit (or 2-3) contained within. You could write the label off to the side in some of the empty space in the region or make it pop up on hover/click in the empty space or something.

Thanks for all your hard work, this is a ton of fun to play around with.

59

u/hoppla1232 Mar 29 '21

You can open a new issue on github with the enhancement label

100

u/666moist Mar 29 '21

What, you want me to put in effort?

I'm kidding, I'll do that. They're also not crazy big changes, if I have time I may just see if I can make sense of the code and do it myself.

20

u/pitnips Mar 29 '21

That would be dope

→ More replies (3)
→ More replies (2)

449

u/[deleted] Mar 29 '21

Omg this is cool

310

u/-Agonarch Mar 29 '21

Great, Australia got all the porn.

Win some lose some I guess.

91

u/ornryactor Mar 29 '21

That's Pornstralia, and you can visit whenever you like.

→ More replies (5)

156

u/slasherman Mar 29 '21 edited Mar 29 '21

If we name the states by the biggest city then we find that:

Regular continent: -The biggest state is the 'Funny state'

-The biggest city is in Announcements state called 'Announcements city'

-Among the southern states there's a big city called 'Nosleep'

The naughty continent: -The 'milf town' is a nice little place on the beach (no pun intended)

-The 'gays' and 'traps' have their own island via a ferry from the naughty continent. I guess no straight flights from the mainland. (pun intended)

Love this map!!

40

u/-Agonarch Mar 29 '21

The little island off Australia is probably NZ then, it's like Australia but more liberal.

→ More replies (4)
→ More replies (6)

27

u/LOTRfreak101 Mar 29 '21

Well hentai is still on the mainland for some reason.

39

u/grumd Mar 29 '21

Because those who comment in r/hentai aren't really afraid of their depravity and post their comments on their main accounts, same accounts that post on mainland subs. People who comment in actual porn subreddits usually use alt accounts.

19

u/Chilluminaughty Mar 29 '21

Off-shore accounts

→ More replies (2)
→ More replies (1)
→ More replies (7)
→ More replies (1)

118

u/PetrKDN Mar 29 '21

please add seperate buttons to zoom in and out , my mouse is kinda buggy and when i scroll it goes randomly up and down, so i cant zoom in fast, im zoomed in now a lot but i been struggling to zoom out for like 5 minutes now. thanks lol

107

u/anvaka OC: 16 Mar 29 '21

Will do! In the meantime would pressing on a keyboard's + and - keys work?

37

u/PetrKDN Mar 29 '21

+ and - doesnt work, but i tried different buttons (because im not an native english speaker i have a different keyboard so idk how is it on yours) but 2 buttons worked, seemingly unrelated, dont have any + or - symbols on them, but some buttons do work.

→ More replies (17)
→ More replies (4)
→ More replies (8)

52

u/puwetngbaso Mar 29 '21

I am so impressed by the effort you put into this. If you don't mind, could you Eli5 for a layman like me how you determined the connections between subreddits? What is Jaccard similarity?

141

u/anvaka OC: 16 Mar 29 '21 edited Mar 29 '21

Sure! Imagine you have a hundred users and three subreddits: A, B and C. Let's say 100 users who commented to subreddit A also commented to B. We can assume A and B are very close, because the same people comment on both of them together.

Now let's say out of that 100 people who commented to A only 1 left a comment to C. This gives a sign that A and C are less related to each other than A and B.

Jaccard similarity is a hundred years old formula that captures this concept in one elegant expression. It gives a number that you can assign to pair of subreddits and then sort them to find our As and Bs in the dataset.

→ More replies (8)

38

u/RiddleADayKpsBtmnAwy Mar 29 '21

Unreal. What a cool project.

→ More replies (1)

32

u/Nurpus Mar 29 '21

What are the colored map areas based on? The intersection of users they frequent?

22

u/anvaka OC: 16 Mar 29 '21

The colors of polygons are used only to distinguish adjacent polygons. So each polygon should have a neighbor with a color, that is different from the polygon's color.

Multiple non-adjacent polygons can have the same color, but it doesn't have any other meaning than to visually distinguish polygons from its neighbors.

The polygons themselves represent clusters within a graph of all subreddits. Clustering algorithm usually groups nodes (subreddits) together so that there are more links between nodes inside the cluster than outside

Sorry, I'm slow today and I hope I'm properly interpreting your question

→ More replies (1)

31

u/LOTRfreak101 Mar 29 '21

Why isn't r/hentai on NSFW island?

66

u/anvaka OC: 16 Mar 29 '21

I guess all other anime pulled it over to the mainland?

→ More replies (12)
→ More replies (6)

29

u/Fatshortstack Mar 29 '21

Awesome hobby project, could be cool if a user could plop their account into it and have the map highlight the subreddits with connections to see where we connect in the hive mind.

→ More replies (3)

18

u/nonuntitled Mar 29 '21

It’s amazing how close my frequent subreddits are to each other

Incredibly accurate, nice job

→ More replies (2)
→ More replies (129)