From de7e29aaf8a21d1cd73279391cd359fdddedc5ea Mon Sep 17 00:00:00 2001 From: jhelsel11 Date: Tue, 19 May 2020 13:56:26 -0600 Subject: [PATCH] change project card builder name --- notebooks/I394E_reversible_lane.ipynb | 388 ------ .../project_card_I394E_reversible_lane.ipynb | 1104 +++++++++++++++++ 2 files changed, 1104 insertions(+), 388 deletions(-) delete mode 100644 notebooks/I394E_reversible_lane.ipynb create mode 100644 notebooks/project_card_I394E_reversible_lane.ipynb diff --git a/notebooks/I394E_reversible_lane.ipynb b/notebooks/I394E_reversible_lane.ipynb deleted file mode 100644 index ed1e191..0000000 --- a/notebooks/I394E_reversible_lane.ipynb +++ /dev/null @@ -1,388 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# I394E Reversible Lane Project Card\n" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import sys\n", - "\n", - "from lasso import Project\n", - "from lasso import CubeTransit\n", - "from network_wrangler import WranglerLogger" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "%load_ext autoreload\n", - "%autoreload 2" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "import logging\n", - "logger = logging.getLogger(\"WranglerLogger\")\n", - "logger.handlers[0].stream = sys.stdout\n", - "# if you don't want to see so much detail, set to logging.INFO or DEBUG\n", - "logger.setLevel(logging.DEBUG)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'C:\\\\projects\\\\met_council_git\\\\data\\\\interim'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#set examples directory\n", - "INTERIM_DIR = \"C:\\\\projects\\\\met_council_git\\\\data\\\\interim\"\n", - "INTERIM_DIR" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Roadway Project Card\n", - "\n", - "Roadway project cards are built by reading in a base network in the standard network format and a then processing cube log files. \n", - "\n", - "The log file information is stored in a dataframe called `roadway_changes`\n", - "\n", - "The project card data is created when comparing log file to the base network and is stored in the variable `card_data`" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2020-05-13 12:54:19, INFO: No base transit network.\n", - "2020-05-13 12:54:19, INFO: No transit changes given or processed.\n", - "2020-05-13 12:54:19, INFO: Reading logfile: C:\\projects\\met_council_git\\data\\interim\\change_logs\\test.log\n", - "2020-05-13 12:54:19, INFO: Processed 1 Node lines and 0 Link lines\n", - "2020-05-13 12:54:19, INFO: Reading from following files:\n", - "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\link.json\n", - "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\node.geojson\n", - "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\shape.geojson.\n", - "2020-05-13 12:58:35, INFO: Read 1134074 links from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\link.json\n", - "2020-05-13 12:58:35, INFO: Read 354346 nodes from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\node.geojson\n", - "2020-05-13 12:58:35, INFO: Read 1134074 shapes from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\shape.geojson\n", - "2020-05-13 13:08:53, INFO: Lasso base directory set as: D:\\lasso\n", - "2020-05-13 13:08:53, INFO: Creating calculated roadway variables.\n", - "2020-05-13 13:08:53, INFO: Calculating Area Type from Spatial Data and adding as roadway network variable: area_type\n", - "2020-05-13 13:09:03, DEBUG: Reading Area Type Shapefile D:\\lasso\\metcouncil_data\\area_type\\ThriveMSP2040CommunityDesignation.shp\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", - " return _prepare_from_string(\" \".join(pjargs))\n", - "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\geopandas\\tools\\sjoin.py:61: UserWarning: CRS of frames being joined does not match!(+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs != {'init': 'epsg:4326', 'no_defs': True})\n", - " \"(%s != %s)\" % (left_df.crs, right_df.crs)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2020-05-13 13:10:40, DEBUG: Area Type Codes Used: {23: 4, 24: 3, 25: 2, 35: 2, 36: 1, 41: 1, 51: 1, 52: 1, 53: 1, 60: 1}\n", - "2020-05-13 13:10:40, INFO: Finished Calculating Area Type from Spatial Data into variable: area_type\n", - "2020-05-13 13:10:43, INFO: Adding roadway network variable for county using a spatial join with: D:\\lasso\\metcouncil_data\\county\\cb_2017_us_county_5m.shp\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", - " return _prepare_from_string(\" \".join(pjargs))\n", - "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\geopandas\\tools\\sjoin.py:61: UserWarning: CRS of frames being joined does not match!(+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs != {'init': 'epsg:4326', 'no_defs': True})\n", - " \"(%s != %s)\" % (left_df.crs, right_df.crs)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2020-05-13 13:12:20, INFO: Finished Calculating county variable: county\n", - "2020-05-13 13:12:23, INFO: Calculating Centroid Connector and adding as roadway network variable: centroidconnect\n", - "2020-05-13 13:12:23, DEBUG: Calculating Centroid Connectors using highest TAZ number: 3100\n", - "2020-05-13 13:12:23, INFO: Finished calculating centroid connector variable: centroidconnect\n", - "2020-05-13 13:12:23, INFO: Calculating MPO as roadway network variable: mpo\n", - "2020-05-13 13:12:23, DEBUG: MPO Counties: [,1,,, ,3,,, ,4,,, ,5,,, ,6,,, ,7,,, ,2,]\n", - "2020-05-13 13:12:23, INFO: Finished calculating MPO variable: mpo\n", - "2020-05-13 13:12:23, INFO: Calculating Assignment Group as network variable: assign_group\n", - "2020-05-13 13:12:23, DEBUG: Calculating Centroid Connectors\n", - "2020-05-13 13:12:23, INFO: Centroid Connector Variable 'centroidconnect' already in network. Returning without overwriting.\n", - "2020-05-13 13:12:23, DEBUG: Reading MRCC / Shared Streets Match CSV\n", - "2020-05-13 13:12:23, DEBUG: Reading MRCC Shapefile: D:\\lasso\\metcouncil_data\\mrcc\\trans_mrcc_centerlines.shp\n", - "2020-05-13 13:12:28, DEBUG: MRCC GDF Columns\n", - "Index(['LINK_ID', 'ROUTE_SYS', 'ST_CONCAT', 'geometry'], dtype='object')\n", - "2020-05-13 13:12:29, DEBUG: mrcc shst ref df columns\n", - "Index(['shstReferenceId', 'shstGeometryId', 'pp_link_id', 'score'], dtype='object')\n", - "2020-05-13 13:12:37, DEBUG: WiDOT GDF Columns\n", - "Index(['OBJECTID', 'WISLR_OVLY', 'SURF_TYCD', 'TRLNS_SURF', 'TRLNS_SU_1',\n", - " 'LSHD_SURF_', 'LEFT_SHLD_', 'RSHD_SURF_', 'RGHT_SHLD_', 'RDWY_OWRST',\n", - " 'RW_INDC', 'RW_WD', 'MEDN_TYCD', 'LEFT_CURB_', 'RGHT_CURB_',\n", - " 'PRKG_TYCD', 'TRLNS_NB', 'WISLR_SFRT', 'SDWK_TYCD', 'HARST_TYCD',\n", - " 'VARST_TYCD', 'RDWY_MAGMT', 'RDWY_MAG_1', 'LOC_WISLR_', 'RWCRT_MILG',\n", - " 'RDWY_CTGY_', 'RDWY_SBCTG', 'AVG_DLY_TR', 'AVG_DLY__1', 'AVG_DLY__2',\n", - " 'RDWY_ACS_T', 'FED_URLC_T', 'FEDUA_TYCD', 'FED_CLSN_T', 'FNCT_CLS_T',\n", - " 'NHS_CLS_TY', 'NHS_RTE_NB', 'HPMS_SMPL_', 'HOV_LANE_T', 'PVMT_IRI_N',\n", - " 'PVMT_IRI_Y', 'ST_LABL_NM', 'ST_PRMY_SY', 'RDWY_LINK_', 'SHC_NTWK_N',\n", - " 'WISLR_PTY_', 'WISLR_PTY1', 'WISLR_CMTY', 'WISLR_CERT', 'DOT_CNTY_C',\n", - " 'LOC_FLKOS_', 'LOC_TLKOS_', 'LINK_OVLY_', 'DIR_INDC', 'OPOS_RDWY_',\n", - " 'INV_YR', 'LOC_WI_CMT', 'MEDN_WD_MS', 'RDWY_SBML_', 'RDWY_GTRST',\n", - " 'RDWY_HTRST', 'RDWY_MNTNR', 'RDWY_OWNR_', 'RDWY_SLRST', 'RDWY_WDRST',\n", - " 'RDWY_WTRST', 'RWCRT_PTY_', 'RDWY_CERT_', 'RWSR_SYS_T', 'RDWY_SURF_',\n", - " 'CSTMS_SFRT', 'RDWY_RTG_D', 'CNTY_PRMY_', 'DSGND_TRK_', 'DSGND_TRK1',\n", - " 'CTFR_INDC', 'FNCT_CLS_C', 'FNCT_CLS_G', 'HPMS_SMPL1', 'WISLR_PT_1',\n", - " 'SEG_WISLR_', 'RWCRT_RTE_', 'ASGD_RTE_I', 'ASGD_RTE_S', 'SFRTG_TYCD',\n", - " 'RTG_SURF_T', 'TRADS_ID', 'PA_WISLR_P', 'WISLR_PT_2', 'PMRC_TYCD',\n", - " 'DOT_RGN_NB', 'FED_SFGRP_', 'TRMT_TYID', 'MNTC_TRMT_', 'MNTC_TRMT1',\n", - " 'MNTC_TRM_1', 'SHAPE_Leng', 'geometry', 'LINK_ID'],\n", - " dtype='object')\n", - "2020-05-13 13:12:54, DEBUG: widot shst ref df columns\n", - "2020-05-13 13:12:54, DEBUG: source ShSt rename_variables_for_dbf columns\n", - "Index(['shstReferenceId', 'shstGeometryId', 'pp_link_id', 'score'], dtype='object')\n", - "2020-05-13 13:12:54, DEBUG: source gdf columns\n", - "Index(['LINK_ID', 'ROUTE_SYS', 'ST_CONCAT', 'geometry'], dtype='object')\n", - "2020-05-13 13:13:11, DEBUG: source ShSt rename_variables_for_dbf columns\n", - "Index(['shstReferenceId', 'shstGeometryId', 'shstFromIntersectionId',\n", - " 'shstToIntersectionId', 'gisReferenceId', 'gisGeometryId',\n", - " 'gisTotalSegments', 'gisSegmentIndex', 'gisFromIntersectionId',\n", - " 'gisToIntersectionId', 'startSideOfStreet', 'endSideOfStreet',\n", - " 'sideOfStreet', 'score', 'matchType', 'pp_link_id', 'geometry'],\n", - " dtype='object')\n", - "2020-05-13 13:13:11, DEBUG: source gdf columns\n", - "Index(['OBJECTID', 'WISLR_OVLY', 'SURF_TYCD', 'TRLNS_SURF', 'TRLNS_SU_1',\n", - " 'LSHD_SURF_', 'LEFT_SHLD_', 'RSHD_SURF_', 'RGHT_SHLD_', 'RDWY_OWRST',\n", - " 'RW_INDC', 'RW_WD', 'MEDN_TYCD', 'LEFT_CURB_', 'RGHT_CURB_',\n", - " 'PRKG_TYCD', 'TRLNS_NB', 'WISLR_SFRT', 'SDWK_TYCD', 'HARST_TYCD',\n", - " 'VARST_TYCD', 'RDWY_MAGMT', 'RDWY_MAG_1', 'LOC_WISLR_', 'RWCRT_MILG',\n", - " 'RDWY_CTGY_', 'RDWY_SBCTG', 'AVG_DLY_TR', 'AVG_DLY__1', 'AVG_DLY__2',\n", - " 'RDWY_ACS_T', 'FED_URLC_T', 'FEDUA_TYCD', 'FED_CLSN_T', 'FNCT_CLS_T',\n", - " 'NHS_CLS_TY', 'NHS_RTE_NB', 'HPMS_SMPL_', 'HOV_LANE_T', 'PVMT_IRI_N',\n", - " 'PVMT_IRI_Y', 'ST_LABL_NM', 'ST_PRMY_SY', 'RDWY_LINK_', 'SHC_NTWK_N',\n", - " 'WISLR_PTY_', 'WISLR_PTY1', 'WISLR_CMTY', 'WISLR_CERT', 'DOT_CNTY_C',\n", - " 'LOC_FLKOS_', 'LOC_TLKOS_', 'LINK_OVLY_', 'DIR_INDC', 'OPOS_RDWY_',\n", - " 'INV_YR', 'LOC_WI_CMT', 'MEDN_WD_MS', 'RDWY_SBML_', 'RDWY_GTRST',\n", - " 'RDWY_HTRST', 'RDWY_MNTNR', 'RDWY_OWNR_', 'RDWY_SLRST', 'RDWY_WDRST',\n", - " 'RDWY_WTRST', 'RWCRT_PTY_', 'RDWY_CERT_', 'RWSR_SYS_T', 'RDWY_SURF_',\n", - " 'CSTMS_SFRT', 'RDWY_RTG_D', 'CNTY_PRMY_', 'DSGND_TRK_', 'DSGND_TRK1',\n", - " 'CTFR_INDC', 'FNCT_CLS_C', 'FNCT_CLS_G', 'HPMS_SMPL1', 'WISLR_PT_1',\n", - " 'SEG_WISLR_', 'RWCRT_RTE_', 'ASGD_RTE_I', 'ASGD_RTE_S', 'SFRTG_TYCD',\n", - " 'RTG_SURF_T', 'TRADS_ID', 'PA_WISLR_P', 'WISLR_PT_2', 'PMRC_TYCD',\n", - " 'DOT_RGN_NB', 'FED_SFGRP_', 'TRMT_TYID', 'MNTC_TRMT_', 'MNTC_TRMT1',\n", - " 'MNTC_TRM_1', 'SHAPE_Leng', 'geometry', 'LINK_ID'],\n", - " dtype='object')\n", - "2020-05-13 13:14:59, INFO: Finished calculating assignment group variable: assign_group\n", - "2020-05-13 13:15:00, INFO: Calculating Roadway Class\n", - "2020-05-13 13:15:04, INFO: Finished calculating roadway class variable: roadway_class\n", - "2020-05-13 13:15:04, INFO: Adding Counts\n", - "2020-05-13 13:15:04, DEBUG: Adding MNDOT Counts using \n", - "- shst file: D:\\lasso\\metcouncil_data\\count_mn\\mn_count_ShSt_API_match.csv\n", - "- shp file: AADT_mn\n", - "- as network variable: AADT\n", - "2020-05-13 13:15:04, INFO: Adding Variable AADT using Shared Streets Reference from D:\\lasso\\metcouncil_data\\count_mn\\mn_count_ShSt_API_match.csv\n", - "2020-05-13 13:15:08, INFO: Added variable: AADT using Shared Streets Reference\n", - "2020-05-13 13:15:08, DEBUG: Adding WiDot Counts using \n", - "- shst file: D:\\lasso\\metcouncil_data\\Wisconsin_Lanes_Counts_Median\\wi_count_ShSt_API_match.csv\n", - "- shp file: AADT_wi\n", - "- as network variable: AADT\n", - "2020-05-13 13:15:08, INFO: Adding Variable AADT using Shared Streets Reference from D:\\lasso\\metcouncil_data\\Wisconsin_Lanes_Counts_Median\\wi_count_ShSt_API_match.csv\n", - "2020-05-13 13:15:13, INFO: Added variable: AADT using Shared Streets Reference\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\lasso\\lasso\\roadway.py:933: 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/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " ].astype(network_var_type)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2020-05-13 13:15:13, INFO: Finished adding counts variable: AADT\n", - "2020-05-13 13:15:13, INFO: Finished creating ML lanes variable: ML_lanes\n", - "2020-05-13 13:15:13, INFO: Finished creating hov corridor variable: segment_id\n", - "2020-05-13 13:15:13, INFO: Overwriting existing distance Variable 'distance' already in network\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", - " return _prepare_from_string(\" \".join(pjargs))\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2020-05-13 13:16:03, INFO: Calculating distance for centroid connectors\n", - "2020-05-13 13:16:08, INFO: Filling nan for network from network wrangler\n", - "2020-05-13 13:16:37, INFO: Converting variable type to MetCouncil standard\n", - "2020-05-13 13:17:15, INFO: Lasso base directory set as: D:\\lasso\n", - "2020-05-13 13:17:15, INFO: Evaluating compatibility between roadway network changes and base network. Not evaluating deletions.\n", - "2020-05-13 13:17:21, INFO: Evaluating project changes.\n", - "2020-05-13 13:17:21, DEBUG: Processing link deletions\n" - ] - }, - { - "ename": "KeyError", - "evalue": "'model_link_id'", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mC:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m 2896\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2897\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2898\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n", - "\u001b[1;31mKeyError\u001b[0m: 'model_link_id'", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m i394e_roadway_project = Project.create_project(\n\u001b[0;32m 2\u001b[0m \u001b[0mbase_roadway_dir\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mos\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mINTERIM_DIR\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"networks\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"base_network\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mroadway_log_file\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mos\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mINTERIM_DIR\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"change_logs\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"test.log\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m )\n", - "\u001b[1;32md:\\lasso\\lasso\\project.py\u001b[0m in \u001b[0;36mcreate_project\u001b[1;34m(roadway_log_file, roadway_shp_file, roadway_csv_file, base_roadway_dir, base_transit_source, build_transit_source, roadway_changes, transit_changes, base_roadway_network, base_transit_network, build_transit_network, project_name, parameters)\u001b[0m\n\u001b[0;32m 247\u001b[0m \u001b[0mevaluate\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 248\u001b[0m \u001b[0mproject_name\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mproject_name\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 249\u001b[1;33m \u001b[0mparameters\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 250\u001b[0m )\n\u001b[0;32m 251\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32md:\\lasso\\lasso\\project.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, roadway_changes, transit_changes, base_roadway_network, base_transit_network, build_transit_network, project_name, evaluate, parameters)\u001b[0m\n\u001b[0;32m 90\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 91\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mevaluate\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 92\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mevaluate_changes\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 93\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 94\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mwrite_project_card\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfilename\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32md:\\lasso\\lasso\\project.py\u001b[0m in \u001b[0;36mevaluate_changes\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 365\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 366\u001b[0m \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mroadway_changes\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mempty\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 367\u001b[1;33m \u001b[0mhighway_change_list\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd_highway_changes\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 368\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 369\u001b[0m if (self.transit_changes is not None) or (\n", - "\u001b[1;32md:\\lasso\\lasso\\project.py\u001b[0m in \u001b[0;36madd_highway_changes\u001b[1;34m(self, limit_variables_to_existing_network)\u001b[0m\n\u001b[0;32m 472\u001b[0m \u001b[0mcube_delete_df\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlink_changes_df\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mlink_changes_df\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mOPERATION_final\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"D\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 473\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mcube_delete_df\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 474\u001b[1;33m \u001b[0mlinks_to_delete\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcube_delete_df\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"model_link_id\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtolist\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 475\u001b[0m delete_link_dict = {\n\u001b[0;32m 476\u001b[0m \u001b[1;34m\"category\"\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;34m\"Roadway Deletion\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32mC:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pandas\\core\\frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m 2993\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2994\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2995\u001b[1;33m \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2996\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2997\u001b[0m \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mindexer\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32mC:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m 2897\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2898\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2899\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_maybe_cast_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2900\u001b[0m \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtolerance\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mtolerance\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2901\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mindexer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mindexer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msize\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n", - "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n", - "\u001b[1;31mKeyError\u001b[0m: 'model_link_id'" - ] - } - ], - "source": [ - "i394e_roadway_project = Project.create_project(\n", - " base_roadway_dir=os.path.join(INTERIM_DIR,\"networks\", \"base_network\"),\n", - " roadway_log_file=os.path.join(INTERIM_DIR,\"change_logs\",\"test.log\"),\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "i394e_roadway_project.roadway_changes.columns" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "i394e_roadway_project.card_data" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'i394e_roadway_project' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m i394e_roadway_project.write_project_card(\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mos\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mINTERIM_DIR\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"project_cards\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"test.yml\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m )\n", - "\u001b[1;31mNameError\u001b[0m: name 'i394e_roadway_project' is not defined" - ] - } - ], - "source": [ - "i394e_roadway_project.write_project_card(\n", - " os.path.join(INTERIM_DIR,\"project_cards\", \"test.yml\")\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "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.7.6" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/project_card_I394E_reversible_lane.ipynb b/notebooks/project_card_I394E_reversible_lane.ipynb new file mode 100644 index 0000000..b057736 --- /dev/null +++ b/notebooks/project_card_I394E_reversible_lane.ipynb @@ -0,0 +1,1104 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# I394E Reversible Lane Project Card\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import sys\n", + "\n", + "from lasso import Project\n", + "from lasso import CubeTransit\n", + "from network_wrangler import WranglerLogger" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "%load_ext autoreload\n", + "%autoreload 2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "import logging\n", + "logger = logging.getLogger(\"WranglerLogger\")\n", + "logger.handlers[0].stream = sys.stdout\n", + "# if you don't want to see so much detail, set to logging.INFO or DEBUG\n", + "logger.setLevel(logging.DEBUG)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'C:\\\\projects\\\\met_council_git\\\\data\\\\interim'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#set examples directory\n", + "INTERIM_DIR = \"C:\\\\projects\\\\met_council_git\\\\data\\\\interim\"\n", + "INTERIM_DIR" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Roadway Project Card\n", + "\n", + "Roadway project cards are built by reading in a base network in the standard network format and a then processing cube log files. \n", + "\n", + "The log file information is stored in a dataframe called `roadway_changes`\n", + "\n", + "The project card data is created when comparing log file to the base network and is stored in the variable `card_data`" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 11:51:35, INFO: No base transit network.\n", + "2020-05-19 11:51:35, INFO: No transit changes given or processed.\n", + "2020-05-19 11:51:35, INFO: Reading logfile: C:\\projects\\met_council_git\\data\\interim\\change_logs\\i394_reversible_lanes.log\n", + "2020-05-19 11:51:35, INFO: Processed 0 Node lines and 24 Link lines\n", + "2020-05-19 11:51:35, INFO: Reading from following files:\n", + "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\link.json\n", + "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\node.geojson\n", + "-C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\shape.geojson.\n", + "2020-05-19 11:55:58, INFO: Read 1134074 links from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\link.json\n", + "2020-05-19 11:55:58, INFO: Read 354346 nodes from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\node.geojson\n", + "2020-05-19 11:55:58, INFO: Read 1134074 shapes from C:\\projects\\met_council_git\\data\\interim\\networks\\base_network\\shape.geojson\n", + "2020-05-19 12:05:33, INFO: Lasso base directory set as: D:\\lasso\n", + "2020-05-19 12:05:33, INFO: Creating calculated roadway variables.\n", + "2020-05-19 12:05:33, INFO: Calculating Area Type from Spatial Data and adding as roadway network variable: area_type\n", + "2020-05-19 12:05:46, DEBUG: Reading Area Type Shapefile D:\\lasso\\metcouncil_data\\area_type\\ThriveMSP2040CommunityDesignation.shp\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", + " return _prepare_from_string(\" \".join(pjargs))\n", + "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\geopandas\\tools\\sjoin.py:61: UserWarning: CRS of frames being joined does not match!(+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs != {'init': 'epsg:4326', 'no_defs': True})\n", + " \"(%s != %s)\" % (left_df.crs, right_df.crs)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 12:07:20, DEBUG: Area Type Codes Used: {23: 4, 24: 3, 25: 2, 35: 2, 36: 1, 41: 1, 51: 1, 52: 1, 53: 1, 60: 1}\n", + "2020-05-19 12:07:20, INFO: Finished Calculating Area Type from Spatial Data into variable: area_type\n", + "2020-05-19 12:07:23, INFO: Adding roadway network variable for county using a spatial join with: D:\\lasso\\metcouncil_data\\county\\cb_2017_us_county_5m.shp\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", + " return _prepare_from_string(\" \".join(pjargs))\n", + "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\geopandas\\tools\\sjoin.py:61: UserWarning: CRS of frames being joined does not match!(+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs != {'init': 'epsg:4326', 'no_defs': True})\n", + " \"(%s != %s)\" % (left_df.crs, right_df.crs)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 12:09:04, INFO: Finished Calculating county variable: county\n", + "2020-05-19 12:09:07, INFO: Calculating Centroid Connector and adding as roadway network variable: centroidconnect\n", + "2020-05-19 12:09:07, DEBUG: Calculating Centroid Connectors using highest TAZ number: 3100\n", + "2020-05-19 12:09:07, INFO: Finished calculating centroid connector variable: centroidconnect\n", + "2020-05-19 12:09:07, INFO: Calculating MPO as roadway network variable: mpo\n", + "2020-05-19 12:09:07, DEBUG: MPO Counties: [,1,,, ,3,,, ,4,,, ,5,,, ,6,,, ,7,,, ,2,]\n", + "2020-05-19 12:09:07, INFO: Finished calculating MPO variable: mpo\n", + "2020-05-19 12:09:07, INFO: Calculating Assignment Group as network variable: assign_group\n", + "2020-05-19 12:09:07, DEBUG: Calculating Centroid Connectors\n", + "2020-05-19 12:09:07, INFO: Centroid Connector Variable 'centroidconnect' already in network. Returning without overwriting.\n", + "2020-05-19 12:09:07, DEBUG: Reading MRCC / Shared Streets Match CSV\n", + "2020-05-19 12:09:07, DEBUG: Reading MRCC Shapefile: D:\\lasso\\metcouncil_data\\mrcc\\trans_mrcc_centerlines.shp\n", + "2020-05-19 12:09:13, DEBUG: MRCC GDF Columns\n", + "Index(['LINK_ID', 'ROUTE_SYS', 'ST_CONCAT', 'geometry'], dtype='object')\n", + "2020-05-19 12:09:15, DEBUG: mrcc shst ref df columns\n", + "Index(['shstReferenceId', 'shstGeometryId', 'pp_link_id', 'score'], dtype='object')\n", + "2020-05-19 12:09:22, DEBUG: WiDOT GDF Columns\n", + "Index(['OBJECTID', 'WISLR_OVLY', 'SURF_TYCD', 'TRLNS_SURF', 'TRLNS_SU_1',\n", + " 'LSHD_SURF_', 'LEFT_SHLD_', 'RSHD_SURF_', 'RGHT_SHLD_', 'RDWY_OWRST',\n", + " 'RW_INDC', 'RW_WD', 'MEDN_TYCD', 'LEFT_CURB_', 'RGHT_CURB_',\n", + " 'PRKG_TYCD', 'TRLNS_NB', 'WISLR_SFRT', 'SDWK_TYCD', 'HARST_TYCD',\n", + " 'VARST_TYCD', 'RDWY_MAGMT', 'RDWY_MAG_1', 'LOC_WISLR_', 'RWCRT_MILG',\n", + " 'RDWY_CTGY_', 'RDWY_SBCTG', 'AVG_DLY_TR', 'AVG_DLY__1', 'AVG_DLY__2',\n", + " 'RDWY_ACS_T', 'FED_URLC_T', 'FEDUA_TYCD', 'FED_CLSN_T', 'FNCT_CLS_T',\n", + " 'NHS_CLS_TY', 'NHS_RTE_NB', 'HPMS_SMPL_', 'HOV_LANE_T', 'PVMT_IRI_N',\n", + " 'PVMT_IRI_Y', 'ST_LABL_NM', 'ST_PRMY_SY', 'RDWY_LINK_', 'SHC_NTWK_N',\n", + " 'WISLR_PTY_', 'WISLR_PTY1', 'WISLR_CMTY', 'WISLR_CERT', 'DOT_CNTY_C',\n", + " 'LOC_FLKOS_', 'LOC_TLKOS_', 'LINK_OVLY_', 'DIR_INDC', 'OPOS_RDWY_',\n", + " 'INV_YR', 'LOC_WI_CMT', 'MEDN_WD_MS', 'RDWY_SBML_', 'RDWY_GTRST',\n", + " 'RDWY_HTRST', 'RDWY_MNTNR', 'RDWY_OWNR_', 'RDWY_SLRST', 'RDWY_WDRST',\n", + " 'RDWY_WTRST', 'RWCRT_PTY_', 'RDWY_CERT_', 'RWSR_SYS_T', 'RDWY_SURF_',\n", + " 'CSTMS_SFRT', 'RDWY_RTG_D', 'CNTY_PRMY_', 'DSGND_TRK_', 'DSGND_TRK1',\n", + " 'CTFR_INDC', 'FNCT_CLS_C', 'FNCT_CLS_G', 'HPMS_SMPL1', 'WISLR_PT_1',\n", + " 'SEG_WISLR_', 'RWCRT_RTE_', 'ASGD_RTE_I', 'ASGD_RTE_S', 'SFRTG_TYCD',\n", + " 'RTG_SURF_T', 'TRADS_ID', 'PA_WISLR_P', 'WISLR_PT_2', 'PMRC_TYCD',\n", + " 'DOT_RGN_NB', 'FED_SFGRP_', 'TRMT_TYID', 'MNTC_TRMT_', 'MNTC_TRMT1',\n", + " 'MNTC_TRM_1', 'SHAPE_Leng', 'geometry', 'LINK_ID'],\n", + " dtype='object')\n", + "2020-05-19 12:09:38, DEBUG: widot shst ref df columns\n", + "2020-05-19 12:09:38, DEBUG: source ShSt rename_variables_for_dbf columns\n", + "Index(['shstReferenceId', 'shstGeometryId', 'pp_link_id', 'score'], dtype='object')\n", + "2020-05-19 12:09:38, DEBUG: source gdf columns\n", + "Index(['LINK_ID', 'ROUTE_SYS', 'ST_CONCAT', 'geometry'], dtype='object')\n", + "2020-05-19 12:09:54, DEBUG: source ShSt rename_variables_for_dbf columns\n", + "Index(['shstReferenceId', 'shstGeometryId', 'shstFromIntersectionId',\n", + " 'shstToIntersectionId', 'gisReferenceId', 'gisGeometryId',\n", + " 'gisTotalSegments', 'gisSegmentIndex', 'gisFromIntersectionId',\n", + " 'gisToIntersectionId', 'startSideOfStreet', 'endSideOfStreet',\n", + " 'sideOfStreet', 'score', 'matchType', 'pp_link_id', 'geometry'],\n", + " dtype='object')\n", + "2020-05-19 12:09:54, DEBUG: source gdf columns\n", + "Index(['OBJECTID', 'WISLR_OVLY', 'SURF_TYCD', 'TRLNS_SURF', 'TRLNS_SU_1',\n", + " 'LSHD_SURF_', 'LEFT_SHLD_', 'RSHD_SURF_', 'RGHT_SHLD_', 'RDWY_OWRST',\n", + " 'RW_INDC', 'RW_WD', 'MEDN_TYCD', 'LEFT_CURB_', 'RGHT_CURB_',\n", + " 'PRKG_TYCD', 'TRLNS_NB', 'WISLR_SFRT', 'SDWK_TYCD', 'HARST_TYCD',\n", + " 'VARST_TYCD', 'RDWY_MAGMT', 'RDWY_MAG_1', 'LOC_WISLR_', 'RWCRT_MILG',\n", + " 'RDWY_CTGY_', 'RDWY_SBCTG', 'AVG_DLY_TR', 'AVG_DLY__1', 'AVG_DLY__2',\n", + " 'RDWY_ACS_T', 'FED_URLC_T', 'FEDUA_TYCD', 'FED_CLSN_T', 'FNCT_CLS_T',\n", + " 'NHS_CLS_TY', 'NHS_RTE_NB', 'HPMS_SMPL_', 'HOV_LANE_T', 'PVMT_IRI_N',\n", + " 'PVMT_IRI_Y', 'ST_LABL_NM', 'ST_PRMY_SY', 'RDWY_LINK_', 'SHC_NTWK_N',\n", + " 'WISLR_PTY_', 'WISLR_PTY1', 'WISLR_CMTY', 'WISLR_CERT', 'DOT_CNTY_C',\n", + " 'LOC_FLKOS_', 'LOC_TLKOS_', 'LINK_OVLY_', 'DIR_INDC', 'OPOS_RDWY_',\n", + " 'INV_YR', 'LOC_WI_CMT', 'MEDN_WD_MS', 'RDWY_SBML_', 'RDWY_GTRST',\n", + " 'RDWY_HTRST', 'RDWY_MNTNR', 'RDWY_OWNR_', 'RDWY_SLRST', 'RDWY_WDRST',\n", + " 'RDWY_WTRST', 'RWCRT_PTY_', 'RDWY_CERT_', 'RWSR_SYS_T', 'RDWY_SURF_',\n", + " 'CSTMS_SFRT', 'RDWY_RTG_D', 'CNTY_PRMY_', 'DSGND_TRK_', 'DSGND_TRK1',\n", + " 'CTFR_INDC', 'FNCT_CLS_C', 'FNCT_CLS_G', 'HPMS_SMPL1', 'WISLR_PT_1',\n", + " 'SEG_WISLR_', 'RWCRT_RTE_', 'ASGD_RTE_I', 'ASGD_RTE_S', 'SFRTG_TYCD',\n", + " 'RTG_SURF_T', 'TRADS_ID', 'PA_WISLR_P', 'WISLR_PT_2', 'PMRC_TYCD',\n", + " 'DOT_RGN_NB', 'FED_SFGRP_', 'TRMT_TYID', 'MNTC_TRMT_', 'MNTC_TRMT1',\n", + " 'MNTC_TRM_1', 'SHAPE_Leng', 'geometry', 'LINK_ID'],\n", + " dtype='object')\n", + "2020-05-19 12:11:28, INFO: Finished calculating assignment group variable: assign_group\n", + "2020-05-19 12:11:30, INFO: Calculating Roadway Class\n", + "2020-05-19 12:11:33, INFO: Finished calculating roadway class variable: roadway_class\n", + "2020-05-19 12:11:34, INFO: Adding Counts\n", + "2020-05-19 12:11:34, DEBUG: Adding MNDOT Counts using \n", + "- shst file: D:\\lasso\\metcouncil_data\\count_mn\\mn_count_ShSt_API_match.csv\n", + "- shp file: AADT_mn\n", + "- as network variable: AADT\n", + "2020-05-19 12:11:34, INFO: Adding Variable AADT using Shared Streets Reference from D:\\lasso\\metcouncil_data\\count_mn\\mn_count_ShSt_API_match.csv\n", + "2020-05-19 12:11:38, INFO: Added variable: AADT using Shared Streets Reference\n", + "2020-05-19 12:11:38, DEBUG: Adding WiDot Counts using \n", + "- shst file: D:\\lasso\\metcouncil_data\\Wisconsin_Lanes_Counts_Median\\wi_count_ShSt_API_match.csv\n", + "- shp file: AADT_wi\n", + "- as network variable: AADT\n", + "2020-05-19 12:11:38, INFO: Adding Variable AADT using Shared Streets Reference from D:\\lasso\\metcouncil_data\\Wisconsin_Lanes_Counts_Median\\wi_count_ShSt_API_match.csv\n", + "2020-05-19 12:11:44, INFO: Added variable: AADT using Shared Streets Reference\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\lasso\\lasso\\roadway.py:933: 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/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " ].astype(network_var_type)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 12:11:45, INFO: Finished adding counts variable: AADT\n", + "2020-05-19 12:11:45, INFO: Finished creating ML lanes variable: ML_lanes\n", + "2020-05-19 12:11:45, INFO: Finished creating hov corridor variable: segment_id\n", + "2020-05-19 12:11:45, INFO: Overwriting existing distance Variable 'distance' already in network\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Anaconda3\\envs\\lasso_env\\lib\\site-packages\\pyproj\\crs.py:77: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method.\n", + " return _prepare_from_string(\" \".join(pjargs))\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 12:12:27, INFO: Calculating distance for centroid connectors\n", + "2020-05-19 12:12:32, INFO: Filling nan for network from network wrangler\n", + "2020-05-19 12:12:59, INFO: Converting variable type to MetCouncil standard\n", + "2020-05-19 12:13:33, INFO: Lasso base directory set as: D:\\lasso\n", + "2020-05-19 12:13:33, INFO: Evaluating compatibility between roadway network changes and base network. Not evaluating deletions.\n", + "2020-05-19 12:13:39, INFO: Evaluating project changes.\n", + "2020-05-19 12:13:39, DEBUG: Processing link deletions\n", + "2020-05-19 12:13:39, DEBUG: 0 Links Deleted.\n", + "2020-05-19 12:13:39, DEBUG: Processing link additions\n", + "2020-05-19 12:13:39, DEBUG: 0 Links Added\n", + "2020-05-19 12:13:39, DEBUG: No Nodes Added\n", + "2020-05-19 12:13:39, DEBUG: Processing changes\n", + "2020-05-19 12:13:39, DEBUG: 17 Changes Processed\n" + ] + } + ], + "source": [ + "i394e_roadway_project = Project.create_project(\n", + " base_roadway_dir=os.path.join(INTERIM_DIR,\"networks\", \"base_network\"),\n", + " roadway_log_file=os.path.join(INTERIM_DIR,\"change_logs\",\"i394_reversible_lanes.log\"),\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['OBJECT', 'OPERATION', 'GROUP', 'A', 'B', 'bike_access', 'bus_only',\n", + " 'distance', 'drive_access', 'managed', 'model_link_id', 'name',\n", + " 'rail_only', 'roadway', 'segment_id', 'shstGeometryId', 'truck_access',\n", + " 'walk_access', 'area_type', 'county', 'centroidconnect', 'mpo',\n", + " 'assign_group', 'roadway_class', 'AADT', 'count_AM', 'count_MD',\n", + " 'count_PM', 'count_NT', 'count_daily', 'count_year', 'trn_priority_AM',\n", + " 'trn_priority_MD', 'trn_priority_PM', 'trn_priority_NT',\n", + " 'ttime_assert_AM', 'ttime_assert_MD', 'ttime_assert_PM',\n", + " 'ttime_assert_NT', 'lanes_AM', 'lanes_MD', 'lanes_PM', 'lanes_NT',\n", + " 'ML_lanes_AM', 'ML_lanes_MD', 'ML_lanes_PM', 'ML_lanes_NT',\n", + " 'price_sov_AM', 'price_hov2_AM', 'price_hov3_AM', 'price_truck_AM',\n", + " 'price_sov_MD', 'price_hov2_MD', 'price_hov3_MD', 'price_truck_MD',\n", + " 'price_sov_PM', 'price_hov2_PM', 'price_hov3_PM', 'price_truck_PM',\n", + " 'price_sov_NT', 'price_hov2_NT', 'price_hov3_NT', 'price_truck_NT',\n", + " 'access_AM', 'access_MD', 'access_PM', 'access_NT', 'RCI', 'LANES',\n", + " 'LINKCLASS', 'SPEED', 'CAPACITY', 'TIME', 'AMCAP', 'OFFCAP', 'PMCAP',\n", + " 'NEWVOLAM', 'CONGAM', 'NEWVOLMD', 'CONGMD', 'SEGMENT_IDY',\n", + " 'model_node_id', 'osm_node_id', 'drive_node', 'walk_node', 'bike_node',\n", + " 'X', 'Y'],\n", + " dtype='object')" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "i394e_roadway_project.roadway_changes.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
OBJECTOPERATIONGROUPABbike_accessbus_onlydistancedrive_accessmanaged...NEWVOLMDCONGMDSEGMENT_IDYmodel_node_idosm_node_iddrive_nodewalk_nodebike_nodeXY
0LC09262895168001.597411...000NaNNaNNaNNaNNaNNaNNaN
1LC09516892628001.597410...000NaNNaNNaNNaNNaNNaNNaN
2LC1161372161394000.49910...000NaNNaNNaNNaNNaNNaNNaN
3LC2161394113416000.222810...000NaNNaNNaNNaNNaNNaNNaN
4LC0717795168000.321911...000NaNNaNNaNNaNNaNNaNNaN
5LC0951687177000.321911...000NaNNaNNaNNaNNaNNaNNaN
6LC17177162799000.076411...000NaNNaNNaNNaNNaNNaNNaN
7LC2162799155509000.358111...000NaNNaNNaNNaNNaNNaNNaN
8LC016279938333000.291711...000NaNNaNNaNNaNNaNNaNNaN
9LC1714438333000.381515...000NaNNaNNaNNaNNaNNaNNaN
10LC2714438333000.381510...000NaNNaNNaNNaNNaNNaNNaN
11LC01134167144000.341210...000NaNNaNNaNNaNNaNNaNNaN
12LC19311161372000.733510...000NaNNaNNaNNaNNaNNaNNaN
13LC2537239311000.332910...000NaNNaNNaNNaNNaNNaNNaN
14LC09778353723000.707110...000NaNNaNNaNNaNNaNNaNNaN
15LC15355897783000.392510...000NaNNaNNaNNaNNaNNaNNaN
16LC25355453558000.176910...000NaNNaNNaNNaNNaNNaNNaN
17LC097783149053000.214411...000NaNNaNNaNNaNNaNNaNNaN
18LC193855149053000.492711...000NaNNaNNaNNaNNaNNaNNaN
19LC114905393855000.492711...000NaNNaNNaNNaNNaNNaNNaN
20LC29262893855000.217111...000NaNNaNNaNNaNNaNNaNNaN
21LC29385592628000.217111...000NaNNaNNaNNaNNaNNaNNaN
22LC09262895168001.597411...000NaNNaNNaNNaNNaNNaNNaN
23LC09516892628001.597411...000NaNNaNNaNNaNNaNNaNNaN
\n", + "

24 rows × 88 columns

\n", + "
" + ], + "text/plain": [ + " OBJECT OPERATION GROUP A B bike_access bus_only distance \\\n", + "0 L C 0 92628 95168 0 0 1.5974 \n", + "1 L C 0 95168 92628 0 0 1.5974 \n", + "2 L C 1 161372 161394 0 0 0.499 \n", + "3 L C 2 161394 113416 0 0 0.2228 \n", + "4 L C 0 7177 95168 0 0 0.3219 \n", + "5 L C 0 95168 7177 0 0 0.3219 \n", + "6 L C 1 7177 162799 0 0 0.0764 \n", + "7 L C 2 162799 155509 0 0 0.3581 \n", + "8 L C 0 162799 38333 0 0 0.2917 \n", + "9 L C 1 7144 38333 0 0 0.3815 \n", + "10 L C 2 7144 38333 0 0 0.3815 \n", + "11 L C 0 113416 7144 0 0 0.3412 \n", + "12 L C 1 9311 161372 0 0 0.7335 \n", + "13 L C 2 53723 9311 0 0 0.3329 \n", + "14 L C 0 97783 53723 0 0 0.7071 \n", + "15 L C 1 53558 97783 0 0 0.3925 \n", + "16 L C 2 53554 53558 0 0 0.1769 \n", + "17 L C 0 97783 149053 0 0 0.2144 \n", + "18 L C 1 93855 149053 0 0 0.4927 \n", + "19 L C 1 149053 93855 0 0 0.4927 \n", + "20 L C 2 92628 93855 0 0 0.2171 \n", + "21 L C 2 93855 92628 0 0 0.2171 \n", + "22 L C 0 92628 95168 0 0 1.5974 \n", + "23 L C 0 95168 92628 0 0 1.5974 \n", + "\n", + " drive_access managed ... NEWVOLMD CONGMD SEGMENT_IDY model_node_id \\\n", + "0 1 1 ... 0 0 0 NaN \n", + "1 1 0 ... 0 0 0 NaN \n", + "2 1 0 ... 0 0 0 NaN \n", + "3 1 0 ... 0 0 0 NaN \n", + "4 1 1 ... 0 0 0 NaN \n", + "5 1 1 ... 0 0 0 NaN \n", + "6 1 1 ... 0 0 0 NaN \n", + "7 1 1 ... 0 0 0 NaN \n", + "8 1 1 ... 0 0 0 NaN \n", + "9 1 5 ... 0 0 0 NaN \n", + "10 1 0 ... 0 0 0 NaN \n", + "11 1 0 ... 0 0 0 NaN \n", + "12 1 0 ... 0 0 0 NaN \n", + "13 1 0 ... 0 0 0 NaN \n", + "14 1 0 ... 0 0 0 NaN \n", + "15 1 0 ... 0 0 0 NaN \n", + "16 1 0 ... 0 0 0 NaN \n", + "17 1 1 ... 0 0 0 NaN \n", + "18 1 1 ... 0 0 0 NaN \n", + "19 1 1 ... 0 0 0 NaN \n", + "20 1 1 ... 0 0 0 NaN \n", + "21 1 1 ... 0 0 0 NaN \n", + "22 1 1 ... 0 0 0 NaN \n", + "23 1 1 ... 0 0 0 NaN \n", + "\n", + " osm_node_id drive_node walk_node bike_node X Y \n", + "0 NaN NaN NaN NaN NaN NaN \n", + "1 NaN NaN NaN NaN NaN NaN \n", + "2 NaN NaN NaN NaN NaN NaN \n", + "3 NaN NaN NaN NaN NaN NaN \n", + "4 NaN NaN NaN NaN NaN NaN \n", + "5 NaN NaN NaN NaN NaN NaN \n", + "6 NaN NaN NaN NaN NaN NaN \n", + "7 NaN NaN NaN NaN NaN NaN \n", + "8 NaN NaN NaN NaN NaN NaN \n", + "9 NaN NaN NaN NaN NaN NaN \n", + "10 NaN NaN NaN NaN NaN NaN \n", + "11 NaN NaN NaN NaN NaN NaN \n", + "12 NaN NaN NaN NaN NaN NaN \n", + "13 NaN NaN NaN NaN NaN NaN \n", + "14 NaN NaN NaN NaN NaN NaN \n", + "15 NaN NaN NaN NaN NaN NaN \n", + "16 NaN NaN NaN NaN NaN NaN \n", + "17 NaN NaN NaN NaN NaN NaN \n", + "18 NaN NaN NaN NaN NaN NaN \n", + "19 NaN NaN NaN NaN NaN NaN \n", + "20 NaN NaN NaN NaN NaN NaN \n", + "21 NaN NaN NaN NaN NaN NaN \n", + "22 NaN NaN NaN NaN NaN NaN \n", + "23 NaN NaN NaN NaN NaN NaN \n", + "\n", + "[24 rows x 88 columns]" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "i394e_roadway_project.roadway_changes" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-05-19 13:53:39, INFO: Wrote project card to: C:\\projects\\met_council_git\\data\\interim\\project_cards\\i394_reversible_managed_lane.yml\n" + ] + } + ], + "source": [ + "i394e_roadway_project.write_project_card(\n", + " os.path.join(INTERIM_DIR,\"project_cards\", \"i394_reversible_managed_lane.yml\")\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "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.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}