dmarx / reddit-map

Map of reddit community structure
0 stars 0 forks source link

Fix bug in community labeling #11

Closed dmarx closed 7 years ago

dmarx commented 7 years ago

Communities are supposed to be labeled based on their two largest subreddits by active user count, but that doesn't seem to be working properly.

dmarx commented 7 years ago

Simple solution: instead of trying to identify top two in a single pass, just collect (subreddit, user count) tuples into a list associated with their community, then sort the list and take the top two. Should be trivially fast with the small data I'm working with.

http://stackoverflow.com/a/4174955

dmarx commented 7 years ago

closed with commit aa2216f