In [1]:
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns;
from numpy import nan
from math import sqrt, sin, cos, atan2, log
plt.style.use('ggplot')
from IPython.core.display import HTML
css = open('style-table.css').read()+ open('style-notebook.css').read()
HTML('<style>{}</style>'.format(css))


Out[1]:

In [2]:
inner_data = pd.read_csv('inner_data.csv')


/Users/luis/anaconda/lib/python3.4/site-packages/IPython/core/interactiveshell.py:2902: DtypeWarning: Columns (18,19) have mixed types. Specify dtype option on import or set low_memory=False.
  interactivity=interactivity, compiler=compiler, result=result)

In [167]:
#full_data = full_data[full_data['ENT']!=0]

In [4]:
secciones = ['seccion_1', 'seccion_2', 'seccion_3', 'seccion_4', 'seccion_5', 'seccion_6', 'seccion_7', 'seccion_8', 'seccion_9']
resumen = ['ENT']
resumen.extend(secciones)
resumen.extend(['cal_final'])
indicadores = ['seccion_1', 'seccion_2', 'seccion_3', 'seccion_4', 'seccion_5', 'seccion_6', 'seccion_7', 'seccion_8', 'seccion_9', 'cal_final']
max_vals = np.array([11, 13, 13, 11, 14, 17, 2, 11, 8])

In [169]:
calificaciones = full_data[secciones].sum(axis=1)
full_data['cal_final'] = calificaciones


/Users/luis/anaconda/lib/python3.4/site-packages/ipykernel/__main__.py:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  from ipykernel import kernelapp as app

In [149]:
full_norm = full_data[resumen]

In [170]:
#full_norm[secciones] = full_norm[secciones]/max_vals
full_agg=full_data[resumen].groupby(['ENT']).agg('mean')
full_agg_median = full_data[resumen].groupby(['ENT']).agg('median')

In [171]:
#full_data = full_data[['ENT', 'MUN', 'LOC', 'AGEB', 'MZA', 'ID_INM', 'seccion_1', 'seccion_2', 'seccion_3', 'seccion_4', 'seccion_5', 'seccion_6', 'seccion_7', 'seccion_8', 'seccion_9', 'X', 'Y', 'cal_final']]
full_data[full_data['ENT']==1][indicadores].hist()


Out[171]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x12615a710>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x136ff0470>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12b631cc0>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x12fb74da0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x13e178e48>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x13d58e7f0>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x116ddfb38>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12c0201d0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x13395d390>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x12bdbebe0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12b9b86a0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11710cf98>]], dtype=object)

In [37]:
full_data.to_csv('full_data.csv')

In [5]:
sinaloa = inner_data[inner_data['ENT']==25]

In [159]:
full_data#int(sqrt(len(sinaloa['cal_final'])))


Out[159]:
ENT MUN LOC AGEB MZA ID_INM seccion_1 seccion_2 seccion_3 seccion_4 seccion_5 seccion_6 seccion_7 seccion_8 seccion_9 X Y cal_final
0 2 4 1 2876 23 1914 0.727273 0.615385 0.846154 1.0 0.839286 0.282353 0 0.800000 0.5 NaN NaN 0.6735
1 2 4 1 2880 103 1915 0.727273 0.653846 0.846154 0.5 0.821429 0.161765 0 0.436364 1.0 NaN NaN 0.6005
2 2 4 1 3677 5 1916 0.727273 0.692308 0.846154 0.5 0.839286 0.161765 0 0.436364 0.5 NaN NaN 0.5680
3 2 4 1 3677 9 1917 0.727273 0.615385 0.846154 1.0 0.839286 0.155882 0 0.909091 0.0 NaN NaN 0.6240
4 2 4 1 3677 23 1918 0.727273 0.615385 0.846154 0.5 0.764286 0.314706 0 0.763636 1.0 NaN NaN 0.6495
5 2 4 1 3681 17 1919 0.727273 0.884615 0.846154 0.0 0.817857 0.161765 0 0.545455 1.0 NaN NaN 0.5870
6 2 4 1 3681 25 1920 0.727273 0.923077 0.846154 0.0 0.571429 0.285294 0 0.745455 1.0 NaN NaN 0.6005
7 2 4 1 3817 9 1921 0.727273 0.461538 0.846154 0.0 0.839286 0.223529 0 0.654545 1.0 NaN NaN 0.5575
8 2 4 1 1191 39 1922 1.000000 0.884615 0.846154 1.0 0.821429 0.082353 0 0.109091 0.5 NaN NaN 0.6260
9 2 4 1 1191 39 1923 1.000000 0.884615 0.846154 0.5 0.750000 0.238235 0 0.545455 1.0 NaN NaN 0.6755
10 2 4 1 1191 39 1924 1.000000 0.923077 0.923077 0.0 0.910714 0.223529 0 0.436364 0.5 NaN NaN 0.6035
11 2 4 1 2467 18 1925 1.000000 0.923077 0.846154 0.0 0.817857 0.205882 0 0.763636 1.0 NaN NaN 0.6535
12 2 4 1 2467 18 2798 1.000000 0.923077 0.846154 0.5 0.660714 0.144118 0 0.654545 1.0 NaN NaN 0.6640
13 2 4 1 1806 57 1926 1.000000 0.692308 0.846154 1.0 0.678571 0.220588 1 0.763636 1.0 NaN NaN 0.7365
14 2 4 1 1806 57 1927 1.000000 0.923077 0.846154 1.0 0.657143 0.205882 0 0.327273 1.0 NaN NaN 0.6930
15 2 4 1 1806 50 1928 0.727273 0.923077 0.846154 0.0 0.839286 0.176471 0 0.872727 0.5 NaN NaN 0.5935
16 2 4 1 1806 65 1929 1.000000 0.846154 0.846154 0.5 0.639286 0.270588 0 0.436364 1.0 NaN NaN 0.6485
17 2 4 1 6525 19 1763 1.000000 0.923077 0.846154 1.0 0.839286 0.252941 0 0.872727 1.0 NaN NaN 0.7865
18 2 4 1 6525 19 2781 0.727273 0.961538 0.846154 0.5 0.839286 0.252941 0 0.872727 1.0 NaN NaN 0.7065
19 2 4 1 3821 59 1765 1.000000 0.769231 0.846154 0.5 0.839286 0.314706 0 0.872727 1.0 NaN NaN 0.7220
20 2 4 1 4266 1 1766 1.000000 0.692308 0.923077 0.0 0.817857 0.314706 0 0.872727 1.0 NaN NaN 0.6640
21 2 4 1 4266 1 2340 0.727273 0.769231 0.846154 0.0 0.892857 0.267647 0 0.909091 1.0 NaN NaN 0.6405
22 2 4 1 4463 15 1767 1.000000 0.923077 0.846154 0.5 0.839286 0.300000 0 0.763636 0.5 NaN NaN 0.6875
23 2 4 1 4463 15 2554 1.000000 0.923077 0.846154 0.5 0.839286 0.267647 0 0.763636 0.5 NaN NaN 0.6820
24 2 4 1 2927 29 1768 1.000000 0.923077 0.923077 0.5 0.839286 0.282353 0 0.036364 0.5 NaN NaN 0.6145
25 2 4 1 2927 29 1754 0.727273 1.000000 0.846154 0.5 0.728571 0.285294 0 0.800000 0.5 NaN NaN 0.6535
26 2 4 1 5601 9 1769 0.727273 0.923077 0.846154 0.0 0.839286 0.238235 0 0.872727 0.5 NaN NaN 0.6040
27 2 4 1 0210 25 1770 1.000000 1.000000 0.846154 0.0 0.678571 0.173529 0 0.872727 0.0 NaN NaN 0.5705
28 2 4 1 0475 52 1771 1.000000 0.923077 0.923077 0.5 0.839286 0.220588 0 0.654545 0.0 NaN NaN 0.6320
29 2 4 1 3412 2 1772 1.000000 0.923077 0.846154 0.5 0.839286 0.252941 0 0.654545 0.5 1084889.4391 2344929.5143 0.6675
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
232206 15 75 1 0154 3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.83036e+06 859408 0.0000
232207 15 33 1 0686 60 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80954e+06 840703 0.0000
232208 15 33 1 014A 34 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80875e+06 847403 0.0000
232209 15 81 25 0240 46 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.81646e+06 857950 0.0000
232210 15 65 1 0035 6 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.83881e+06 859376 0.0000
232211 15 65 1 0035 27 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.83917e+06 859412 0.0000
232212 15 65 1 0105 27 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.83951e+06 859569 0.0000
232213 15 16 1 0223 2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.83889e+06 861829 0.0000
232214 15 92 1 0206 6 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.82772e+06 858362 0.0000
232215 15 33 1 2517 16 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.81184e+06 848304 0.0000
232216 15 109 69 1345 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.79809e+06 848078 0.0000
232217 15 20 1 0029 11 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80528e+06 852794 0.0000
232218 15 2 1 0228 13 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.82295e+06 852294 0.0000
232219 15 81 1 0467 3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.81567e+06 859903 0.0000
232220 15 33 1 2004 24 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.81121e+06 844897 0.0000
232221 15 13 1 0202 25 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.7881e+06 842372 0.0000
232222 15 13 1 0202 25 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.78809e+06 842396 0.0000
232223 15 104 1 1955 29 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.79557e+06 838837 0.0000
232224 15 81 19 1126 17 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80971e+06 850233 0.0000
232225 15 109 25 0898 27 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80499e+06 856601 0.0000
232226 15 104 1 0020 2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.7927e+06 845336 0.0000
232227 15 104 1 0478 6 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.7894e+06 840192 0.0000
232228 15 104 1 0478 34 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.78974e+06 840064 0.0000
232229 15 13 1 0255 17 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.78905e+06 840160 0.0000
232230 15 104 1 0497 19 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.79043e+06 839753 0.0000
232231 15 104 1 0548 5 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.79009e+06 839812 0.0000
232232 15 104 1 0618 7 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.79014e+06 839608 0.0000
232233 15 33 1 4087 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80824e+06 847290 0.0000
232234 15 81 19 0132 15 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.81009e+06 855815 0.0000
232235 15 20 1 025A 29 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.80461e+06 849729 0.0000

232236 rows × 18 columns


In [153]:
#sinaloa[secciones].boxplot(figsize=(40,100))#hist(bins=int(sqrt(len(sinaloa['cal_final']))))
sinaloa[indicadores].hist(figsize=(20,15))
sinaloa.hist()


Out[153]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x12bda77f0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11267a2e8>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x134745ef0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11dcc7ba8>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x12f308d68>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x131269048>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12c5df2b0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12bd75198>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x12b92c7b8>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x116816eb8>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x130943f98>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11e780198>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x116db9dd8>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x1168ed518>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x116902080>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x12f8e1780>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x11de3e198>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11de2fa90>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x11339c1d0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x116e6b198>]], dtype=object)

In [173]:
#full_data[full_data['ENT']==25][indicadores].plot(kind='box', figsize=(20,10), ylim=(0,1.01), showmeans=True, bootstrap=1000)
for i in range(1,33):
    ax = full_data[full_data['ENT']==i][indicadores].plot(kind='box', figsize=(20,10), ylim=(0,1.01), showmeans=True, bootstrap=1000)
    fig = ax.get_figure()
    fig.savefig('estado_'+str(i)+'.png', bbox_inches='tight')


/Users/luis/anaconda/lib/python3.4/site-packages/matplotlib/pyplot.py:424: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
  max_open_warning, RuntimeWarning)

In [163]:
coef = 1000
estados = ['Aguascalientes', 'Baja California', 'Baja California Sur']
#COLORS
colors = ['peru', 'hotpink', 'crimson', 'darkslategray', 'lightsalmon', 'gray', 'firebrick', 'lightgreen', 'olive', 'y']
#colors = [[color[0]]*9, [color[1]]*9, [color[2]]*9 ]
#for i in range(3):
#    colors[i].extend('y')
#GRID
fig = plt.figure(figsize=(10,30))
ax = fig.add_subplot(1,1,1)
ax.set_axis_bgcolor('white')

major_yticks = np.arange(0, 33, 5)
ax.set_yticks(major_yticks)                                           
major_xticks = np.arange(0, 11, 5)
ax.set_xticks(major_xticks)


minor_yticks = np.arange(0, 33, 1)
ax.set_yticks(minor_yticks, minor=True)                                           
minor_xticks = np.arange(0, 11, 1)
ax.set_xticks(minor_xticks, minor=True)


#ax.grid(which='major', c = 'white', linestyle='-')
ax.grid(which='minor', c = 'green', linestyle=':')


for i in full_agg.index.values:
    plt.scatter(range(1,11),[i]*10, s=coef, c = colors, alpha=0.1, edgecolor='k', lw=1)
    plt.scatter(range(1,11), [i]*10, s=full_agg.ix[i].map(lambda x: coef*x), c = colors)
plt.savefig('bubble_plot.png', bbox_inches='tight')
plt.show()


/Users/luis/anaconda/lib/python3.4/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):

In [164]:
full_agg.plot(figsize=(20,8), kind='bar', stacked=True)


Out[164]:
<matplotlib.axes._subplots.AxesSubplot at 0x12dfc2d30>

In [147]:
inner_normalized[secciones].corr


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-147-faab6d460a14> in <module>()
----> 1 inner_normalized[secciones].corr

NameError: name 'inner_normalized' is not defined

In [ ]:
scatter_matrix(df, alpha=0.2, figsize=(6, 6), diagonal='kde')

In [148]:
infr = pd.read_csv('infra_corregido.csv')

In [109]:
infr[infr['ENT']==1]


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-109-b340e9f30929> in <module>()
----> 1 infr[infr['ENT']==1]

NameError: name 'infr' is not defined

In [38]:
full_data = pd.read_csv('full_data.csv', index_col=0)


/Users/luis/anaconda/lib/python3.4/site-packages/IPython/core/interactiveshell.py:2902: DtypeWarning: Columns (16,17) have mixed types. Specify dtype option on import or set low_memory=False.
  interactivity=interactivity, compiler=compiler, result=result)

In [25]:
full_data2=full_data[secciones]*max_vals

In [29]:
full_data['cal_final']=full_data2.sum(axis=1).apply(lambda x:x/100)

In [36]:
full_data = full_data[['ENT', 'MUN', 'LOC', 'AGEB', 'MZA', 'ID_INM', 'seccion_1', 'seccion_2', 'seccion_3', 'seccion_4', 'seccion_5', 'seccion_6', 'seccion_7', 'seccion_8', 'seccion_9', 'X', 'Y', 'cal_final']]

In [40]:
#full_norm[secciones] = full_norm[secciones]/max_vals
full_agg=full_data[resumen].groupby(['ENT']).agg('mean')
full_agg_median = full_data[resumen].groupby(['ENT']).agg('median')

In [42]:
full_agg.to_csv('full_agg.csv')
full_agg_median.to_csv('full_agg_median.csv')

In [51]:
#estados = dict(zip([1,25],['Aguascalientes', 'Sinaloa']))
#full_agg.index

In [66]:
entidades = pd.read_csv('entidades.csv', encoding='latin-1')

In [71]:
estados_map = dict(entidades[['CVE_ENT', 'NOM_ENT']].values)

In [73]:
full_agg2 = full_agg

In [77]:
full_agg2['estados'] = full_agg2.index

In [79]:
full_agg2.replace(estados_map, inplace=True)

In [82]:
full_agg2


