{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import geopandas as gpd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "peru = gpd.read_file('data/peru_distrital_simple.geojson')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "ica = peru[peru['NOMBDEP'] == 'ICA']" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/varaya/Projects/GeoTimePropagation/4_data_exploration/geoPropDataExploration/lib/python3.6/site-packages/pandas/core/indexing.py:362: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n", " self.obj[key] = _infer_fill_value(value)\n", "/home/varaya/Projects/GeoTimePropagation/4_data_exploration/geoPropDataExploration/lib/python3.6/site-packages/pandas/core/indexing.py:543: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n", " self.obj[item] = s\n" ] } ], "source": [ "ica.loc[:, 'centroid'] = ica.loc[:, 'geometry'].centroid" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "def assign_x(centroid):\n", " return float(centroid.x)\n", "\n", "def assign_y(centroid):\n", " return float(centroid.y)\n", "ica.loc[:, 'centroid_x'] = ica['centroid'].apply(assign_x)\n", "ica.loc[:, 'centroid_y'] = ica['centroid'].apply(assign_y)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/varaya/Projects/GeoTimePropagation/4_data_exploration/geoPropDataExploration/lib/python3.6/site-packages/pandas/core/frame.py:3940: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n", " errors=errors)\n" ] } ], "source": [ "ica.drop('centroid', axis=1, inplace=True)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
OBJECTIDIDDISTIDDPTOIDPROVNOMBDISTNOMBPROVNOMBDEPDCTOLEYFECHANOM_CAPSHAPE_LENGSHAPE_AREASHAPE_LE_1SHAPE_AR_1AREA_MINAMgeometrycentroid_xcentroid_y
219220110304111103MARCONANAZCAICALEY1231410/05/1955SAN JUAN2.4226420.1634572.4176190.163590194391.99POLYGON ((-74.66569373406274 -14.9979023576000...-75.070765-15.141502
238239110305111103VISTA ALEGRENAZCAICALEY2392720/09/1984VISTA ALEGRE1.0966350.0448461.1168300.04490253410.00POLYGON ((-74.67394548407042 -14.8786949824890...-74.830509-14.928842
253254110301111103NAZCANAZCAICA--EPOCA INDEP.NAZCA2.0164140.0960712.0237870.096094114339.06POLYGON ((-74.73221285912469 -14.8423652324552...-75.038063-14.856949
265266110302111103CHANGUILLONAZCAICALEY1016512/01/1945CHANGUILLO1.6483920.0804351.6527910.08021395471.78POLYGON ((-75.24890423460587 -14.5880624822184...-75.333179-14.801620
270271110303111103EL INGENIONAZCAICALEY254819/11/1917EL INGENIO1.4536990.0513221.4608360.05133761132.33POLYGON ((-74.88424873426627 -14.5454809821787...-75.003831-14.676963
\n", "
" ], "text/plain": [ " OBJECTID IDDIST IDDPTO IDPROV NOMBDIST NOMBPROV NOMBDEP DCTO \\\n", "219 220 110304 11 1103 MARCONA NAZCA ICA LEY \n", "238 239 110305 11 1103 VISTA ALEGRE NAZCA ICA LEY \n", "253 254 110301 11 1103 NAZCA NAZCA ICA - \n", "265 266 110302 11 1103 CHANGUILLO NAZCA ICA LEY \n", "270 271 110303 11 1103 EL INGENIO NAZCA ICA LEY \n", "\n", " LEY FECHA NOM_CAP SHAPE_LENG SHAPE_AREA SHAPE_LE_1 \\\n", "219 12314 10/05/1955 SAN JUAN 2.422642 0.163457 2.417619 \n", "238 23927 20/09/1984 VISTA ALEGRE 1.096635 0.044846 1.116830 \n", "253 - EPOCA INDEP. NAZCA 2.016414 0.096071 2.023787 \n", "265 10165 12/01/1945 CHANGUILLO 1.648392 0.080435 1.652791 \n", "270 2548 19/11/1917 EL INGENIO 1.453699 0.051322 1.460836 \n", "\n", " SHAPE_AR_1 AREA_MINAM \\\n", "219 0.163590 194391.99 \n", "238 0.044902 53410.00 \n", "253 0.096094 114339.06 \n", "265 0.080213 95471.78 \n", "270 0.051337 61132.33 \n", "\n", " geometry centroid_x centroid_y \n", "219 POLYGON ((-74.66569373406274 -14.9979023576000... -75.070765 -15.141502 \n", "238 POLYGON ((-74.67394548407042 -14.8786949824890... -74.830509 -14.928842 \n", "253 POLYGON ((-74.73221285912469 -14.8423652324552... -75.038063 -14.856949 \n", "265 POLYGON ((-75.24890423460587 -14.5880624822184... -75.333179 -14.801620 \n", "270 POLYGON ((-74.88424873426627 -14.5454809821787... -75.003831 -14.676963 " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ica.head()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
OBJECTIDIDDISTIDDPTOIDPROVNOMBDISTNOMBPROVNOMBDEPDCTOLEYFECHANOM_CAPSHAPE_LENGSHAPE_AREASHAPE_LE_1SHAPE_AR_1AREA_MINAMgeometrycentroid_xcentroid_yid
0220110304111103MARCONANAZCAICALEY1231410/05/1955SAN JUAN2.4226420.1634572.4176190.163590194391.99POLYGON ((-74.66569373406274 -14.9979023576000...-75.070765-15.1415020
1239110305111103VISTA ALEGRENAZCAICALEY2392720/09/1984VISTA ALEGRE1.0966350.0448461.1168300.04490253410.00POLYGON ((-74.67394548407042 -14.8786949824890...-74.830509-14.9288421
2254110301111103NAZCANAZCAICA--EPOCA INDEP.NAZCA2.0164140.0960712.0237870.096094114339.06POLYGON ((-74.73221285912469 -14.8423652324552...-75.038063-14.8569492
3266110302111103CHANGUILLONAZCAICALEY1016512/01/1945CHANGUILLO1.6483920.0804351.6527910.08021395471.78POLYGON ((-75.24890423460587 -14.5880624822184...-75.333179-14.8016203
4271110303111103EL INGENIONAZCAICALEY254819/11/1917EL INGENIO1.4536990.0513221.4608360.05133761132.33POLYGON ((-74.88424873426627 -14.5454809821787...-75.003831-14.6769634
\n", "
" ], "text/plain": [ " OBJECTID IDDIST IDDPTO IDPROV NOMBDIST NOMBPROV NOMBDEP DCTO LEY \\\n", "0 220 110304 11 1103 MARCONA NAZCA ICA LEY 12314 \n", "1 239 110305 11 1103 VISTA ALEGRE NAZCA ICA LEY 23927 \n", "2 254 110301 11 1103 NAZCA NAZCA ICA - - \n", "3 266 110302 11 1103 CHANGUILLO NAZCA ICA LEY 10165 \n", "4 271 110303 11 1103 EL INGENIO NAZCA ICA LEY 2548 \n", "\n", " FECHA NOM_CAP SHAPE_LENG SHAPE_AREA SHAPE_LE_1 SHAPE_AR_1 \\\n", "0 10/05/1955 SAN JUAN 2.422642 0.163457 2.417619 0.163590 \n", "1 20/09/1984 VISTA ALEGRE 1.096635 0.044846 1.116830 0.044902 \n", "2 EPOCA INDEP. NAZCA 2.016414 0.096071 2.023787 0.096094 \n", "3 12/01/1945 CHANGUILLO 1.648392 0.080435 1.652791 0.080213 \n", "4 19/11/1917 EL INGENIO 1.453699 0.051322 1.460836 0.051337 \n", "\n", " AREA_MINAM geometry centroid_x \\\n", "0 194391.99 POLYGON ((-74.66569373406274 -14.9979023576000... -75.070765 \n", "1 53410.00 POLYGON ((-74.67394548407042 -14.8786949824890... -74.830509 \n", "2 114339.06 POLYGON ((-74.73221285912469 -14.8423652324552... -75.038063 \n", "3 95471.78 POLYGON ((-75.24890423460587 -14.5880624822184... -75.333179 \n", "4 61132.33 POLYGON ((-74.88424873426627 -14.5454809821787... -75.003831 \n", "\n", " centroid_y id \n", "0 -15.141502 0 \n", "1 -14.928842 1 \n", "2 -14.856949 2 \n", "3 -14.801620 3 \n", "4 -14.676963 4 " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ica.reset_index(drop=True, inplace = True)\n", "ica.loc[:, 'id'] = ica.index.values\n", "ica.head()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
OBJECTIDIDDISTIDDPTOIDPROVNOMBDISTNOMBPROVNOMBDEPDCTOLEYFECHA...SHAPE_AR_1AREA_MINAMgeometrycentroid_xcentroid_yidcentroid_manual_xcentroid_manual_yadd_lineline_loc
0220110304111103MARCONANAZCAICALEY1231410/05/1955...0.163590194391.99POLYGON ((-74.66569373406274 -14.9979023576000...-75.070765-15.1415020-75.070765-15.141502Falseright
1239110305111103VISTA ALEGRENAZCAICALEY2392720/09/1984...0.04490253410.00POLYGON ((-74.67394548407042 -14.8786949824890...-74.830509-14.9288421-74.830509-14.928842Falseright
2254110301111103NAZCANAZCAICA--EPOCA INDEP....0.096094114339.06POLYGON ((-74.73221285912469 -14.8423652324552...-75.038063-14.8569492-75.038063-14.856949Falseright
3266110302111103CHANGUILLONAZCAICALEY1016512/01/1945...0.08021395471.78POLYGON ((-75.24890423460587 -14.5880624822184...-75.333179-14.8016203-75.333179-14.801620Falseright
4271110303111103EL INGENIONAZCAICALEY254819/11/1917...0.05133761132.33POLYGON ((-74.88424873426627 -14.5454809821787...-75.003831-14.6769634-75.003831-14.676963Falseright
\n", "

5 rows × 24 columns

\n", "
" ], "text/plain": [ " OBJECTID IDDIST IDDPTO IDPROV NOMBDIST NOMBPROV NOMBDEP DCTO LEY \\\n", "0 220 110304 11 1103 MARCONA NAZCA ICA LEY 12314 \n", "1 239 110305 11 1103 VISTA ALEGRE NAZCA ICA LEY 23927 \n", "2 254 110301 11 1103 NAZCA NAZCA ICA - - \n", "3 266 110302 11 1103 CHANGUILLO NAZCA ICA LEY 10165 \n", "4 271 110303 11 1103 EL INGENIO NAZCA ICA LEY 2548 \n", "\n", " FECHA ... SHAPE_AR_1 AREA_MINAM \\\n", "0 10/05/1955 ... 0.163590 194391.99 \n", "1 20/09/1984 ... 0.044902 53410.00 \n", "2 EPOCA INDEP. ... 0.096094 114339.06 \n", "3 12/01/1945 ... 0.080213 95471.78 \n", "4 19/11/1917 ... 0.051337 61132.33 \n", "\n", " geometry centroid_x centroid_y \\\n", "0 POLYGON ((-74.66569373406274 -14.9979023576000... -75.070765 -15.141502 \n", "1 POLYGON ((-74.67394548407042 -14.8786949824890... -74.830509 -14.928842 \n", "2 POLYGON ((-74.73221285912469 -14.8423652324552... -75.038063 -14.856949 \n", "3 POLYGON ((-75.24890423460587 -14.5880624822184... -75.333179 -14.801620 \n", "4 POLYGON ((-74.88424873426627 -14.5454809821787... -75.003831 -14.676963 \n", "\n", " id centroid_manual_x centroid_manual_y add_line line_loc \n", "0 0 -75.070765 -15.141502 False right \n", "1 1 -74.830509 -14.928842 False right \n", "2 2 -75.038063 -14.856949 False right \n", "3 3 -75.333179 -14.801620 False right \n", "4 4 -75.003831 -14.676963 False right \n", "\n", "[5 rows x 24 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ica.loc[:, 'centroid_manual_x'] = ica.loc[:, 'centroid_x']\n", "ica.loc[:, 'centroid_manual_y'] = ica.loc[:, 'centroid_y']\n", "ica.loc[:, 'add_line'] = False\n", "ica.loc[:, 'line_loc'] = 'right'\n", "ica.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# MANUAL CENTROIDS" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "ica.loc[41, 'centroid_manual_x'] = -75.92059947294666\n", "ica.loc[41, 'centroid_manual_y'] = -13.08371646743167" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "ica.loc[15, 'centroid_manual_x'] = -75.97303800654214\n", "ica.loc[15, 'centroid_manual_y'] = -14.366766342940721" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [], "source": [ "ica.loc[39, 'centroid_manual_x'] = -76.1074117488806\n", "ica.loc[39, 'centroid_manual_y'] = -13.134464760304068" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "ica.loc[38, 'centroid_manual_x'] = -76.24506289956877\n", "ica.loc[38, 'centroid_manual_y'] = -13.268801654598654" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "ica.loc[33, 'centroid_manual_x'] = -76.34993996675975\n", "ica.loc[33, 'centroid_manual_y'] = -13.381220106757693\n", "ica.loc[33, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "ica.loc[32, 'centroid_manual_x'] = -76.34993996675975\n", "ica.loc[32, 'centroid_manual_y'] = -13.49517947876818\n", "ica.loc[32, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "ica.loc[31, 'centroid_manual_x'] = -76.34993996675975\n", "ica.loc[31, 'centroid_manual_y'] = -13.600324541981164\n", "ica.loc[31, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "ica.loc[36, 'centroid_manual_x'] = -75.88127057275004\n", "ica.loc[36, 'centroid_manual_y'] = -13.383611370659995" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "ica.loc[34, 'centroid_manual_x'] = -75.83210944750427\n", "ica.loc[34, 'centroid_manual_y'] = -13.530232997161816" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "ica.loc[23, 'centroid_manual_x'] = -76.13035360732863\n", "ica.loc[23, 'centroid_manual_y'] = -14.173013048116704" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "ica.loc[25, 'centroid_manual_x'] = -76.11724397392975\n", "ica.loc[25, 'centroid_manual_y'] = -13.94241128191512\n", "ica.loc[25, 'add_line'] = True\n", "ica.loc[25, 'line_loc'] = 'up'" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "ica.loc[26, 'centroid_manual_x'] = -76.02219913178791\n", "ica.loc[26, 'centroid_manual_y'] = -13.772279298618983 \n", "ica.loc[26, 'add_line'] = True\n", "ica.loc[26, 'line_loc'] = 'left'" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "ica.loc[30, 'centroid_manual_x'] = -76.00908949838906\n", "ica.loc[30, 'centroid_manual_y'] = -13.530232997161816\n", "ica.loc[30, 'add_line'] = True\n", "ica.loc[30, 'line_loc'] = 'down'" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "ica.loc[29, 'centroid_manual_x'] = -76.34993996675975\n", "ica.loc[29, 'centroid_manual_y'] = -13.714338235863679\n", "ica.loc[29, 'add_line'] = True\n", "ica.loc[29, 'line_loc'] = 'right'" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "ica.loc[2, 'centroid_manual_x'] = -75.1143399157413\n", "ica.loc[2, 'centroid_manual_y'] = -14.921044879838641" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "ica.loc[6, 'centroid_manual_x'] = -75.0782884238944\n", "ica.loc[6, 'centroid_manual_y'] = -14.467705760547148" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "ica.loc[9, 'centroid_manual_x'] = -75.11106250739158\n", "ica.loc[9, 'centroid_manual_y'] = -14.321677975592303" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "ica.loc[27, 'centroid_manual_x'] = -76.27330324151674\n", "ica.loc[27, 'centroid_manual_y'] = -13.821295176493011\n", "ica.loc[27, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "ica.loc[24, 'centroid_manual_x'] = -75.61252298805458\n", "ica.loc[24, 'centroid_manual_y'] = -13.82320469577859" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [], "source": [ "ica.loc[39, 'centroid_manual_x'] = -76.08445278725789\n", "ica.loc[39, 'centroid_manual_y'] = -13.175638341432746 " ] }, { "cell_type": "code", "execution_count": 51, "metadata": {}, "outputs": [], "source": [ "ica.loc[37, 'centroid_manual_x'] = -76.01234980356409\n", "ica.loc[37, 'centroid_manual_y'] = -13.266501320636955" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "ica.loc[20, 'centroid_manual_x'] = -75.7686915759335\n", "ica.loc[20, 'centroid_manual_y'] = -13.902116928590607\n", "ica.loc[20, 'add_line'] = True\n", "ica.loc[20, 'line_loc'] = 'down'" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [], "source": [ "ica.loc[22, 'centroid_manual_x'] = -75.94680163656973\n", "ica.loc[22, 'centroid_manual_y'] = -13.937109738585168" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [], "source": [ "ica.loc[12, 'centroid_manual_x'] = -75.62235521310373\n", "ica.loc[12, 'centroid_manual_y'] = -14.320619422879354\n", "ica.loc[12, 'add_line'] = True\n", "ica.loc[12, 'line_loc'] = 'up'" ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [], "source": [ "ica.loc[10, 'centroid_manual_x'] = -75.80802047613012\n", "ica.loc[10, 'centroid_manual_y'] = -14.229568059848473\n", "ica.loc[10, 'add_line'] = True\n", "ica.loc[:, 'line_loc'] = 'right-top'" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [], "source": [ "ica.loc[16, 'centroid_manual_x'] = -75.52253088379761\n", "ica.loc[16, 'centroid_manual_y'] = -14.06097342137825\n", "ica.loc[16, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [], "source": [ "ica.loc[19, 'centroid_manual_x'] = -75.52253088379761\n", "ica.loc[19, 'centroid_manual_y'] = -13.941987077506319\n", "ica.loc[19, 'add_line'] = True\n", "ica.loc[19, 'line_loc'] = 'left'" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [], "source": [ "ica.loc[14, 'centroid_manual_x'] = -75.80802047613012\n", "ica.loc[14, 'centroid_manual_y'] = -14.10563691437555\n", "ica.loc[14, 'add_line'] = True" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [], "source": [ "ica.loc[13, 'centroid_manual_x'] = -75.52253088379761\n", "ica.loc[13, 'centroid_manual_y'] = -14.169199801350723\n", "ica.loc[13, 'add_line'] = True\n", "ica.loc[:, 'line_loc'] = 'left'" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [], "source": [ "ica.loc[21, 'centroid_manual_x'] = -75.35866046631169\n", "ica.loc[21, 'centroid_manual_y'] = -14.140598700316115" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [], "source": [ "ica.loc[18, 'centroid_manual_x'] = -75.98172311866519 \n", "ica.loc[18, 'centroid_manual_y'] = -14.070510851750836" ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [], "source": [ "ica.to_file('data/ica.geojson', driver='GeoJSON')" ] } ], "metadata": { "kernelspec": { "display_name": "geoPropDataExploration", "language": "python", "name": "geopropdataexploration" }, "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.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }