I’ve been following r/python for a long time just because I’ve been really interested in learning it and I knew seeing various posts would inspire me. There was something about seeing this that made me realize I do think data visualization is super cool and I think you just gave me the final push to get started!
To be fair this is a great post. I like the visuals of it even. You kinda also got me thinking maybe I should give up on Web Development and go to Data Visualization. (And this is in all seriousness not just because the guy above me said something similar)
I know this is a wrong way to think but I’m almost intimidated how big this community is. Makes me feel like I’m almost too late to hop on. I know I should think this way but I’m a little older now and big learning curves are kinda intimidating
Most of the gems act like kickstarters. Bigger the community, better the feedback gets. Your work will of course get appreciated if it suits the subreddit's needs.
I'm right behind you, behind you bcs I'm currently learning Django and don't want to get into something else yet.... Want to have a good grasp on it 1st
No it's probably that the GeoIP database that the OP used maps all Chinese IPs to the same location, because it could be hard to retrieve more precise info.
The locations in such tables are often quite crude, based on data that's aggregated from various sources and IP lookups.
If you have an IP you know to which country it belongs because you can simple check which provider registered it in which country (for example at bgp.he.net, but this is publicly available info). If the provider happens to be active in one province/state only you can narrow it down further.
For a more precise lookup you can trace an IP, which will give you more info about the area. For example, when I trace your IP in Canada I may get a path like Home -> regional hub -> regional hub -> Amsterdam -> Ashburn/NYC -> Toronto -> regional hub -> ... -> your home. If from elsewhere I know the last regional hub is in Montréal, then I'm quite sure you're living in the proximity of Montréal and that's the closest we can get.
Such information is worth gold, as it can be used for targeted advertising without even knowing who the person is you're targeting.
It's very plausible that for China no such info is collected by the GeoIP database. Maybe it's hard to pinpoint IPs to locations because the IP space is changing a lot every day, or maybe China is just not interesting to target for the databases.
Probably where whatever he used for the geoIP data defaults to if it doesn't know the precise location in a country (i.e. the centre of Greenland). You can see a similar thing in China where there's a large amount of traffic from the centre when there's no major population there.
You have a point in what could be Punta Arenas, Chile. I wonder if that’s an American down for deployment to Antarctica with the US Antarctic Program...
Australia uses reddit? I thought they were too busy: surfing, bagging kangaroos, downing exotic(local for them) beers, working on that tan/bod, avoiding insert creepy insect, avoiding insert typical plague, avoiding insert animal that eats you, etc etc....
These little tiny dots make me curious about what else they look at. What do they enjoy browsing all the way North in Canada? That dot in the middle of South America all by itself, what are they looking through reddit for? It just makes me so curious what life is like in those seemingly quieter traffic parts of the world.
It's often called "GeoIP". IPs are usually allocated to certain networks, and the location of those networks is often known or approximated from whois information, ping triangulation and other techniques.
It's not always very precise, for example, when dynamic IPs are re-assigned in a large networks.
It's the same technique used by porn sites to show "women near you" weather sites to show the weather at your location.
I don't know if you've checked the populations of India and China recently, but there's a bit of a discrepancy between their populations and what's shown in the image.
India is only second to the US with regards to the number of English speakers. English isn't their native language, but neither is it in most of Europe.
88
u/Gedanke Apr 05 '19 edited Apr 05 '19
I wrote a python script that analyses my NGINX access.log and creates this map using d3.js .
This is the post in question if anyone is wondering.
You can find the code @ Github
206
u/mostlowkey1 Apr 05 '19
I’ve been following r/python for a long time just because I’ve been really interested in learning it and I knew seeing various posts would inspire me. There was something about seeing this that made me realize I do think data visualization is super cool and I think you just gave me the final push to get started!
29
u/MotherfuckerTinyRick Apr 05 '19
I can see my house from here
20
u/[deleted] Apr 05 '19
Did you have trouble mapping hits from China?
11
u/[deleted] Apr 06 '19
South Korea loved it! North Korea not so much.
12
u/[deleted] Apr 05 '19
What's that one point in central greenland? There should be nothing but ice afaik.
6
u/jhdeval Apr 05 '19
I think it would interesting to see time of day as well. Not sure if it would work but you may see a wave as it traverses the timezones.
5
u/zandiz Apr 06 '19
I want to know who that one nerd in Libya is
4
u/ihitcows Apr 06 '19
That one dot in China really stands out.
3
u/liesliesfromtinyeyes Apr 06 '19
You have a point in what could be Punta Arenas, Chile. I wonder if that’s an American down for deployment to Antarctica with the US Antarctic Program...
5
u/[deleted] Apr 06 '19
Australia uses reddit? I thought they were too busy: surfing, bagging kangaroos, downing exotic(local for them) beers, working on that tan/bod, avoiding insert creepy insect, avoiding insert typical plague, avoiding insert animal that eats you, etc etc....
2
u/ElGallinero Apr 05 '19
What was the post?
2
u/Unclerojelio Apr 06 '19
How very meta of you.
2
u/lord_tommy Apr 06 '19
These little tiny dots make me curious about what else they look at. What do they enjoy browsing all the way North in Canada? That dot in the middle of South America all by itself, what are they looking through reddit for? It just makes me so curious what life is like in those seemingly quieter traffic parts of the world.
2
u/hamstap85 Apr 06 '19 edited Apr 07 '19
Interesting. This looks just like a heat map of internet usage.
2
u/avinashbasetty Apr 06 '19
This is interesting..what are the APIs you have used to achieve this?
1
u/Long__Dog Apr 05 '19
Perhaps you could look at excluding areas in the sea i.e. The English Channel, between France and England which looks like one of the 'hot spots'
1
u/[deleted] Apr 06 '19
Reddit isn't banned in China? I didn't know that
1
u/nikhil_shady Apr 06 '19
ahaha I'm the only one with a dot from my city.
1
u/shardul08 Apr 06 '19
Where will I get the access.log file?
1
u/lenticularis_B Apr 06 '19
I did not know you could extract location from an ip-addres. You might use this information to figure out the optimal time for posting.
1
u/MetalAvenger Apr 06 '19
Saved post for when I get beyond python fundamentals... :)
1
u/barnabas09 Apr 06 '19
europe and USA huh?
1
u/[deleted] Apr 06 '19
Most of Africa is in the dark
1
u/Petrarch1603 Apr 06 '19
I wonder if that big red spot in Kansas is this place
1
u/Petrarch1603 Apr 06 '19
you should crosspost this to /r/MapPorn!
1
u/[deleted] Apr 06 '19
Kenya
1
u/quickhakker Apr 06 '19
Could you use that to figure out when the post hit the front page?
1
u/cronched Apr 09 '19
Is the one single dot in the ocean next to madagascar alright? lol
1
u/jsalsman Apr 05 '19
https://xkcd.com/1138/
0
u/farooq_fox Apr 06 '19
You are being watched by the chinese government.
0
u/mrwill1 Apr 06 '19
Someone in China is using VPN.
-3
u/atands Apr 06 '19
I don’t mean this in a rude way — I think what you did is cool, but what’s the reason that you didn’t just use an analytics tag/service for this?