Out[82]:
seccion_1 seccion_2 seccion_3 seccion_4 seccion_5 seccion_6 seccion_7 seccion_8 seccion_9 cal_final estados nombres
ENT
1 0.958630 0.895047 0.908301 0.372218 0.755571 0.183403 0.163232 0.383894 0.622836 0.613107 Aguascalientes Aguascalientes
2 0.906429 0.797273 0.802436 0.375686 0.751170 0.199447 0.183954 0.620531 0.773490 0.613275 Baja California Baja California
3 0.912250 0.878156 0.830710 0.453668 0.718995 0.160757 0.289575 0.425939 0.612934 0.519788 Baja California Sur Baja California Sur
4 0.931064 0.933108 0.762053 0.263069 0.590920 0.121438 0.118044 0.392299 0.489320 0.463879 Campeche Campeche
5 0.919864 0.927531 0.836389 0.360061 0.724072 0.157771 0.341323 0.383598 0.624747 0.596891 Coahuila de Zaragoza Coahuila de Zaragoza
6 0.943711 0.935458 0.887144 0.401370 0.754721 0.161958 0.187671 0.539826 0.545890 0.621491 Colima Colima
7 0.843061 0.622541 0.578611 0.072391 0.407732 0.111580 0.031444 0.286089 0.286109 0.269714 Chiapas Chiapas
8 0.890500 0.782209 0.737449 0.251926 0.662220 0.152674 0.107143 0.290892 0.598770 0.485377 Chihuahua Chihuahua
9 0.903780 0.954153 0.903672 0.290823 0.789570 0.239824 0.184403 0.796426 0.484288 0.646174 Distrito Federal Distrito Federal
10 0.913081 0.826225 0.762307 0.250560 0.638895 0.117016 0.112405 0.181627 0.583296 0.444208 Durango Durango
11 0.928628 0.889449 0.806318 0.208813 0.668330 0.114755 0.066398 0.262148 0.627384 0.521614 Guanajuato Guanajuato
12 0.896340 0.767370 0.678467 0.066512 0.488717 0.113414 0.050407 0.386673 0.437161 0.426358 Guerrero Guerrero
13 0.946806 0.863461 0.800461 0.125901 0.612521 0.136538 0.029765 0.314318 0.577279 0.460440 Hidalgo Hidalgo
14 0.900845 0.854932 0.849981 0.195620 0.682901 0.145576 0.058051 0.528740 0.545093 0.550321 Jalisco Jalisco
15 0.917871 0.911045 0.848813 0.231279 0.706529 0.178452 0.077535 0.638535 0.686008 0.592475 México México
16 0.893349 0.879180 0.824221 0.135977 0.638456 0.147131 0.052141 0.351070 0.580681 0.340704 Michoacán de Ocampo Michoacán de Ocampo
17 0.912649 0.904204 0.861207 0.181996 0.717906 0.176917 0.090998 0.666910 0.588796 0.602781 Morelos Morelos
18 0.947085 0.889937 0.779250 0.133588 0.598799 0.119678 0.093511 0.256315 0.518845 0.511618 Nayarit Nayarit
19 0.909197 0.900079 0.804495 0.385391 0.749605 0.182368 0.245142 0.466274 0.641271 0.585377 Nuevo León Nuevo León
20 0.905499 0.741729 0.666342 0.036080 0.492065 0.098764 0.018278 0.099359 0.301057 0.237254 Oaxaca Oaxaca
21 0.910320 0.872995 0.796173 0.149448 0.627717 0.130909 0.068774 0.630778 0.617426 0.522435 Puebla Puebla
22 0.939191 0.890699 0.826425 0.226318 0.730201 0.155388 0.054960 0.405260 0.576408 0.571867 Querétaro Querétaro
23 0.919490 0.929528 0.790283 0.370175 0.674138 0.142303 0.093333 0.390903 0.403860 0.538873 Quintana Roo Quintana Roo
24 0.913098 0.869700 0.740995 0.125945 0.580348 0.113192 0.045569 0.244170 0.578887 0.433703 San Luis Potosí San Luis Potosí
25 0.917216 0.883553 0.777566 0.153712 0.648066 0.128725 0.144141 0.253224 0.613765 0.445582 Sinaloa Sinaloa
26 0.929886 0.797429 0.817362 0.288593 0.723329 0.160189 0.248597 0.461150 0.586808 0.527604 Sonora Sonora
27 0.912960 0.872185 0.736701 0.166855 0.581276 0.107745 0.156660 0.330177 0.531397 0.481539 Tabasco Tabasco
28 0.930024 0.914452 0.791512 0.224756 0.669905 0.158863 0.128539 0.442778 0.640316 0.572096 Tamaulipas Tamaulipas
29 0.951737 0.940545 0.900883 0.282077 0.715791 0.174546 0.185336 0.554212 0.633062 0.619883 Tlaxcala Tlaxcala
30 0.924246 0.830593 0.723748 0.078457 0.552547 0.107314 0.041590 0.419595 0.553529 0.486301 Veracruz de Ignacio de la Llave Veracruz de Ignacio de la Llave
31 0.919519 0.948770 0.806081 0.349465 0.686585 0.150235 0.133776 0.364025 0.388327 0.490590 Yucatán Yucatán
32 0.937658 0.831858 0.802589 0.166098 0.628136 0.106751 0.084934 0.160962 0.568325 0.460751 Zacatecas Zacatecas

In [ ]: