Files to create maps of Foreign Policy article web visits
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This repository contains files to create maps in R with ggplot of website visits to this article

Once all files are put in the same directory and the working drive is set to that directory in the R code it should be straight forward to run the code and create the maps.

The json file used contained data from website visits from about 3:00pm to about 8:00pm on June 27th, and then from about 6:00am to about 10:00am on June 28th. There are about 385 observations. Each json object looked like: {"localtime":"7/27/16 7:52 PM","protocol":"HTTP/1.1","status":"200","ip":"##.###.##.###","httpdate":"27/Jul/2016:19:52:52","size":"36274","timestamp":1469670772,"agent":"Mozilla/5.0 (iPad; CPU OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69","url":"/chinarealestate/Indexed_China_Housing.csv","tz":"-0600","method":"GET","referer":"","line":999}

The csv file used contained data from website visists from 6:00am on June 27 to 6:00am on June 28th. There are 1000 observations. The data was copied in a table format.

The shapefiles for the maps can be downloaded here:

The credit for the function to get the geographic locations goes to Andrew Ziem:

The longer post I created for the Foreign Policy article can be found here: