A IPython Notebook to analyze the Gaza-Israel 2012 crisis
The Guardian is tracking and mapping live (link) the recent incidents in Gaza and Israel. As part of their data-journalism spirit, they are sharing the data as a Google Fusion Table available for access.
This notebook is an attempt to show, on the one hand, how the toolkit from the Python stack can be used for a real world data hack and, on the other, to offer deeper analysis beyond mapping of the events, both exploiting the spatial as well as the temporal dimension of the data.
The source document (
.ipynbfile) is stored on Github as a gist here, which means you can fork it and use it as a start for you own data-hack.
A viewable version is available here, via the IPython Notebook Viewer.
Collaborate on the notebook!!!
In its initial version (Nov. 20th), the notebook only contains code to stream the data from the Google Fusion Table into a
pandas DataFrame (which means you get the data ready to hack!). Step in and collaborate in making it a good example of how Python can help analyze real world data. Add a new view, quick visualization, summary statistic of fancy model that helps understand the data better!
To contribute, just fork the gist as you would with any git repository.
The following cell pulls the data using the API. In the meantime, Google has changed its terms and ways to access it, so this might not work.
If you cannot pull the data using the API, an easy alternative is to export the table to a
csv file manually and read it separately:
Very basic descriptive analysis
Volume of incidents by day
Location of events coloured by day