HIVE user counts by countries based on profile location data

I prepared this analysis result a couple weeks ago but haven't published since we have been quite busy recently working on ecency. It's better to publish before i forget this small project ever existed :)

Analysis result is based on "location" field in account data.

Although not all users fill that field or some of them enter non-location text, the result provides a general overview.

Input

Data source comes from hivemind's db with query below:

SELECT location from hive_accounts where location != '';

Result dataset size was 249465 while i was working on the project.

Code

Project source code is here. It uses geopy and OpenStreetMap's Nominatim API for location detection from raw text.

You can see lots of caching mechanisms in code. Since it is a long running script, i didn't want to start over to data collection from zero every time it crashes or stalls.

It took almost 32 hours to complete it at background and extracted 234117 country out of raw dataset.

Result 🎉

CountryCountPercent
🇺🇸 United States4305118.39%
🇻🇪 Venezuela, Bolivarian Republic of203808.71%
🇮🇩 Indonesia182217.78%
🇮🇳 India120475.15%
🇳🇬 Nigeria94794.05%
🇩🇪 Germany90513.87%
🇬🇧 United Kingdom88163.77%
🇰🇷 Korea, Republic of74433.18%
🇨🇦 Canada73723.15%
🇧🇩 Bangladesh69062.95%
🇵🇭 Philippines64962.77%
🇦🇺 Australia45841.96%
🇵🇰 Pakistan44541.90%
🇹🇷 Turkey34551.48%
🇫🇷 France34151.46%
🇵🇱 Poland33131.42%
🇨🇳 China29591.26%
🇪🇸 Spain27491.17%
🇳🇱 Netherlands26021.11%
🇮🇹 Italy24591.05%
🇧🇷 Brazil22530.96%
🇷🇺 Russian Federation22490.96%
🇲🇾 Malaysia21560.92%
🇿🇦 South Africa21550.92%
🇲🇽 Mexico20050.86%
🇳🇿 New Zealand19900.85%
🇨🇴 Colombia18720.80%
🇩🇴 Dominican Republic17650.75%
🇷🇴 Romania16390.70%
🇻🇳 Viet Nam14250.61%
🇯🇵 Japan14020.60%
🇦🇷 Argentina13140.56%
🇦🇹 Austria12550.54%
🇹🇭 Thailand11450.49%
🇺🇦 Ukraine11350.48%
🇨🇭 Switzerland11100.47%
🇬🇷 Greece10730.46%
🇧🇪 Belgium9310.40%
🇵🇹 Portugal9190.39%
🇸🇪 Sweden9120.39%

Of course US in the top of the list. Surprisingly Venezuela is second. Also Turkey surprised me. It is quite top of the list. I didn't know that amount of users from my country around here.

Hive on!

H2
H3
H4
3 columns
2 columns
1 column
23 Comments
Ecency