What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Is it possible to know how many users got the X badge before me? I have a gold badge and I would like to know how many times it was awarded before I got it.

Do you also think this is an interesting feature to have on the BADGES tab?

Meanwhile, maybe someone skilled in database could write a query for this on stackexchange, assuming that there is enough information on the DB right now to make this possible.

share|improve this question
    
    
I would rather if I didn't have to do a manual count of how many users got the badge before me. –  karlphillip Apr 24 '11 at 17:20

2 Answers 2

up vote 1 down vote accepted

I believe the badge page list recipients in reverse order.

By counting from your id (on page 9) to the end of page 15, I get 116 others who got the Unsung Hero badge before you.

share|improve this answer
    
Thank you very much, but that count doesn't sound right. And I do think I'll be able to get more gold badges along the way and I would rather not to do a manual count every time I would like to know that information. –  karlphillip Apr 24 '11 at 17:22
    
My manual count says I was user #376, or something near that. –  karlphillip Apr 24 '11 at 17:27
    
@karlphillip: I have to ask, why does it matter whether you are user #376 or #673 to get a badge? I mean, I can totally understand the excitement of finding out that you're the very first user to get a particular gold badge, but 376th? That piece of data is simply not important enough to always include it for every badge on every user profile ever. Especially since you can still calculate it if you really, really must. (That being said, @yhw42's counting really is way off. (^_^)) –  ЯegDwight Apr 24 '11 at 17:57
    
@RegDwight Because it's an interesting information. Why bother calculating how much reputation a user got in a week/month/year and compare it to the rest of the users, just to display on your profile top 1% this week. It has no practical use either. However, it is interesting to know that. –  karlphillip Apr 24 '11 at 18:01
1  
@karlphillip: The top 1% this week is extremely useful. It lets you see, at a glance, whether the user is still active on the site. Being able to see that is something many, many people kept asking for over and over and over again. (I'm at 3k on SO. But I haven't participated at all for a year or so. My rep alone doesn't tell you that. My rep-league percentage does.) On the other hand, if you visited my profile and saw that I was the 14296th user to get a Nice Answer badge, that would tell you so little it could just as well be a randomly generated number. –  ЯegDwight Apr 24 '11 at 18:56
    
My apologies @karl! My Sunday morning math failed me. My manual count was actually #356. –  yhw42 Apr 25 '11 at 12:54

Just to show the far reach of the SO API.

In Mathematica:

getPosBadge[userID_, badge_] := 
 Module[{totalusers, a, stat}, 

  stat = "http://api.stackoverflow.com/1.1/badges/";

  totalusers = "total" /. Import[stat <> badge <> "?pagesize=1&page=1", "JSON"];

  a = Join @@ Table[("users" /. 
       Import[stat <> badge <> "?pagesize=100&page=" <> ToString[page], "JSON"]), 
             {page, 1, Ceiling[totalusers/100]}];

  totalusers - Position["display_name" /. a, userID] + 1] 

getPosBadge["karlphillip", "226"]

-> 357
share|improve this answer
    
I'm a bit slow today, I didn't get what Mathematica has to do with this. And thank you very much. –  karlphillip Apr 24 '11 at 18:27
    
Mathematica has nohing to do with it. 357 does –  belisarius Apr 24 '11 at 18:29
    
I get that, that's why I upvoted. But leaving a lost reference on your answer is no good. Do you work with them or something? –  karlphillip Apr 24 '11 at 18:32
    
@karlp NOOOO It's just a convoluted way to invoke an API. Removing reference! –  belisarius Apr 24 '11 at 18:37
    
Humm, Ok. I understood it now. When you said "the far reach of an API" I was lost, but now I see that you meant "the far reach of the SO API". Thank you, sir. –  karlphillip Apr 24 '11 at 18:39
3  
@karlp Edited. My English is not as good as it should be :( –  belisarius Apr 24 '11 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .