Is it possible to get the distribution of users by country for a site?
An estimate is fine, I think of an overview.

It is not obviously useful, in general.
But it would be of value for politics beta, to understand whether it is practically US politics, or more diverse. It's of some relevance for Europeans not used to strict party separation.

For this case, it would be enough to look at only the number of US members divided by total number of members.

I assume a related question would be the way to find how to do that, eg: Filter users by country


3 Answers 3


You may find more queries here or can create your own query on Stack Exchange Data Explorer.

Top users by location (country or city)

Users by location, with a minimum reputation

Find Stack Overflow Users In Your City (with user-links)

  • There could be lots of users running this, I'm get an error: The query processor ran out of internal resources and could not produce a query plan. trying the query in the first link
    – dustytrash
    Commented Nov 18, 2019 at 17:40
  • @dustytrash, sometimes its not working and shows the error Commented Nov 19, 2019 at 5:00

When you signup (for free) at quantcast.com (something alternative to google analytics) then you can view several sorts of statics for various websites, including the subdomains of those sites.

I am not sure I can share images from that website, but here's an old topic on meta which includes images from some of the features: What's up with China?

You will be able to get an image that is very much like here: http://chartsbin.com/view/4797 (although that one seems to stem from google analytics data)


Is it possible to get the distribution of users by country for a site?

In general, no, at least no easily obtained accurate estimate. You may be able to guess, but it needs a lot of work (or some smart data mining tool going through data dumps, but then making that tool is probably a lot of work too).

What you could, alternatively, at least in the case of Politics.SE, is to to go through the top users (which can define in a number of ways using SEDE, e.g. by reputation, by most questions asked, by most votes, etc.) and then look for clues.

Many users on Politics.SE have dropped clues, which can be found in their profiles (either in the location field, or in their profile description) or in their posts. For example, users asking about and evidently familiar with Sweden are most likely Swedish and probably not American (which you aim to find out).

First, you sample a list of users and check for clues manually. Then, you should have three counts: those who appear to be from the US, those who are probably not and those who left no clues. By comparing these three counts you might be able to make a reasonable estimate.

Going by which questions users answer is not a good metric, many European users answer questions about the States and vice versa.

You must log in to answer this question.

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