Skip to content

Instantly share code, notes, and snippets.

@omendezmorales
Last active June 27, 2020 14:37
Show Gist options
  • Save omendezmorales/8bc3e9fa99971217ec500221f5c80497 to your computer and use it in GitHub Desktop.
Save omendezmorales/8bc3e9fa99971217ec500221f5c80497 to your computer and use it in GitHub Desktop.
Notebook from participation on track J of https://covid19challenge.mit.edu/latam-vs-covid19/
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "P5mqqe9KVQna"
},
"source": [
" **Tracking financial resources in Mexico City .**\n",
"\n",
"---\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "wF2QLVT2cnAI"
},
"source": [
"![DF](https://images.app.goo.gl/S27uFskzKbJKAeA79)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "KlVwlqOcX9KK"
},
"source": [
"The SME sectors most hardly hit by the COVID-19 pandemic are:"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "1V6IKgTBStpw"
},
"source": [
"\n",
"\n",
"* Hotels\n",
"* REstaurants\n",
"* Shops\n",
"* Manufacturing\n",
"* etc\n",
"* List item\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "DhTpHNh5TC_u"
},
"source": [
"These sectors represent X% of the GDP in Mexico city"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "zgwbwsrJTlp5"
},
"source": [
"Lenders thus face the challenge of having to identify:\n",
"\n",
"\n",
"1. which of these sectors can be easier to track in their loans utilization?\n",
"2. which businesses are the least risky(propense to fraud, abuse, etc ) to lend to?\n",
"3. which business if financed first, can positively retrofit the economical ecosystem?\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "gqTVN4MKSJZ-"
},
"source": [
"# Approach"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "NinDkQIWXCkl"
},
"source": [
"To tackle this challenge, our proposal focuses on:\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "ngp055TeXOIQ"
},
"source": [
"\n",
"\n",
"* A _market place_ where loan applicants can offer their services/products to other applicants. This would facilitate the tracking of loans granted, and would positively retrofit the SME ecosystem\n",
"* Use the fiscal and tributary information to see which loan applicants are more trustworthy. This information would come from \n",
"[SAT](https://www.sat.gob.mx/home)\n",
"* Reports from social security data, as provided by employers to [IMSS](http://datos.imss.gob.mx/)\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "HaCiv3DSSMir"
},
"source": [
"# Results"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "13MkTQfPZkxO"
},
"source": [
"# References"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "lpcy0ZYLoZpP"
},
"source": []
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "24tBGHWIRs2V"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import io\n",
"import requests\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "2lgxh29Cniuw"
},
"outputs": [],
"source": [
"urls_asg2020 = [\n",
"\"http://datos.imss.gob.mx/sites/default/files/asg-2020-01-31.csv\",\n",
"\"http://datos.imss.gob.mx/sites/default/files/asg-2020-02-29.csv\",\n",
"\"http://datos.imss.gob.mx/sites/default/files/asg-2020-03-31_0.csv\",\n",
"\"http://datos.imss.gob.mx/sites/default/files/asg-2020-04-30.csv\",\n",
"\"http://datos.imss.gob.mx/sites/default/files/asg-2020-05-31.csv\"]\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 73
},
"colab_type": "code",
"id": "qqEF37K6n-FV",
"outputId": "f844743a-beef-42e8-8993-c22657e74ddf"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3062: DtypeWarning: Columns (3) have mixed types.Specify dtype option on import or set low_memory=False.\n",
" has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\n"
]
}
],
"source": [
"asg2020_1 = pd.read_csv(urls_asg2020[0], sep = '|' , encoding='latin-1')\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 161
},
"colab_type": "code",
"id": "-Qn9r20RJ8Ew",
"outputId": "52e13f67-5ae9-466d-9317-aeda0a8b9b73"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(4606114, 29)\n",
"(4613306, 29)\n",
"(4615370, 29)\n",
"(4557090, 29)\n",
"(4500303, 29)\n",
"(22892183, 29)\n"
]
}
],
"source": [
"li = []\n",
"\n",
"for url in urls_asg2020:\n",
" df = pd.read_csv(url, index_col=None, header=0, sep = '|' , encoding='latin-1')\n",
" print(df.shape)\n",
" li.append(df)\n",
"\n",
"asg2020 = pd.concat(li, axis=0, ignore_index=True)\n",
"print(asg2020.shape)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "8yNeZw_GMXtO"
},
"outputs": [],
"source": [
"print(df.shape)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "XIf7XVKst-Vx"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['cve_delegacion', 'cve_subdelegacion', 'cve_entidad', 'cve_municipio',\n",
" 'sector_economico_1', 'sector_economico_2', 'sector_economico_4',\n",
" 'tamaño_patron', 'sexo', 'rango_edad', 'rango_salarial', 'rango_uma',\n",
" 'asegurados', 'no_trabajadores', 'ta', 'teu', 'tec', 'tpu', 'tpc',\n",
" 'ta_sal', 'teu_sal', 'tec_sal', 'tpu_sal', 'tpc_sal', 'masa_sal_ta',\n",
" 'masa_sal_teu', 'masa_sal_tec', 'masa_sal_tpu', 'masa_sal_tpc'],\n",
" dtype='object')\n"
]
}
],
"source": [
"print(asg2020_1.columns )\n",
"#print( df_dic_s1.columns )\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "7g_ztwMNvUcx"
},
"outputs": [],
"source": [
"url_diccionario = 'http://datos.imss.gob.mx/sites/default/files/diccionario_de_datos_1_0.xlsx'\n",
"df_dic_del = pd.read_excel(url_diccionario,sheet_name='delegación-subdelegación',header=1) \n",
"df_dic_ent = pd.read_excel(url_diccionario,sheet_name='entidad-municipio',header=1) \n",
"df_dic_s1 = pd.read_excel(url_diccionario,sheet_name='sector 1',header=1) \n",
"df_dic_s2 = pd.read_excel(url_diccionario,sheet_name='sector 2',header=1) \n",
"df_dic_s4 = pd.read_excel(url_diccionario,sheet_name='sector 4',header=1) \n",
"df_dic_pat = pd.read_excel(url_diccionario,sheet_name='Tamaño de registro patronal',header=1) \n",
"df_dic_sex = pd.read_excel(url_diccionario,sheet_name='sexo',header=1) \n",
"df_dic_edad = pd.read_excel(url_diccionario,sheet_name='Rango edad',header=1) \n",
"df_dic_sal = pd.read_excel(url_diccionario,sheet_name='Rango salario',header=1) \n",
"df_dic_uma = pd.read_excel(url_diccionario,sheet_name='Rango UMA',header=1) "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "PdpwBJEMHrCC"
},
"outputs": [],
"source": [
"df_dic_s2['descripción sector_economico_2']"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "az-QvZB3VyP_"
},
"source": [
"The following is a plot showing the number of workers by economic sector in Mexico city and metropolitan area:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "LBurXf_3xhQl"
},
"outputs": [],
"source": [
"asg2020_1_9 = asg2020_1[asg2020_1['cve_entidad'].isin([9,15])]\n",
"\n",
"asg2020_1_9_s1 = asg2020_1_9.merge(df_dic_s1[['sector_economico_1','descripción sector_economico_1']],how='left').fillna(\"\")\n",
"asg2020_1_9_s1.columns \n",
"sectores_1 = asg2020_1_9_s1.groupby('descripción sector_economico_1').count()\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "7svHj_nWPaAh"
},
"outputs": [
{
"data": {
"text/plain": [
"<bound method NDFrame.keys of cve_delegacion \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" cve_subdelegacion \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" cve_entidad \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" cve_municipio \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" sector_economico_1 \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" sector_economico_2 \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" sector_economico_4 \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" tamaño_patron sexo \\\n",
"descripción sector_economico_1 \n",
" 1746 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 5033 \n",
"Comercio 291752 291752 \n",
"Industria de la construcción 59575 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 5126 \n",
"Industrias de transformación 258418 258418 \n",
"Industrias extractivas 2450 2450 \n",
"Servicios para empresas, personas y el hogar 196140 196140 \n",
"Servicios sociales y comunales 72586 72586 \n",
"Transportes y comunicaciones 65907 65907 \n",
"\n",
" rango_edad ... ta_sal \\\n",
"descripción sector_economico_1 ... \n",
" 1746 ... 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 ... 5033 \n",
"Comercio 291752 ... 291752 \n",
"Industria de la construcción 59575 ... 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 ... 5126 \n",
"Industrias de transformación 258418 ... 258418 \n",
"Industrias extractivas 2450 ... 2450 \n",
"Servicios para empresas, personas y el hogar 196140 ... 196140 \n",
"Servicios sociales y comunales 72586 ... 72586 \n",
"Transportes y comunicaciones 65907 ... 65907 \n",
"\n",
" teu_sal tec_sal tpu_sal \\\n",
"descripción sector_economico_1 \n",
" 1746 1746 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 5033 5033 \n",
"Comercio 291752 291752 291752 \n",
"Industria de la construcción 59575 59575 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 5126 5126 \n",
"Industrias de transformación 258418 258418 258418 \n",
"Industrias extractivas 2450 2450 2450 \n",
"Servicios para empresas, personas y el hogar 196140 196140 196140 \n",
"Servicios sociales y comunales 72586 72586 72586 \n",
"Transportes y comunicaciones 65907 65907 65907 \n",
"\n",
" tpc_sal masa_sal_ta \\\n",
"descripción sector_economico_1 \n",
" 1746 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 5033 \n",
"Comercio 291752 291752 \n",
"Industria de la construcción 59575 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 5126 \n",
"Industrias de transformación 258418 258418 \n",
"Industrias extractivas 2450 2450 \n",
"Servicios para empresas, personas y el hogar 196140 196140 \n",
"Servicios sociales y comunales 72586 72586 \n",
"Transportes y comunicaciones 65907 65907 \n",
"\n",
" masa_sal_teu \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" masa_sal_tec \\\n",
"descripción sector_economico_1 \n",
" 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 \n",
"Comercio 291752 \n",
"Industria de la construcción 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 \n",
"Industrias de transformación 258418 \n",
"Industrias extractivas 2450 \n",
"Servicios para empresas, personas y el hogar 196140 \n",
"Servicios sociales y comunales 72586 \n",
"Transportes y comunicaciones 65907 \n",
"\n",
" masa_sal_tpu masa_sal_tpc \n",
"descripción sector_economico_1 \n",
" 1746 1746 \n",
"Agricultura, ganadería, silvicultura, pesca y caza 5033 5033 \n",
"Comercio 291752 291752 \n",
"Industria de la construcción 59575 59575 \n",
"Industria eléctrica, y captación y suministro d... 5126 5126 \n",
"Industrias de transformación 258418 258418 \n",
"Industrias extractivas 2450 2450 \n",
"Servicios para empresas, personas y el hogar 196140 196140 \n",
"Servicios sociales y comunales 72586 72586 \n",
"Transportes y comunicaciones 65907 65907 \n",
"\n",
"[10 rows x 29 columns]>"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sectores_1.keys"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "nqYauXANK69A"
},
"outputs": [],
"source": [
"sectores_1.plot.bar( y='no_trabajadores', rot=75)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "mLeTWfGtNdvx"
},
"outputs": [],
"source": [
"\n",
"asg2020_1_9_s2 = asg2020_1_9.merge(df_dic_s2[['sector_economico_2','descripción sector_economico_2']],how='left').fillna(\"\")\n",
"asg2020_1_9_s2.columns \n",
"sectores_2 = asg2020_1_9_s2.groupby('descripción sector_economico_2').count()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "cVsxAFmkNTJ-"
},
"outputs": [],
"source": [
"type(sectores_2) \n",
"#sectores_2.plot.bar( y='no_trabajadores', rot=75)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "b9wu3P9mT4Sc"
},
"outputs": [
{
"data": {
"text/plain": [
"1628486 False\n",
"1628487 False\n",
"1628488 False\n",
"1628489 False\n",
"1628490 False\n",
" ... \n",
"4606109 True\n",
"4606110 True\n",
"4606111 True\n",
"4606112 True\n",
"4606113 True\n",
"Name: tamaño_patron, Length: 958733, dtype: bool"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" asg2020_1_9.tamaño_patron.isin([\"S1\",\"S2\",\"S3\",\"S4\"])\n",
" # asg2020_1_9['tamaño_patron']."
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "mBOPIPu1UNae"
},
"outputs": [],
"source": [
"asg2020_1_9_patronal = asg2020_1_9.merge(df_dic_pat[['tamaño_patron', 'descripción']],how='left').fillna(\"\")\n",
"#asg2020_1_9_patronal.columns\n",
"patrones = asg2020_1_9_patronal.groupby('tamaño_patron').count()"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "I4r8whn6g9Z0"
},
"source": [
"The next chart represents the number of workers per employer size, where SMEs are in bins S1 - S4 (1-250 employees per company; [Source: economia.gob.mx](`http://www.2006-2012.economia.gob.mx/mexico-emprende/empresas/pequena-empresa#:~:text=Las%20peque%C3%B1as%20empresas%20son%20aquellos,hasta%20100%20millones%20de%20pesos.`))"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "7MsmcnJ0erwm"
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f3121f33670>"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEMCAYAAAAxoErWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAdf0lEQVR4nO3de5QV5Z3u8e8DGHEMomKHAdE0GiTiDbFFjLmqQTTOoBGNHI+CGglHiDqZ5EhyPGO8ZKKZNZK4YsjSiIDjKBFj9KiJImhMTFAbgiBe0WAEiRIQvKJcfuePehs37X67G2h674bns9ZeXfutt6p+u5rup+utokoRgZmZWTkdKl2AmZlVL4eEmZllOSTMzCzLIWFmZlkOCTMzy3JImJlZVqdKF9Da9thjj6itra10GWZm7crs2bP/HhE1jdu3uZCora2lvr6+0mWYmbUrkl4u1+7hJjMzy3JImJlZlkPCzMyytrlzEmbWutasWcPixYtZvXp1pUuxVtC5c2d69erFDjvs0KL+Dgkza9LixYvp0qULtbW1SKp0ObYFIoLly5ezePFievfu3aJlPNxkZk1avXo13bp1c0BsAyTRrVu3TToqdEiYWbMcENuOTf1eOiTMzCzL5yRsu1I77t5WX+eiq77S6uusZq29D9tq/02aNInBgwfTs2fPTVpu5MiRnHjiiQwbNqxF/V999VUuuOACpk2bttW20ZZ8JGFm24VJkybx6quvlp23bt26VttOz549NykgNkdr1tsch4SZVb1Fixax//77c95553HAAQcwePBg3nvvPebOncugQYM4+OCDOfnkk3njjTfKLj9t2jTq6+s544wz6N+/P++99x61tbVcfPHFDBgwgNtvv50bbriBww8/nEMOOYRTTjmFd999d8PyDz74IHV1dey3337cc889G2r63Oc+x4ABAxgwYAB//OMfN7QfeOCBTfaJCMaOHUvfvn059thjef311zdsa8aMGRx66KEcdNBBnHPOObz//vsAH6n3gQce4Mgjj2TAgAGceuqpvP322wCMGzeOfv36cfDBB/Ptb397i/e9Q8LM2oUXXniBMWPGsGDBAnbddVfuuOMOzjrrLK6++mrmzZvHQQcdxGWXXVZ22WHDhlFXV8ctt9zC3Llz2WmnnQDo1q0bc+bM4fTTT+erX/0qTzzxBE8++ST7778/N95444blFy1axOOPP869997L6NGjWb16NZ/4xCeYPn06c+bMYerUqVxwwQUf2W6uz5133slzzz3H008/zZQpUzaEx+rVqxk5ciRTp05l/vz5rF27lgkTJmxYX0O9xx57LFdeeSUPPvggc+bMoa6ujmuuuYbly5dz5513smDBAubNm8cll1yyxfvd5yTMrF3o3bs3/fv3B+Cwww7jxRdfZOXKlXzhC18AYMSIEZx66qmbtM6vfe1rG6afeuopLrnkElauXMnbb7/Ncccdt2HeaaedRocOHejTpw/77LMPzz77LL1792bs2LHMnTuXjh078vzzz39k/WvWrCnb55FHHmH48OF07NiRnj17cvTRRwPw3HPP0bt3b/bbb78Nn+m6667joosu2qjeWbNm8fTTT3PUUUcB8MEHH3DkkUfStWtXOnfuzLnnnsuJJ57IiSeeuEn7oxyHhFkV8gn2j9pxxx03THfs2JGVK1du8Tp33nnnDdMjR47k17/+NYcccgiTJk3i4Ycf3jCv8WWjkhg/fjzdu3fnySefZP369XTu3Pkj629Jn82pNyL48pe/zK233vqRPo8//jgzZsxg2rRp/PSnP2XmzJlbtE0PN5lZu9S1a1d22203fv/73wNw8803bziqKKdLly689dZb2flvvfUWPXr0YM2aNdxyyy0bzbv99ttZv349L774Ii+99BJ9+/Zl1apV9OjRgw4dOnDzzTeXPZmc6/P5z3+eqVOnsm7dOpYuXcpDDz0EQN++fVm0aBELFy5s8jMNGjSIRx99dEO/d955h+eff563336bVatWccIJJzB+/HiefPLJpnZhi/hIwsw2STUdkUyePJnRo0fz7rvvss8++3DTTTdl+44cOZLRo0ez00478ac//ekj86+44gqOOOIIampqOOKIIzYKlL333puBAwfy5ptv8vOf/5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JxHsWDjvbkwzt9/iUi5kfxKMgFwIyICGA+RYhAEQK3S3oKGE/x+NAGMyJiVUSsprhNwieBw4GHI2JZFEM/twCfb6K+9RR3S4XiaYOfTdMHqnja4HyKZxwfUG7hpGH5vukzPZ/eT2607YaHUc0u+XxmWQ4J2x6cQfFX/WER0Z/iORGd07zSB7msL3m/ng+ft3IF8FAU5zf+qWTZxsuvo3We0dJwonASMDaKh/Rc1mi7jb3TwnU31Ntatdo2ziFh26q3SI9OpTgSeD0i1kj6EsVf+5uiK7AkTY9sQf/HgS9I2iPdQmE48Lsm+negeIAQwP8A/pCmuwBLVTxi9YyS/qWfrbHngFpJn0rvz2xm22ZNckjYNimKO2g+moaI+gN1adjmLODZTVzdj4AfSvozLfjrOyKWAuOAh4AngdkRcVcTi7wDDEy1Hk3xNDIonkD4GPBoo5pvA76TTk7v22jbq4GzKYbH5lMcEf28+Y9oVp4vgTWrMElvR8THK12HWTk+kjAzsyyfuDJrI5Ieo7jFc6kzfRRh1czDTWZmluXhJjMzy3JImJlZlkPCzMyyHBJmZpblkDAzs6z/D3KrKq+0/MTiAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"#type(patrones)\n",
"patrones.plot.bar( y='no_trabajadores', rot=75)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "skOxUaBcewy_",
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"<bound method NDFrame.keys of cve_delegacion cve_subdelegacion cve_entidad cve_municipio \\\n",
"tamaño_patron \n",
" 2059 2059 2059 2059 \n",
"S1 29845 29845 29845 29845 \n",
"S2 95667 95667 95667 95667 \n",
"S3 269303 269303 269303 269303 \n",
"S4 263147 263147 263147 263147 \n",
"S5 130184 130184 130184 130184 \n",
"S6 86186 86186 86186 86186 \n",
"S7 82342 82342 82342 82342 \n",
"\n",
" sector_economico_1 sector_economico_2 sector_economico_4 \\\n",
"tamaño_patron \n",
" 2059 2059 2059 \n",
"S1 29845 29845 29845 \n",
"S2 95667 95667 95667 \n",
"S3 269303 269303 269303 \n",
"S4 263147 263147 263147 \n",
"S5 130184 130184 130184 \n",
"S6 86186 86186 86186 \n",
"S7 82342 82342 82342 \n",
"\n",
" sexo rango_edad rango_salarial ... teu_sal tec_sal \\\n",
"tamaño_patron ... \n",
" 2059 2059 2059 ... 2059 2059 \n",
"S1 29845 29845 29845 ... 29845 29845 \n",
"S2 95667 95667 95667 ... 95667 95667 \n",
"S3 269303 269303 269303 ... 269303 269303 \n",
"S4 263147 263147 263147 ... 263147 263147 \n",
"S5 130184 130184 130184 ... 130184 130184 \n",
"S6 86186 86186 86186 ... 86186 86186 \n",
"S7 82342 82342 82342 ... 82342 82342 \n",
"\n",
" tpu_sal tpc_sal masa_sal_ta masa_sal_teu masa_sal_tec \\\n",
"tamaño_patron \n",
" 2059 2059 2059 2059 2059 \n",
"S1 29845 29845 29845 29845 29845 \n",
"S2 95667 95667 95667 95667 95667 \n",
"S3 269303 269303 269303 269303 269303 \n",
"S4 263147 263147 263147 263147 263147 \n",
"S5 130184 130184 130184 130184 130184 \n",
"S6 86186 86186 86186 86186 86186 \n",
"S7 82342 82342 82342 82342 82342 \n",
"\n",
" masa_sal_tpu masa_sal_tpc descripción \n",
"tamaño_patron \n",
" 2059 2059 2059 \n",
"S1 29845 29845 29845 \n",
"S2 95667 95667 95667 \n",
"S3 269303 269303 269303 \n",
"S4 263147 263147 263147 \n",
"S5 130184 130184 130184 \n",
"S6 86186 86186 86186 \n",
"S7 82342 82342 82342 \n",
"\n",
"[8 rows x 29 columns]>"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"patrones.keys"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>tamaño_patron</th>\n",
" <th>descripción</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>s1</td>\n",
" <td>1 asegurado</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>s2</td>\n",
" <td>entre 2 y 5 asegurado</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>s3</td>\n",
" <td>entre 6 y 50 asegurados</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>s4</td>\n",
" <td>entre 51 y 250</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>s5</td>\n",
" <td>entre 251 y 500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>s6</td>\n",
" <td>entre 501 y 1,000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>s7</td>\n",
" <td>más de 1,000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>NaN</td>\n",
" <td>No aplica</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" tamaño_patron descripción\n",
"0 s1 1 asegurado\n",
"1 s2 entre 2 y 5 asegurado\n",
"2 s3 entre 6 y 50 asegurados\n",
"3 s4 entre 51 y 250\n",
"4 s5 entre 251 y 500\n",
"5 s6 entre 501 y 1,000\n",
"6 s7 más de 1,000\n",
"7 NaN No aplica"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_dic_pat"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"name": "Covid_Challenge_Team_j031 .ipynb",
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment