CINXE.COM

Hatnote Recent Changes Map

<!doctype html> <html> <head> <title>Hatnote Recent Changes Map</title> <meta name="title" content="Hatnote Recent Changes Map"> <meta name="description" content="A map of recent contributions to Wikipedia from unregistered users."> <meta name="keywords" content="hatnote, rcmap, recent changes, wikipedia, edits, visualization"> <meta name="author" content="Stephen LaPorte and Mahmoud Hashemi"> <link href='style.css' rel='stylesheet' type='text/css'> <script src='jquery-1.9.1.min.js' type="text/javascript"></script> <script src='datamaps-world.js' type="text/javascript"></script> <script src="reconnecting-websocket.min.js" type="text/javascript"></script> <script src="main.js" type="text/javascript" type="text/javascript"></script> <script> var RC_LOG_SIZE = 20; var DEFAULT_LANG = 'en' /* ================================================================ */ var SOCKETS = {} $(document).ready(function() { $('#about-link').click(function(){ // because we use window.location to set languages. $('html, body').animate({scrollTop:$(document).height()}, 'slow'); return false; }); $('body').append('<div id="loading"><p>Connecting ...</p></div>') world_map = $("#map") .datamap({scope: 'world', bubbles:[], geography_config: { highlightOnHover: false, popupOnHover: false }, bubble_config: { borderWidth: 0, borderColor: '#000', popupOnHover: true, popupTemplate: _.template('<div class="hoverinfo"><%= data.page_title %> <span class="lang">(<%= data.lid %>)</span></div>'), fillOpacity: 0.75, animate: true, highlightOnHover: true, highlightBorderColor: '#667FAF', highlightFillColor: '#667FAF', highlightBorderWidth: 1, highlightFillOpacity: 0.85 }, fills: { defaultFill: '#ccc', 'add': '#306596', 'subtract': '#cc4731' } }); langs = { 'en': ['English', 'ws://wikimon.hatnote.com:9000'], 'de': ['German', 'ws://wikimon.hatnote.com:9010'], 'ru': ['Russian', 'ws://wikimon.hatnote.com:9020'], 'uk': ['Ukrainian', 'ws://wikimon.hatnote.com:9310'], 'ja': ['Japanese', 'ws://wikimon.hatnote.com:9030'], 'es': ['Spanish', 'ws://wikimon.hatnote.com:9040'], 'fr': ['French', 'ws://wikimon.hatnote.com:9050'], 'nl': ['Dutch', 'ws://wikimon.hatnote.com:9060'], 'it': ['Italian', 'ws://wikimon.hatnote.com:9070'], 'sv': ['Swedish', 'ws://wikimon.hatnote.com:9080'], 'ar': ['Arabic', 'ws://wikimon.hatnote.com:9090'], 'fa': ['Farsi', 'ws://wikimon.hatnote.com:9210'], 'id': ['Indonesian', 'ws://wikimon.hatnote.com:9100'], 'as': ['Assamese', 'ws://wikimon.hatnote.com:9150'], 'hi': ['Hindi', 'ws://wikimon.hatnote.com:9140'], 'bn': ['Bengali', 'ws://wikimon.hatnote.com:9160'], 'pa': ['Punjabi', 'ws://wikimon.hatnote.com:9120'], 'te': ['Telugu', 'ws://wikimon.hatnote.com:9160'], 'ta': ['Tamil', 'ws://wikimon.hatnote.com:9110'], 'mr': ['Western Mari', 'ws://wikimon.hatnote.com:9130'], 'kn': ['Kannada', 'ws://wikimon.hatnote.com:9170'], 'or': ['Oriya', 'ws://wikimon.hatnote.com:9180'], 'sa': ['Sanskrit', 'ws://wikimon.hatnote.com:9190'], 'gu': ['Gujarati' , 'ws://wikimon.hatnote.com:9200'], 'pl': ['Polish' , 'ws://wikimon.hatnote.com:9260'], 'mk': ['Macedonian' , 'ws://wikimon.hatnote.com:9270'], 'be': ['Belarusian' , 'ws://wikimon.hatnote.com:9280'], 'bg': ['Bulgarian' , 'ws://wikimon.hatnote.com:9300'], 'sr': ['Serbian' , 'ws://wikimon.hatnote.com:9290'], 'wikidata': ['Wikidata' , 'ws://wikimon.hatnote.com:9220'] } var make_click_handler = function($box, lang) { return function() { if ($box.is(':checked')) { enable(lang); } else { disable(lang); } } }; var return_lang_list = function() { var enabled_langs = window.location.hash.slice(1).split(','); for (var i = 0; i < enabled_langs.length +1; i ++) { if (enabled_langs[i] == '') { enabled_langs.splice(i, 1); } } return enabled_langs; } var set_lang_list = function (langs) { if (langs[0] == '') { langs.splice(0, 1); } window.location.hash = '#' + langs.join(','); } var enable = function(lang) { var enabled_langs = return_lang_list(); if (enabled_langs.indexOf(lang) < 0) { enabled_langs.push(lang); set_lang_list(enabled_langs); } }; var disable = function(lang) { var enabled_langs = return_lang_list(); var lang_index = enabled_langs.indexOf(lang); if (lang_index >= 0) { enabled_langs.splice(lang_index, 1); } set_lang_list(enabled_langs); }; window.onhashchange = function () { var enabled_langs = return_lang_list(); for (lang in SOCKETS) { if (enabled_langs.indexOf(lang) >= 0) { if (!SOCKETS[lang].connection || SOCKETS[lang].connection.readyState == 3) { SOCKETS[lang].connect(); $('#' + lang + '-enable').prop('checked', true) } } else { if ($('#' + lang + '-enable').is(':checked')) { $('#' + lang + '-enable').prop('checked', false) } if (SOCKETS[lang].connection) { SOCKETS[lang].close(); } } } set_lang_list(enabled_langs); } for (lang in langs) { if (langs.hasOwnProperty(lang)) { if (lang == 'wikidata') { $('#lang-boxes').append('<p><input type="checkbox" name="' + langs[lang][0] + '" id="' + lang + '-enable"/><label for="' + lang + '-enable">' + langs[lang][0] + ' <span class="conStatus" id="' + lang + '-status"></span></label></p>'); } else { $('#lang-boxes').append('<p><input type="checkbox" name="' + langs[lang][0] + '" id="' + lang + '-enable"/><label for="' + lang + '-enable">' + langs[lang][0] + ' Wikipedia <span class="conStatus" id="' + lang + '-status"></span></label></p>'); } SOCKETS[lang] = new wikipediaSocket.init(langs[lang][1], lang); var box = $('#' + lang + '-enable'); if (box.is(':checked')) { enable(lang) } box.click(make_click_handler(box, lang)); } } var enabled_langs = return_lang_list(); console.log(enabled_langs) if (!enabled_langs.length) { enabled_langs.push(DEFAULT_LANG) } for (var i = 0; i < enabled_langs.length + 1; i ++) { var lang = enabled_langs[i] $('#' + lang + '-enable').prop('checked', true) enable(lang) } world_map.addBubbles = addBubbles; return; }); </script> </head> <body> <div id="header"> <span class="about-link"><a id="about-link" href="">about</a> & <a href="http://blog.hatnote.com/post/49342528753/wikipedia-recent-changes-map">blog</a></span> <h1>Wikipedia Recent Changes Map</h1> </div> <div class="content"> <div id="wrapper"> <div id="map"></div> </div> <div class="bg"> <div class="rc-list"> <h3>Recent changes</h3> <ul id="rc-list"> </ul> <div class="note"> <p id="edit_counter"></p> <p>For more, see Wikipedia's RecentChanges pages for <a href="http://www.wikipedia.org/">each language</a>.</p> </div> </div> </div> <div class="foot"> <h3>Languages</h3> <div id="lang-boxes"></div> <div class='clear'><br/></div> <br/> <h3><a name="about"></a>What is this map?</h3> <p><a href='http://blog.hatnote.com/post/49342528753/wikipedia-recent-changes-map'>Read more</a> about this project.</p> <p> When an <a href="http://en.wikipedia.org/wiki/Wikipedia:User_access_levels#Unregistered_users">unregistered user</a> edits Wikipedia, he or she is identified by his or her <acronym title="Internet Protocol">IP</acronym> address. These IP addresses are translated to users' approximate geographic location. Unregistered users only make a fraction of total edits -- <b>only 15%</b> of the contributions to English Wikipedia are from unregistered users. Edits by registered users do not have associated IP information, so the map actually represents only a small portion of the <a href="http://en.wikipedia.org/wiki/Special:RecentChanges">total edit activity on Wikipedia</a>. </p> <p> Built using <a href="http://d3js.org">d3</a>, <a href="http://datamaps.github.io">DataMaps</a>, <a href="https://github.com/fiorix/freegeoip">freegeoip.net</a>, and the <a href="http://meta.wikimedia.org/wiki/Research:Data#IRC_Feeds">Wikimedia RecentChanges IRC feed</a>, broadcast through <a href="https://github.com/hatnote/wikimon">wikimon</a>. Source <a href="https://github.com/hatnote/rcmap">available on github</a>. </p> <p>Built by <a href="https://github.com/slaporte">Stephen LaPorte</a> and <a href="https://github.com/mahmoud">Mahmoud Hashemi</a>.</p> </div> </div> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-40320359-1', 'hatnote.com'); ga('send', 'pageview'); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10