Forum Karma: view stats and find highly-rated comments for any LW user

Link post

I’ve been posting and commenting pretty frequently over the last few months, and I was curious about some stats. What started as a few GraphQL queries and some Python scripting turned into an interactive web app:

Enter a username, and it will give you some stats and a graph, broken down by post and comment karma. You can use the slider to adjust the date range, and the stats are automatically recalculated for the selected time period.

Another feature is the list of “Gems”—comments with at least a few votes that have the highest net karma score, i.e. comments that received strong upvotes from high-karma users, and few downvotes. I found that this often gives a better sense of a user’s best comments than just looking at the highest-scoring ones.

It can be useful for finding your own historical top comments, or to get a sense for the best contributions of other users, which are often buried in their comment history and hard to access directly.[1]

Interesting example users:

It works for the EA forum too, though you have to specify a full profile URL to disambiguate:

Limitations and caveats:

  • The app works by querying the LW GraphQL API. It makes a couple of GraphQL queries to fetch data for up to 5000 comments and 5000 posts all at once. I only fetch the minimal fields needed to calculate the stats, not the actual contents of the posts or comments. (For top comments links and preview, the comment data is fetched individually as needed, on hover). I think this shouldn’t place too much stress on the LW backend, but I can take it down if the developers or mods find it to be problematic.

  • Data and stats for users with more than 5000 comments will be incomplete. I tried for a while to find a GraphQL query that supports fetching old comments for users with lots of comments, but couldn’t find one (offset doesn’t work; the API returns an error for too-big offsets.) If any LW devs (or anyone else) finds a GraphQL query that allows fetching old comments for users with >5000 comments, I can fix this. GreaterWrong somehow accomplishes this to implement sort by top or old, but they appear to be doing it on the backend, so I couldn’t reverse engineer it.

  • The comment previewer is pretty basic, since I’m just dumping the raw HTML from LW into a tooltip with minimal formatting. I might improve this at some point.

  • Stats for old users will be somewhat inaccurate—I assumed for the purposes of removing the user’s self-vote (which doesn’t count towards their karma) that everyone always strong upvotes their own posts and weak upvotes their own comments, and that strong /​ weak upvotes are worth the amounts described here. This will be slightly inaccurate for contributions from before strong voting was introduced, and more inaccurate for contributions from before self-voting was introduced. I was mainly interested in stats for more recent content, but if anyone has a handy schedule of when all the voting rules were implemented /​ changed, I can probably make it more accurate pretty easily.

  • Karma is counted as if it were all received at the time the post or comment was first posted. In my experience, the vast majority of votes on something happen relatively soon after it is posted—people tend not to vote on old stuff too much. So this introduces only a small inaccuracy.

Aside: this was the first nontrivial greenfield project that I’ve developed since GPT-4 was released. I used some technologies I was less familiar with (GraphQL, Chart.js, Tailwind CSS), and had GPT-4 write as much of the code as possible. I’ve been using GitHub Copilot for day-to-day programming for a while, but this was another level. The code quality wasn’t always great, and I’m not sure how much time it really saved me in the end, but it definitely helped me get up to speed with unfamiliar libraries faster, and it was pretty wild to just ask GPT to re-arrange or format the elements on the page and have it produce something that looked pretty good on the first try.

Feel free to report bugs or suggest features in the comments here. (No promises that I’ll keep working on it any time soon though.)

  1. ^

    GreaterWrong supports sorting user comments by top scoring or old, which can also be useful for this purpose, but there’s no option to filter by a date range.