import numpy as np
import matplotlib.pyplot as plt
from ggplot import *
%matplotlib inline
import requests
import pandas as pd
api_key = '532d8dc4ed3329652f114b73'
api_url = 'http://api.crisis.net/item/?sources=unhcr'
headers = {'Authorization': 'Bearer ' + api_key}
total = 10000
df = pd.DataFrame()
def get_data(offset=0, limit=100, df=None):
url = api_url + '&offset=' + str(offset) + '&limit=' + str(limit)
r = requests.get(url, headers=headers)
x = pd.DataFrame(r.json())
x = x['data'].apply(pd.Series)
df = df.append(x, ignore_index=True)
if total > offset + limit:
return get_data(offset + limit, limit, df)
return df
df = get_data(df=df)
len(df)
1591
df = df.dropna(how='all')
df = df.reset_index()
len(df)
1507
geo_df = df['geo'].apply(pd.Series)
geo_admin_df = geo_df['addressComponents'].apply(pd.Series)
df = pd.concat([df[:], geo_admin_df[:], geo_df[:]], axis=1)
df['latitude'], df['longitude'] = df['coords'].str[1], df['coords'].str[0]
df["publishedAt"] = pd.to_datetime(df["publishedAt"])
df.index = df['publishedAt']
df = df.drop(['index', 'contentEnglish', 'createdAt', 'entities', 'geo', 'id', 'language', 'license', 'lifespan', 'publishedAt', 'remoteID', 'source', 'summary', 'tags', 'updatedAt', 'adminArea4', 'adminArea5', 'formattedAddress', 'postalCode', 'streetAddress', 'addressComponents', 'coords'], axis=1)
df.head()
content | totalAffectedPersons | adminArea1 | adminArea3 | latitude | longitude | |
---|---|---|---|---|---|---|
publishedAt | ||||||
2014-09-02 18:57:39 | 7515 individuals reported at Burubiey Transit ... | 7515 | Ethiopia | Gambella | 8.424240 | 33.230500 |
2014-09-02 15:27:38 | 139289 individuals reported at Egypt in Egypt | 139289 | Egypt | Egypt | 30.044420 | 31.235712 |
2014-09-02 15:17:46 | 23855 individuals reported at Sulaymaniyah in... | 23855 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-09-02 14:59:30 | 1798 individuals reported at Refugees Disperse... | 1798 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-09-02 14:55:38 | 631 individuals reported at Kirkuk Non-Camp Re... | 631 | Iraq | Kirkuk | 0.000000 | 0.000000 |
df.to_csv('unhcr_global.csv')
len(df['latitude'].unique())
149
df_borders_isis = df[df['adminArea1'] == ['Turkey' or
'Iran' or
'Saudi Arabia' or
'Jordan' or
'Lebanon' or
'Turkey' or
'Israel']]
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-141-7fba12f86da4> in <module>() 5 'Lebanon' or 6 'Turkey' or ----> 7 'Israel']] /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/ops.py in wrapper(self, other) 570 571 # scalars --> 572 res = na_op(values, other) 573 if np.isscalar(res): 574 raise TypeError('Could not compare %s type with Series' /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/ops.py in na_op(x, y) 531 result = lib.vec_compare(x, y.astype(np.object_), op) 532 else: --> 533 result = lib.vec_compare(x, y, op) 534 else: 535 result = lib.scalar_compare(x, y, op) /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/lib.so in pandas.lib.vec_compare (pandas/lib.c:11898)() ValueError: Arrays were different lengths: 1507 vs 1
df['2014-07-02':'2014-09-02'].groupby(df['latitude']['2014-07-02':'2014-09-02']).totalAffectedPersons.plot(kind = 'line')
/Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/matplotlib/axes/_base.py:2544: UserWarning: Attempting to set identical left==right results in singular transformations; automatically expanding. left=735435.777199, right=735435.777199 'left=%s, right=%s') % (left, right))
latitude -4.778995 Axes(0.125,0.2;0.775x0.7) -4.275202 Axes(0.125,0.2;0.775x0.7) -1.283300 Axes(0.125,0.2;0.775x0.7) -0.044804 Axes(0.125,0.2;0.775x0.7) 0.000000 Axes(0.125,0.2;0.775x0.7) 0.003347 Axes(0.125,0.2;0.775x0.7) 0.110722 Axes(0.125,0.2;0.775x0.7) 0.146820 Axes(0.125,0.2;0.775x0.7) 0.188956 Axes(0.125,0.2;0.775x0.7) 0.313109 Axes(0.125,0.2;0.775x0.7) 1.632622 Axes(0.125,0.2;0.775x0.7) 1.933227 Axes(0.125,0.2;0.775x0.7) 1.940342 Axes(0.125,0.2;0.775x0.7) 3.062182 Axes(0.125,0.2;0.775x0.7) 3.491490 Axes(0.125,0.2;0.775x0.7) ... 32.263911 Axes(0.125,0.2;0.775x0.7) 32.294597 Axes(0.125,0.2;0.775x0.7) 32.333559 Axes(0.125,0.2;0.775x0.7) 32.355652 Axes(0.125,0.2;0.775x0.7) 32.555560 Axes(0.125,0.2;0.775x0.7) 33.267398 Axes(0.125,0.2;0.775x0.7) 33.831051 Axes(0.125,0.2;0.775x0.7) 33.886944 Axes(0.125,0.2;0.775x0.7) 34.357235 Axes(0.125,0.2;0.775x0.7) 34.435797 Axes(0.125,0.2;0.775x0.7) 35.551354 Axes(0.125,0.2;0.775x0.7) 36.191110 Axes(0.125,0.2;0.775x0.7) 36.866667 Axes(0.125,0.2;0.775x0.7) 37.059561 Axes(0.125,0.2;0.775x0.7) 37.177826 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, Length: 131, dtype: object
camp = []
for row in df_kenya['latitude']:
if row == 0.110722:
camp.append('Ifo Refugee Camp')
elif row == 0.14682:
camp.append('Ifo 2 Refugee Camp')
elif row == 0.188956:
camp.append('Dagahaley Refugee Camp')
elif row == 0.003347:
camp.append('Hagadera Refugee Camp')
elif row == -0.044804:
camp.append('Kambioos Refugee Camp')
elif row == 3.729882:
camp.append('Kakuma')
elif row == -1.2833:
camp.append('Nairobi')
elif row == 3.729025:
camp.append('Kakuma Refugee Camp')
df_kenya['camp'] = camp
groupby_camps = df_kenya.groupby(df_kenya['camp'])
groupby_camps.sum()
totalAffectedPersons | latitude | longitude | |
---|---|---|---|
camp | |||
Dagahaley Refugee Camp | 427024 | 0.944780 | 201.413050 |
Hagadera Refugee Camp | 523302 | 0.016735 | 201.873285 |
Ifo 2 Refugee Camp | 257739 | 0.734100 | 201.647250 |
Ifo Refugee Camp | 387876 | 0.553610 | 201.567330 |
Kakuma | 610215 | 55.948230 | 522.646890 |
Kakuma Refugee Camp | 165286 | 11.187075 | 104.527062 |
Kambioos Refugee Camp | 98686 | -0.224020 | 201.859060 |
Nairobi | 96527 | -3.849900 | 110.450100 |
groupby_camps.get_group('Dagahaley Refugee Camp')
content | totalAffectedPersons | adminArea1 | adminArea3 | latitude | longitude | camp | |
---|---|---|---|---|---|---|---|
publishedAt | |||||||
2014-08-31 20:04:29 | 85906 from 20592 households reported at Dagaha... | 85906 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-07-31 10:16:01 | 85604 from 20667 households reported at Dagaha... | 85604 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-06-30 06:37:23 | 85925 from 20740 households reported at Dagaha... | 85925 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-05-31 12:17:50 | 84637 from 20172 households reported at Dagaha... | 84637 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-04-30 11:34:06 | 84952 from 20344 households reported at Dagaha... | 84952 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
groupby_camps.get_group('Hagadera Refugee Camp')
<pandas.core.groupby.DataFrameGroupBy object at 0x10775fc50>
groupby_camps.get_group('Ifo 2 Refugee Camp')
content | totalAffectedPersons | adminArea1 | adminArea3 | latitude | longitude | camp | |
---|---|---|---|---|---|---|---|
publishedAt | |||||||
2014-08-31 20:04:29 | 85906 from 20592 households reported at Dagaha... | 85906 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-07-31 10:16:01 | 85604 from 20667 households reported at Dagaha... | 85604 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-06-30 06:37:23 | 85925 from 20740 households reported at Dagaha... | 85925 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-05-31 12:17:50 | 84637 from 20172 households reported at Dagaha... | 84637 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
2014-04-30 11:34:06 | 84952 from 20344 households reported at Dagaha... | 84952 | Kenya | Dadaab | 0.188956 | 40.28261 | Dagahaley Refugee Camp |
groupby_camps.get_group('Ifo Refugee Camp')
groupby_camps.get_group('Kakuma')
content | totalAffectedPersons | adminArea1 | adminArea3 | latitude | longitude | camp | |
---|---|---|---|---|---|---|---|
publishedAt | |||||||
2014-08-31 15:34:39 | 42500 individuals reported at Kakuma in Kenya | 42500 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-08-29 10:03:29 | 42410 individuals reported at Kakuma in Kenya | 42410 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-08-21 12:06:10 | 42228 individuals reported at Kakuma in Kenya | 42228 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-08-15 12:48:45 | 41890 individuals reported at Kakuma in Kenya | 41890 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-08-04 09:38:52 | 42711 individuals reported at Kakuma in Kenya | 42711 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-07-29 11:07:41 | 42440 individuals reported at Kakuma in Kenya | 42440 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-07-21 11:18:30 | 42011 individuals reported at Kakuma in Kenya | 42011 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-07-14 09:47:39 | 41314 individuals reported at Kakuma in Kenya | 41314 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-07-07 16:07:22 | 41115 individuals reported at Kakuma in Kenya | 41115 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-06-27 09:06:15 | 39180 individuals reported at Kakuma in Kenya | 39180 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-06-22 09:11:48 | 40231 individuals reported at Kakuma in Kenya | 40231 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-06-20 14:49:11 | 38806 individuals reported at Kakuma in Kenya | 38806 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-06-12 14:01:42 | 38323 individuals reported at Kakuma in Kenya | 38323 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-06-05 15:22:03 | 37736 individuals reported at Kakuma in Kenya | 37736 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
2014-05-29 13:31:55 | 37320 individuals reported at Kakuma in Kenya | 37320 | Kenya | Rift Valley | 3.729882 | 34.843126 | Kakuma |
groupby_camps.get_group('Kakuma Refugee Camp')
groupby_camps.get_group('Ifo Refugee Camp')
groupby_camps.get_group('Ifo Refugee Camp')
df_2mo = df['2014-07-02':'2014-09-02']
len(df_3mo['latitude'].unique())
140
df_3mo.groupby(df_3mo['latitude']).totalAffectedPersons.plot(kind = 'line')
latitude -4.778995 Axes(0.125,0.2;0.775x0.7) -4.275202 Axes(0.125,0.2;0.775x0.7) -1.283300 Axes(0.125,0.2;0.775x0.7) -0.044804 Axes(0.125,0.2;0.775x0.7) 0.000000 Axes(0.125,0.2;0.775x0.7) 0.003347 Axes(0.125,0.2;0.775x0.7) 0.110722 Axes(0.125,0.2;0.775x0.7) 0.146820 Axes(0.125,0.2;0.775x0.7) 0.188956 Axes(0.125,0.2;0.775x0.7) 0.313109 Axes(0.125,0.2;0.775x0.7) 1.632622 Axes(0.125,0.2;0.775x0.7) 1.933227 Axes(0.125,0.2;0.775x0.7) 1.940342 Axes(0.125,0.2;0.775x0.7) 3.062182 Axes(0.125,0.2;0.775x0.7) 3.088360 Axes(0.125,0.2;0.775x0.7) ... 32.263911 Axes(0.125,0.2;0.775x0.7) 32.294597 Axes(0.125,0.2;0.775x0.7) 32.333559 Axes(0.125,0.2;0.775x0.7) 32.355652 Axes(0.125,0.2;0.775x0.7) 32.555560 Axes(0.125,0.2;0.775x0.7) 33.267398 Axes(0.125,0.2;0.775x0.7) 33.831051 Axes(0.125,0.2;0.775x0.7) 33.886944 Axes(0.125,0.2;0.775x0.7) 34.357235 Axes(0.125,0.2;0.775x0.7) 34.435797 Axes(0.125,0.2;0.775x0.7) 35.551354 Axes(0.125,0.2;0.775x0.7) 36.191110 Axes(0.125,0.2;0.775x0.7) 36.866667 Axes(0.125,0.2;0.775x0.7) 37.059561 Axes(0.125,0.2;0.775x0.7) 37.177826 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, Length: 140, dtype: object
df_3mo[df_3mo['adminArea1'] == 'Kenya'].groupby(df_3mo['latitude']).totalAffectedPersons.plot(kind = 'line')
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-153-45b43d0aebec> in <module>() ----> 1 df_3mo[df_3mo['adminArea1'] == 'Kenya'].groupby(df_3mo['latitude']).totalAffectedPersons.plot(kind = 'line') /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/generic.py in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze) 2771 axis = self._get_axis_number(axis) 2772 return groupby(self, by, axis=axis, level=level, as_index=as_index, -> 2773 sort=sort, group_keys=group_keys, squeeze=squeeze) 2774 2775 def asfreq(self, freq, method=None, how=None, normalize=False): /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/groupby.py in groupby(obj, by, **kwds) 1140 raise TypeError('invalid type: %s' % type(obj)) 1141 -> 1142 return klass(obj, by, **kwds) 1143 1144 /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/groupby.py in __init__(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze) 386 if grouper is None: 387 grouper, exclusions, obj = _get_grouper(obj, keys, axis=axis, --> 388 level=level, sort=sort) 389 390 self.obj = obj /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/groupby.py in _get_grouper(obj, key, axis, level, sort) 2045 raise AssertionError(errmsg) 2046 -> 2047 ping = Grouping(group_axis, gpr, obj=obj, name=name, level=level, sort=sort) 2048 groupings.append(ping) 2049 /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/groupby.py in __init__(self, index, grouper, obj, name, level, sort) 1796 self.name = name 1797 self.level = level -> 1798 self.grouper = _convert_grouper(index, grouper) 1799 self.index = index 1800 self.sort = sort /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/groupby.py in _convert_grouper(axis, grouper) 2068 return grouper.values 2069 else: -> 2070 return grouper.reindex(axis).values 2071 elif isinstance(grouper, (list, Series, np.ndarray)): 2072 if len(grouper) != len(axis): /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/series.py in reindex(self, index, **kwargs) 2031 @Appender(generic._shared_docs['reindex'] % _shared_doc_kwargs) 2032 def reindex(self, index=None, **kwargs): -> 2033 return super(Series, self).reindex(index=index, **kwargs) 2034 2035 def reindex_axis(self, labels, axis=0, **kwargs): /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/generic.py in reindex(self, *args, **kwargs) 1622 # perform the reindex on the axes 1623 return self._reindex_axes(axes, level, limit, -> 1624 method, fill_value, copy).__finalize__(self) 1625 1626 def _reindex_axes(self, axes, level, limit, method, fill_value, copy): /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/generic.py in _reindex_axes(self, axes, level, limit, method, fill_value, copy) 1644 {axis: [new_index, indexer]}, method=method, 1645 fill_value=fill_value, limit=limit, copy=copy, -> 1646 allow_dups=False) 1647 1648 return obj /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, method, fill_value, limit, copy, allow_dups) 1729 fill_value=fill_value, 1730 allow_dups=allow_dups, -> 1731 copy=copy) 1732 1733 if copy and new_data is self._data: /Users/chrisralbon/anaconda/envs/py3k/lib/python3.3/site-packages/pandas/core/internals.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy) 2854 if (not allow_dups and not self.axes[axis].is_unique 2855 and len(indexer)): -> 2856 raise ValueError("cannot reindex from a duplicate axis") 2857 2858 if axis >= self.ndim: ValueError: cannot reindex from a duplicate axis
df_2mo_lebanon = df_2mo[df_2mo['adminArea1'] == 'Lebanon']
df_2mo_lebanon.groupby(df_2mo_lebanon['latitude']).totalAffectedPersons.plot(kind = 'line', ylim=[0, 500000])
latitude 33.267398 Axes(0.125,0.2;0.775x0.7) 33.831051 Axes(0.125,0.2;0.775x0.7) 33.886944 Axes(0.125,0.2;0.775x0.7) 34.435797 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, dtype: object
df_2mo_jordan = df_2mo[df_2mo['adminArea1'] == 'Jordan']
df_2mo_jordan.groupby(df_2mo_jordan['latitude']).totalAffectedPersons.plot(kind = 'line', ylim=[0, 500000])
latitude 29.541005 Axes(0.125,0.2;0.775x0.7) 30.196240 Axes(0.125,0.2;0.775x0.7) 30.845058 Axes(0.125,0.2;0.775x0.7) 31.170510 Axes(0.125,0.2;0.775x0.7) 31.715482 Axes(0.125,0.2;0.775x0.7) 31.908000 Axes(0.125,0.2;0.775x0.7) 31.949381 Axes(0.125,0.2;0.775x0.7) 31.949722 Axes(0.125,0.2;0.775x0.7) 32.022675 Axes(0.125,0.2;0.775x0.7) 32.062792 Axes(0.125,0.2;0.775x0.7) 32.072750 Axes(0.125,0.2;0.775x0.7) 32.263911 Axes(0.125,0.2;0.775x0.7) 32.294597 Axes(0.125,0.2;0.775x0.7) 32.333559 Axes(0.125,0.2;0.775x0.7) 32.355652 Axes(0.125,0.2;0.775x0.7) 32.555560 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, dtype: object
df_2mo_turkey = df_2mo[df_2mo['adminArea1'] == 'Turkey']
df_2mo_turkey.groupby(df_2mo_turkey['latitude']).totalAffectedPersons.plot(kind = 'line', ylim=[0, 500000])
latitude 37.059561 Axes(0.125,0.2;0.775x0.7) 37.177826 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, dtype: object
df_2mo_iraq = df_2mo[df_2mo['adminArea1'] == 'Iraq']
df_2mo_iraq.groupby(df_2mo_iraq['latitude']).totalAffectedPersons.plot(kind = 'line', ylim=[0, 110000])
latitude 0.000000 Axes(0.125,0.2;0.775x0.7) 31.970804 Axes(0.125,0.2;0.775x0.7) 34.357235 Axes(0.125,0.2;0.775x0.7) 35.551354 Axes(0.125,0.2;0.775x0.7) 36.191110 Axes(0.125,0.2;0.775x0.7) 36.866667 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, dtype: object
<pandas.core.groupby.SeriesGroupBy object at 0x12a68e210>
df_2mo_iraq
content | totalAffectedPersons | adminArea1 | adminArea3 | latitude | longitude | |
---|---|---|---|---|---|---|
publishedAt | ||||||
2014-09-02 15:17:46 | 23855 individuals reported at Sulaymaniyah in... | 23855 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-09-02 14:59:30 | 1798 individuals reported at Refugees Disperse... | 1798 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-09-02 14:55:38 | 631 individuals reported at Kirkuk Non-Camp Re... | 631 | Iraq | Kirkuk | 0.000000 | 0.000000 |
2014-09-02 13:48:13 | 4529 individuals reported at Anbar in Iraq | 4529 | Iraq | Anbar | 34.357235 | 41.129200 |
2014-09-02 13:46:26 | 1344 individuals reported at Ninewa Non-Camp R... | 1344 | Iraq | Ninewa | 0.000000 | 0.000000 |
2014-09-02 13:10:41 | 88699 individuals reported at Erbil in Iraq | 88699 | Iraq | Erbil | 36.191110 | 44.009100 |
2014-09-02 13:06:05 | 94447 individuals reported at Duhok in Iraq | 94447 | Iraq | Duhok | 36.866667 | 43.000000 |
2014-08-26 14:10:28 | 23976 individuals reported at Sulaymaniyah in... | 23976 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-08-26 14:04:56 | 1799 individuals reported at Refugees Disperse... | 1799 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-08-26 14:03:28 | 1344 individuals reported at Ninewa Non-Camp R... | 1344 | Iraq | Ninewa | 0.000000 | 0.000000 |
2014-08-26 14:01:34 | 631 individuals reported at Kirkuk Non-Camp Re... | 631 | Iraq | Kirkuk | 0.000000 | 0.000000 |
2014-08-26 13:59:01 | 88375 individuals reported at Erbil in Iraq | 88375 | Iraq | Erbil | 36.191110 | 44.009100 |
2014-08-26 13:48:08 | 94715 individuals reported at Duhok in Iraq | 94715 | Iraq | Duhok | 36.866667 | 43.000000 |
2014-08-26 13:41:30 | 4529 individuals reported at Anbar in Iraq | 4529 | Iraq | Anbar | 34.357235 | 41.129200 |
2014-08-15 16:47:48 | 24250 individuals reported at Sulaymaniyah in... | 24250 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-08-15 16:45:16 | 1838 individuals reported at Refugees Disperse... | 1838 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-08-15 16:44:23 | 1348 individuals reported at Ninewa Non-Camp R... | 1348 | Iraq | Ninewa | 0.000000 | 0.000000 |
2014-08-15 16:42:26 | 667 individuals reported at Kirkuk Non-Camp Re... | 667 | Iraq | Kirkuk | 0.000000 | 0.000000 |
2014-08-15 16:40:28 | 89803 individuals reported at Erbil in Iraq | 89803 | Iraq | Erbil | 36.191110 | 44.009100 |
2014-08-15 16:38:28 | 95451 individuals reported at Duhok in Iraq | 95451 | Iraq | Duhok | 36.866667 | 43.000000 |
2014-08-15 16:34:58 | 4529 individuals reported at Anbar in Iraq | 4529 | Iraq | Anbar | 34.357235 | 41.129200 |
2014-07-31 14:33:54 | 24654 individuals reported at Sulaymaniyah in... | 24654 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-07-31 11:37:52 | 24654 individuals reported at Sulaymaniyah in... | 24654 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-07-31 11:34:32 | 1828 individuals reported at Refugees Disperse... | 1828 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-07-31 11:32:53 | 1344 individuals reported at Ninewa Non-Camp R... | 1344 | Iraq | Ninewa | 0.000000 | 0.000000 |
2014-07-31 11:31:25 | 692 individuals reported at Kirkuk Non-Camp Re... | 692 | Iraq | Kirkuk | 0.000000 | 0.000000 |
2014-07-31 11:29:47 | 88506 individuals reported at Erbil in Iraq | 88506 | Iraq | Erbil | 36.191110 | 44.009100 |
2014-07-31 11:28:08 | 96484 individuals reported at Duhok in Iraq | 96484 | Iraq | Duhok | 36.866667 | 43.000000 |
2014-07-31 11:26:46 | 4532 individuals reported at Anbar in Iraq | 4532 | Iraq | Anbar | 34.357235 | 41.129200 |
2014-07-15 14:09:55 | 24487 individuals reported at Sulaymaniyah in... | 24487 | Iraq | Sulaymaniyah | 35.551354 | 45.442406 |
2014-07-15 13:58:12 | 1824 individuals reported at Refugees Disperse... | 1824 | Iraq | Refugees Dispersed in Iraq | 31.970804 | 42.868652 |
2014-07-15 13:56:08 | 1358 individuals reported at Ninewa Non-Camp R... | 1358 | Iraq | Ninewa | 0.000000 | 0.000000 |
2014-07-15 13:55:15 | 691 individuals reported at Kirkuk Non-Camp Re... | 691 | Iraq | Kirkuk | 0.000000 | 0.000000 |
2014-07-15 13:53:34 | 86935 individuals reported at Erbil in Iraq | 86935 | Iraq | Erbil | 36.191110 | 44.009100 |
2014-07-15 13:31:36 | 97365 individuals reported at Duhok in Iraq | 97365 | Iraq | Duhok | 36.866667 | 43.000000 |
2014-07-15 13:28:54 | 4532 individuals reported at Anbar in Iraq | 4532 | Iraq | Anbar | 34.357235 | 41.129200 |
df_2mo_lebanon = df_2mo[df_2mo['adminArea1'] == 'Lebanon']
df_2mo_lebanon.groupby(df_2mo_lebanon['latitude']).totalAffectedPersons.plot(kind = 'line', ylim=[100000, 450000])
latitude 33.267398 Axes(0.125,0.2;0.775x0.7) 33.831051 Axes(0.125,0.2;0.775x0.7) 33.886944 Axes(0.125,0.2;0.775x0.7) 34.435797 Axes(0.125,0.2;0.775x0.7) Name: totalAffectedPersons, dtype: object