diff --git a/project_prioritization/metrics/metrics_testing_land_use.ipynb b/project_prioritization/metrics/metrics_testing_land_use.ipynb new file mode 100644 index 000000000..fbb4f61c1 --- /dev/null +++ b/project_prioritization/metrics/metrics_testing_land_use.ipynb @@ -0,0 +1,3706 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "0a4d9418-3035-4511-bdde-8def6baa892d", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.9/site-packages/geopandas/_compat.py:124: UserWarning: The Shapely GEOS version (3.11.1-CAPI-1.17.1) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.\n", + " warnings.warn(\n", + "/tmp/ipykernel_372/1249887178.py:3: DeprecationWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas still uses PyGEOS by default. However, starting with version 0.14, the default will switch to Shapely. To force to use Shapely 2.0 now, you can either uninstall PyGEOS or set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:\n", + "\n", + "import os\n", + "os.environ['USE_PYGEOS'] = '0'\n", + "import geopandas\n", + "\n", + "In the next release, GeoPandas will switch to using Shapely by default, even if PyGEOS is installed. If you only have PyGEOS installed to get speed-ups, this switch should be smooth. However, if you are using PyGEOS directly (calling PyGEOS functions on geometries from GeoPandas), this will then stop working and you are encouraged to migrate from PyGEOS to Shapely 2.0 (https://shapely.readthedocs.io/en/latest/migration_pygeos.html).\n", + " import geopandas as gpd\n" + ] + } + ], + "source": [ + "# header info\n", + "import pandas as pd\n", + "import geopandas as gpd\n", + "from siuba import *\n", + "import numpy as np\n", + "from shared_utils import utils, geography_utils\n", + "pd.options.display.max_columns = 100\n", + "import gcsfs\n", + "from calitp_data_analysis.sql import to_snakecase\n", + "from calitp_data_analysis import get_fs\n", + "fs = get_fs()\n", + "\n", + "GCS_FILE_PATH = \"gs://calitp-analytics-data/data-analyses/project_prioritization/\"" + ] + }, + { + "cell_type": "markdown", + "id": "aa94981f-da47-40e2-8786-6bb717bccf57", + "metadata": {}, + "source": [ + "# CSIS Data Entry Scoring - Land Use\n", + "\n", + "## Part 1: Evaluate Urban/Rural" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "67749d7c-fc53-49c1-9d6c-b9be1fcd740a", + "metadata": {}, + "outputs": [], + "source": [ + "# read in project locations\n", + "project_geo = gpd.read_parquet(f'{GCS_FILE_PATH}Survey123_Geo/cleaned_survey123_sample13.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "4a133894-fbac-4c72-8d8d-71e4686846ed", + "metadata": {}, + "outputs": [], + "source": [ + "# Update projection/crs and units\n", + "project_geo = project_geo.to_crs(geography_utils.CA_NAD83Albers)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "dbf51379-aaf2-4c7d-899b-bf59222efb7f", + "metadata": {}, + "outputs": [], + "source": [ + "# buffer 100 ft (30m)\n", + "project_geo['b100'] = project_geo.buffer(30)\n", + "project_geo = project_geo.set_geometry('b100')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "cb2ca859-4bd3-4289-909f-2384b1eeee32", + "metadata": {}, + "outputs": [], + "source": [ + "# dissolve by project\n", + "project_geo_dissolve = project_geo.dissolve('projname').reset_index()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "48da0f62-3494-46e6-8b96-d3c4e1fe32a0", + "metadata": {}, + "outputs": [], + "source": [ + "# load in combined urbanized areas (PRC 21071, PRC 21094.5, Census-based)\n", + "with get_fs().open(f'{GCS_FILE_PATH}combined_urbanized_areas.geojson') as f:\n", + " urbanized_areas = gpd.read_file(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "8ad796ed-31b5-48f2-8c2f-893a54865e92", + "metadata": {}, + "outputs": [], + "source": [ + "# we only need 1 observation, dissolve\n", + "urbanized_areas = urbanized_areas.dissolve()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "1b6b4860-188c-43ff-9e48-35fa4581ad67", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "urbanized_areas.explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "5b68b2a6-051e-462e-b515-1e29763b44be", + "metadata": {}, + "outputs": [], + "source": [ + "# use overlay to get (portions of) urban projects\n", + "projects_urban = project_geo_dissolve.overlay(urbanized_areas, how = \"intersection\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "bfa7b24a-e8c1-4aec-acf5-782bd5e6b52f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "44" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# most projects are urban\n", + "len(projects_urban)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "adc473b9-c1d9-421a-8686-07739042fc9a", + "metadata": {}, + "outputs": [], + "source": [ + "# get rural projects\n", + "projects_rural = anti_join(project_geo_dissolve, projects_urban, on=\"projname\")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "552e9400-fb6d-4052-9c76-121ee1792651", + "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", + "
projnameb100parentglobalidlyr_globalidlyrlnsptsct_districtefiseappnogeopoint_typegeopoint_type_existinggeopoint_commentscreatoreditorgeometryshape_length
16Konocti Corridor - Segment 2BPOLYGON ((-237991.831 105295.059, -237421.066 ...{7B1866C2-C823-465C-8018-82E621163252}{37E641AD-A93C-417F-8418-DE95E318A13C}Lns110010118000079298313121Highway (Freight)NoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((-238496.799 105667.385 0.0...6210.117839
26SR 58 Mobility Improvements – Location 2POLYGON ((123545.468 -305121.072, 123955.277 -...{F2B557A2-AC0D-48F5-8AC9-DAC84B05B1BB}{59B60650-7BCE-4280-82A7-BB3E0CF46DCB}Lns110090919000011379602664Truck-only LaneNoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((123047.288 -305020.552 0.0...3225.275777
28SR-46 East Antelope Grade Corridor ImprovementsMULTIPOLYGON (((-32487.020 -261195.838, -32487...{E4347304-4E16-4A8B-863E-DA9803613956}{E4347304-4E16-4A8B-863E-DA9803613956}Pts111060523000028; 05230000293307D; 1Q4300226M; 3110Highway (Freight)NoneLocation provides a safe roadside rest areas f...larissa.lee_caltransS148009POINT Z (-32516.876 -261192.897 0.000)0.000000
37The Desert Rail Infrastructure ImprovementPOLYGON ((426460.031 -389387.739, 426462.074 -...{204EA23D-DA1D-46C4-8E1A-7068C016C7A8}{8F7D8702-5490-4437-8DA7-DD0C9F390B2C}Lns11008NoneNoneNoneRail (Freight)NoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((423840.597 -388419.800 0.0...86683.599247
\n", + "
" + ], + "text/plain": [ + " projname \\\n", + "16 Konocti Corridor - Segment 2B \n", + "26 SR 58 Mobility Improvements – Location 2 \n", + "28 SR-46 East Antelope Grade Corridor Improvements \n", + "37 The Desert Rail Infrastructure Improvement \n", + "\n", + " b100 \\\n", + "16 POLYGON ((-237991.831 105295.059, -237421.066 ... \n", + "26 POLYGON ((123545.468 -305121.072, 123955.277 -... \n", + "28 MULTIPOLYGON (((-32487.020 -261195.838, -32487... \n", + "37 POLYGON ((426460.031 -389387.739, 426462.074 -... \n", + "\n", + " parentglobalid \\\n", + "16 {7B1866C2-C823-465C-8018-82E621163252} \n", + "26 {F2B557A2-AC0D-48F5-8AC9-DAC84B05B1BB} \n", + "28 {E4347304-4E16-4A8B-863E-DA9803613956} \n", + "37 {204EA23D-DA1D-46C4-8E1A-7068C016C7A8} \n", + "\n", + " lyr_globalid lyr lns pts ct_district \\\n", + "16 {37E641AD-A93C-417F-8418-DE95E318A13C} Lns1 1 0 01 \n", + "26 {59B60650-7BCE-4280-82A7-BB3E0CF46DCB} Lns1 1 0 09 \n", + "28 {E4347304-4E16-4A8B-863E-DA9803613956} Pts1 1 1 06 \n", + "37 {8F7D8702-5490-4437-8DA7-DD0C9F390B2C} Lns1 1 0 08 \n", + "\n", + " efis ea ppno geopoint_type \\\n", + "16 0118000079 29831 3121 Highway (Freight) \n", + "26 0919000011 37960 2664 Truck-only Lane \n", + "28 0523000028; 0523000029 3307D; 1Q430 0226M; 3110 Highway (Freight) \n", + "37 None None None Rail (Freight) \n", + "\n", + " geopoint_type_existing geopoint_comments \\\n", + "16 None None \n", + "26 None None \n", + "28 None Location provides a safe roadside rest areas f... \n", + "37 None None \n", + "\n", + " creator editor \\\n", + "16 larissa.lee_caltrans S148009 \n", + "26 larissa.lee_caltrans S148009 \n", + "28 larissa.lee_caltrans S148009 \n", + "37 larissa.lee_caltrans S148009 \n", + "\n", + " geometry shape_length \n", + "16 MULTILINESTRING Z ((-238496.799 105667.385 0.0... 6210.117839 \n", + "26 MULTILINESTRING Z ((123047.288 -305020.552 0.0... 3225.275777 \n", + "28 POINT Z (-32516.876 -261192.897 0.000) 0.000000 \n", + "37 MULTILINESTRING Z ((423840.597 -388419.800 0.0... 86683.599247 " + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "projects_rural" + ] + }, + { + "cell_type": "markdown", + "id": "2434d9b4-cde2-4ac1-adb9-8e2ab3d995f1", + "metadata": {}, + "source": [ + "## Part 2: Score Rural Projects on Natural Resouce protection" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "eb89a1fd-d5f1-4c33-a81e-6715dd54efa8", + "metadata": {}, + "outputs": [], + "source": [ + "# read in data entry\n", + "landuse_raw = pd.read_parquet(f'{GCS_FILE_PATH}data_entry_raw_land_use.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "80c28ac1-9a8f-43c2-998e-65a6d9db2519", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_rural = pd.merge(projects_rural, landuse_raw, how='inner', left_on='projname', right_on='project_name')" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "3c149d50-8d47-4366-813a-68ec65a4ac69", + "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", + "
projnameb100parentglobalidlyr_globalidlyrlnsptsct_districtefiseappnogeopoint_typegeopoint_type_existinggeopoint_commentscreatoreditorgeometryshape_lengthsubmission_log_numberprogramproject_namedata_enterer_namedone_y_nnotesincrease_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stoptransit_operatorrelevant_transit_routessupporting_non_sov_infrastructurehas_significant_natural_resource_enhancement_elementhas_natural_resource_protecting_mitigation
0Konocti Corridor - Segment 2BPOLYGON ((-237991.831 105295.059, -237421.066 ...{7B1866C2-C823-465C-8018-82E621163252}{37E641AD-A93C-417F-8418-DE95E318A13C}Lns110010118000079298313121Highway (Freight)NoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((-238496.799 105667.385 0.0...6210.11783918TCEPKonocti Corridor - Segment 2BKatrinaYNoneNNoneNoneNoneRealign freeway further from endangered plants...None
1SR 58 Mobility Improvements – Location 2POLYGON ((123545.468 -305121.072, 123955.277 -...{F2B557A2-AC0D-48F5-8AC9-DAC84B05B1BB}{59B60650-7BCE-4280-82A7-BB3E0CF46DCB}Lns110090919000011379602664Truck-only LaneNoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((123047.288 -305020.552 0.0...3225.2757778TCEPSR 58 Mobility Improvements – Location 2DestinyYUnsure if a truck climbing lane (which will su...NNoneNoneUnclearYes; will support a wildlife crossing.None
2SR-46 East Antelope Grade Corridor ImprovementsMULTIPOLYGON (((-32487.020 -261195.838, -32487...{E4347304-4E16-4A8B-863E-DA9803613956}{E4347304-4E16-4A8B-863E-DA9803613956}Pts111060523000028; 05230000293307D; 1Q4300226M; 3110Highway (Freight)NoneLocation provides a safe roadside rest areas f...larissa.lee_caltransS148009POINT Z (-32516.876 -261192.897 0.000)0.00000017TCEPSR-46 East Antelope Grade Corridor ImprovementsKatrinaYNoneNNoneNoneNoneWildlife crossingsNone
3The Desert Rail Infrastructure ImprovementPOLYGON ((426460.031 -389387.739, 426462.074 -...{204EA23D-DA1D-46C4-8E1A-7068C016C7A8}{8F7D8702-5490-4437-8DA7-DD0C9F390B2C}Lns11008NoneNoneNoneRail (Freight)NoneNonelarissa.lee_caltransS148009MULTILINESTRING Z ((423840.597 -388419.800 0.0...86683.5992479TCEPThe Desert Rail Infrastructure ImprovementDestinyYUnclear if the improvements qualify for suppor...NNoneNoneUnclearNoneNone
\n", + "
" + ], + "text/plain": [ + " projname \\\n", + "0 Konocti Corridor - Segment 2B \n", + "1 SR 58 Mobility Improvements – Location 2 \n", + "2 SR-46 East Antelope Grade Corridor Improvements \n", + "3 The Desert Rail Infrastructure Improvement \n", + "\n", + " b100 \\\n", + "0 POLYGON ((-237991.831 105295.059, -237421.066 ... \n", + "1 POLYGON ((123545.468 -305121.072, 123955.277 -... \n", + "2 MULTIPOLYGON (((-32487.020 -261195.838, -32487... \n", + "3 POLYGON ((426460.031 -389387.739, 426462.074 -... \n", + "\n", + " parentglobalid \\\n", + "0 {7B1866C2-C823-465C-8018-82E621163252} \n", + "1 {F2B557A2-AC0D-48F5-8AC9-DAC84B05B1BB} \n", + "2 {E4347304-4E16-4A8B-863E-DA9803613956} \n", + "3 {204EA23D-DA1D-46C4-8E1A-7068C016C7A8} \n", + "\n", + " lyr_globalid lyr lns pts ct_district \\\n", + "0 {37E641AD-A93C-417F-8418-DE95E318A13C} Lns1 1 0 01 \n", + "1 {59B60650-7BCE-4280-82A7-BB3E0CF46DCB} Lns1 1 0 09 \n", + "2 {E4347304-4E16-4A8B-863E-DA9803613956} Pts1 1 1 06 \n", + "3 {8F7D8702-5490-4437-8DA7-DD0C9F390B2C} Lns1 1 0 08 \n", + "\n", + " efis ea ppno geopoint_type \\\n", + "0 0118000079 29831 3121 Highway (Freight) \n", + "1 0919000011 37960 2664 Truck-only Lane \n", + "2 0523000028; 0523000029 3307D; 1Q430 0226M; 3110 Highway (Freight) \n", + "3 None None None Rail (Freight) \n", + "\n", + " geopoint_type_existing geopoint_comments \\\n", + "0 None None \n", + "1 None None \n", + "2 None Location provides a safe roadside rest areas f... \n", + "3 None None \n", + "\n", + " creator editor \\\n", + "0 larissa.lee_caltrans S148009 \n", + "1 larissa.lee_caltrans S148009 \n", + "2 larissa.lee_caltrans S148009 \n", + "3 larissa.lee_caltrans S148009 \n", + "\n", + " geometry shape_length \\\n", + "0 MULTILINESTRING Z ((-238496.799 105667.385 0.0... 6210.117839 \n", + "1 MULTILINESTRING Z ((123047.288 -305020.552 0.0... 3225.275777 \n", + "2 POINT Z (-32516.876 -261192.897 0.000) 0.000000 \n", + "3 MULTILINESTRING Z ((423840.597 -388419.800 0.0... 86683.599247 \n", + "\n", + " submission_log_number program \\\n", + "0 18 TCEP \n", + "1 8 TCEP \n", + "2 17 TCEP \n", + "3 9 TCEP \n", + "\n", + " project_name data_enterer_name done_y_n \\\n", + "0 Konocti Corridor - Segment 2B Katrina Y \n", + "1 SR 58 Mobility Improvements – Location 2 Destiny Y \n", + "2 SR-46 East Antelope Grade Corridor Improvements Katrina Y \n", + "3 The Desert Rail Infrastructure Improvement Destiny Y \n", + "\n", + " notes \\\n", + "0 None \n", + "1 Unsure if a truck climbing lane (which will su... \n", + "2 None \n", + "3 Unclear if the improvements qualify for suppor... \n", + "\n", + " increase_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stop \\\n", + "0 N \n", + "1 N \n", + "2 N \n", + "3 N \n", + "\n", + " transit_operator relevant_transit_routes supporting_non_sov_infrastructure \\\n", + "0 None None None \n", + "1 None None Unclear \n", + "2 None None None \n", + "3 None None Unclear \n", + "\n", + " has_significant_natural_resource_enhancement_element \\\n", + "0 Realign freeway further from endangered plants... \n", + "1 Yes; will support a wildlife crossing. \n", + "2 Wildlife crossings \n", + "3 None \n", + "\n", + " has_natural_resource_protecting_mitigation \n", + "0 None \n", + "1 None \n", + "2 None \n", + "3 None " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landuse_rural" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "448b7b7b-368b-4ea4-acbd-6cd4500baa0d", + "metadata": {}, + "outputs": [ + { + "ename": "DriverError", + "evalue": "Failed to read GeoJSON data", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mCPLE_OpenFailedError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32mfiona/ogrext.pyx:136\u001b[0m, in \u001b[0;36mfiona.ogrext.gdal_open_vector\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mfiona/_err.pyx:291\u001b[0m, in \u001b[0;36mfiona._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", + "\u001b[0;31mCPLE_OpenFailedError\u001b[0m: Failed to read GeoJSON data", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mDriverError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[16], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# load in protected development areas\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m get_fs()\u001b[38;5;241m.\u001b[39mopen(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mgs://calitp-analytics-data/data-analyses/project_prioritization/protected_area_development.geojson\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[0;32m----> 3\u001b[0m protected_areas \u001b[38;5;241m=\u001b[39m \u001b[43mgpd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_file\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/geopandas/io/file.py:281\u001b[0m, in \u001b[0;36m_read_file\u001b[0;34m(filename, bbox, mask, rows, engine, **kwargs)\u001b[0m\n\u001b[1;32m 278\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 279\u001b[0m path_or_bytes \u001b[38;5;241m=\u001b[39m filename\n\u001b[0;32m--> 281\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read_file_fiona\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 282\u001b[0m \u001b[43m \u001b[49m\u001b[43mpath_or_bytes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_bytes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbbox\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mbbox\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmask\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrows\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mrows\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\n\u001b[1;32m 283\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 285\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 286\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124munknown engine \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mengine\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", + "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/geopandas/io/file.py:322\u001b[0m, in \u001b[0;36m_read_file_fiona\u001b[0;34m(path_or_bytes, from_bytes, bbox, mask, rows, where, **kwargs)\u001b[0m\n\u001b[1;32m 319\u001b[0m reader \u001b[38;5;241m=\u001b[39m fiona\u001b[38;5;241m.\u001b[39mopen\n\u001b[1;32m 321\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m fiona_env():\n\u001b[0;32m--> 322\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[43mreader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath_or_bytes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m features:\n\u001b[1;32m 323\u001b[0m crs \u001b[38;5;241m=\u001b[39m features\u001b[38;5;241m.\u001b[39mcrs_wkt\n\u001b[1;32m 324\u001b[0m \u001b[38;5;66;03m# attempt to get EPSG code\u001b[39;00m\n", + "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/fiona/collection.py:783\u001b[0m, in \u001b[0;36mBytesCollection.__init__\u001b[0;34m(self, bytesbuf, **kwds)\u001b[0m\n\u001b[1;32m 780\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mvirtual_file \u001b[38;5;241m=\u001b[39m buffer_to_virtual_file(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbytesbuf, ext\u001b[38;5;241m=\u001b[39mext)\n\u001b[1;32m 782\u001b[0m \u001b[38;5;66;03m# Instantiate the parent class.\u001b[39;00m\n\u001b[0;32m--> 783\u001b[0m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[38;5;21;43m__init__\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvirtual_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvsi\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfiletype\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 784\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_closed \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n", + "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/fiona/collection.py:243\u001b[0m, in \u001b[0;36mCollection.__init__\u001b[0;34m(self, path, mode, driver, schema, crs, encoding, layer, vsi, archive, enabled_drivers, crs_wkt, ignore_fields, ignore_geometry, include_fields, wkt_version, allow_unsupported_drivers, **kwargs)\u001b[0m\n\u001b[1;32m 241\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmode \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 242\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msession \u001b[38;5;241m=\u001b[39m Session()\n\u001b[0;32m--> 243\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msession\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 244\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmode \u001b[38;5;129;01min\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124ma\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mw\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m 245\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msession \u001b[38;5;241m=\u001b[39m WritingSession()\n", + "File \u001b[0;32mfiona/ogrext.pyx:588\u001b[0m, in \u001b[0;36mfiona.ogrext.Session.start\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mfiona/ogrext.pyx:143\u001b[0m, in \u001b[0;36mfiona.ogrext.gdal_open_vector\u001b[0;34m()\u001b[0m\n", + "\u001b[0;31mDriverError\u001b[0m: Failed to read GeoJSON data" + ] + } + ], + "source": [ + "# load in protected development areas\n", + "with get_fs().open('gs://calitp-analytics-data/data-analyses/project_prioritization/protected_area_development.geojson') as f:\n", + " protected_areas = gpd.read_file(f)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a0d2e69f-9c9a-4dbf-9c59-5fccb134533d", + "metadata": {}, + "outputs": [], + "source": [ + "# check overlay with natural/working lands\n", + "# skip for now - hand code" + ] + }, + { + "cell_type": "markdown", + "id": "13d69e02-6d0a-4b96-add6-c4947e147430", + "metadata": {}, + "source": [ + "## Part 3: Score Urban Projects on HQTA" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "598d6ed3-32ef-4208-8e58-c74ec446d73a", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_hqta = landuse_raw[landuse_raw.increase_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stop==\"Y\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "39c7a67c-283c-46a1-b4d1-6691822622bc", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_hqta = pd.merge(projects_urban, landuse_hqta, how='inner', left_on='projname', right_on='project_name')" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "66afe748-3e20-41d1-acc7-2812dff739bc", + "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", + "
projnameparentglobalidlyr_globalidlyrlnsptsct_districtefiseappnogeopoint_typegeopoint_type_existinggeopoint_commentscreatoreditorgeometryshape_lengthOBJECTIDFID_urbanized_area_prc_21071_v1_0FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_2020namegeoidnamelsadb01003_001eFID_Unincorporated_Islands_CALFIRE_2021_with_Population_DissolveFID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_ISUM_POP10city_namecommunity_typearea_km2population_estimatepopulation_densitysurrounding_city_countsurrounding_population_listsurrounding_population_totalsurrounding_area_totalsurrounding_population_densityurbanized_area_prc_21071FID_2010_adjusted_urban_areaUACE10NAME10UATYP10INTPTLAT10INTPTLON10POPFID_urban_area_prc_21094_5_v1_0FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_20_2021name_1name_cbi_manual_changesstatefpplacefpplacensgeoid_1name_12namelsad_1lsadclassfppcicbsapcinectamtfccfuncstatalandawaterintptlatintptlonb01003_001e_1FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissol_1FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_1SUM_POP10_1city_name_1community_type_1area_km2_1population_estimate_1population_density_1surrounding_city_count_1surrounding_population_list_1surrounding_population_total_1surrounding_area_total_1surrounding_population_density_1urbanized_area_prc_21071_21072urban_area_prc_21094_5shape_Lengthshape_Areasubmission_log_numberprogramproject_namedata_enterer_namedone_y_nnotesincrease_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stoptransit_operatorrelevant_transit_routessupporting_non_sov_infrastructurehas_significant_natural_resource_enhancement_elementhas_natural_resource_protecting_mitigation
0Inglewood Transit Connector (ITC) Project{333E0540-05E5-4AD3-8F3D-BB5374413FDD}{333E0540-05E5-4AD3-8F3D-BB5374413FDD}Pts11307NoneNoneNoneHighwayTransitone of three station transit stationsdarleen.mendezS148009MULTIPOLYGON (((153124.823 -450479.693, 153123...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+075SCCPInglewood Transit Connector (ITC) ProjectHunterYNoneYIngelwood Train?the monorail? Do monorails count as HTQANoneNoneNone
1SMART Windsor Rail System Extension Project{28EA65CA-73AD-429D-8D72-AFAC9E383AC1}{D87CAD96-20E0-48CD-8217-08B56D0E57DF}Lns11004NoneNoneNoneRail (Passenger)NoneNonedarleen.mendezS148009POLYGON ((-245210.422 62643.997, -245211.636 6...6250.5110241-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+073SCCPSMART Windsor Rail System Extension ProjectHunterYNoneYSMARTThe trainnew train stopsNoneNone
2Watsonville-Santa Cruz Multimodal Corridor Pro...{10F7F2FB-78F5-4962-890D-84A2238ED6C4}{10F7F2FB-78F5-4962-890D-84A2238ED6C4}Pts14505NoneOC7340073DHighwayHighwayWiden Highway 1 Bridge over Aptos Creekdarleen.mendezS148009POLYGON ((-169142.966 -113801.095, -169139.980...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+072SCCPWatsonville-Santa Cruz Multimodal Corridor Pro...KatrinaYPreviously reviewedYSanta Cruz Metro69A, 69W, 71, 91Xtransit: bus on shoulder; active transportatio...Nonesalamander fencing
3Yolo 80 / US 50 Managed Lanes{FCFC6622-3497-4894-89DB-AD0316E52AD7}{3219C8DA-DAA2-47FC-8B95-3DC6AC59FCFA}Lns1100303180000853H9008922Managed LanesNoneNonelarissa.lee_caltransS148009MULTIPOLYGON (((-137283.856 63197.847, -137282...27444.4975301-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+0724TCEPYolo 80 / US 50 Managed LanesDestinyYWill construct a Park and Ride facility with a...YYCTD, Sacramento Regional Transit, and other t...New transit stop at proposed Park and Ride Fac...Yes; tolled managed lanes and seperated bikewa...NoneNone
\n", + "
" + ], + "text/plain": [ + " projname \\\n", + "0 Inglewood Transit Connector (ITC) Project \n", + "1 SMART Windsor Rail System Extension Project \n", + "2 Watsonville-Santa Cruz Multimodal Corridor Pro... \n", + "3 Yolo 80 / US 50 Managed Lanes \n", + "\n", + " parentglobalid \\\n", + "0 {333E0540-05E5-4AD3-8F3D-BB5374413FDD} \n", + "1 {28EA65CA-73AD-429D-8D72-AFAC9E383AC1} \n", + "2 {10F7F2FB-78F5-4962-890D-84A2238ED6C4} \n", + "3 {FCFC6622-3497-4894-89DB-AD0316E52AD7} \n", + "\n", + " lyr_globalid lyr lns pts ct_district \\\n", + "0 {333E0540-05E5-4AD3-8F3D-BB5374413FDD} Pts1 1 3 07 \n", + "1 {D87CAD96-20E0-48CD-8217-08B56D0E57DF} Lns1 1 0 04 \n", + "2 {10F7F2FB-78F5-4962-890D-84A2238ED6C4} Pts1 4 5 05 \n", + "3 {3219C8DA-DAA2-47FC-8B95-3DC6AC59FCFA} Lns1 1 0 03 \n", + "\n", + " efis ea ppno geopoint_type geopoint_type_existing \\\n", + "0 None None None Highway Transit \n", + "1 None None None Rail (Passenger) None \n", + "2 None OC734 0073D Highway Highway \n", + "3 0318000085 3H900 8922 Managed Lanes None \n", + "\n", + " geopoint_comments creator editor \\\n", + "0 one of three station transit stations darleen.mendez S148009 \n", + "1 None darleen.mendez S148009 \n", + "2 Widen Highway 1 Bridge over Aptos Creek darleen.mendez S148009 \n", + "3 None larissa.lee_caltrans S148009 \n", + "\n", + " geometry shape_length OBJECTID \\\n", + "0 MULTIPOLYGON (((153124.823 -450479.693, 153123... 0.000000 1 \n", + "1 POLYGON ((-245210.422 62643.997, -245211.636 6... 6250.511024 1 \n", + "2 POLYGON ((-169142.966 -113801.095, -169139.980... 0.000000 1 \n", + "3 MULTIPOLYGON (((-137283.856 63197.847, -137282... 27444.497530 1 \n", + "\n", + " FID_urbanized_area_prc_21071_v1_0 \\\n", + "0 -1 \n", + "1 -1 \n", + "2 -1 \n", + "3 -1 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_2020 name geoid \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " namelsad b01003_001e \\\n", + "0 \n", + "1 \n", + "2 \n", + "3 \n", + "\n", + " FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissolve \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_I \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " SUM_POP10 city_name community_type area_km2 population_estimate \\\n", + "0 0 0.0 0 \n", + "1 0 0.0 0 \n", + "2 0 0.0 0 \n", + "3 0 0.0 0 \n", + "\n", + " population_density surrounding_city_count surrounding_population_list \\\n", + "0 0.0 0 \n", + "1 0.0 0 \n", + "2 0.0 0 \n", + "3 0.0 0 \n", + "\n", + " surrounding_population_total surrounding_area_total \\\n", + "0 0.0 0.0 \n", + "1 0.0 0.0 \n", + "2 0.0 0.0 \n", + "3 0.0 0.0 \n", + "\n", + " surrounding_population_density urbanized_area_prc_21071 \\\n", + "0 0.0 0 \n", + "1 0.0 0 \n", + "2 0.0 0 \n", + "3 0.0 0 \n", + "\n", + " FID_2010_adjusted_urban_area UACE10 NAME10 UATYP10 INTPTLAT10 \\\n", + "0 0 02683 Antioch, CA U +37.9916865 \n", + "1 0 02683 Antioch, CA U +37.9916865 \n", + "2 0 02683 Antioch, CA U +37.9916865 \n", + "3 0 02683 Antioch, CA U +37.9916865 \n", + "\n", + " INTPTLON10 POP FID_urban_area_prc_21094_5_v1_0 \\\n", + "0 -121.7821203 277634 -1 \n", + "1 -121.7821203 277634 -1 \n", + "2 -121.7821203 277634 -1 \n", + "3 -121.7821203 277634 -1 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_20_2021 name_1 \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " name_cbi_manual_changes statefp placefp placens geoid_1 name_12 namelsad_1 \\\n", + "0 \n", + "1 \n", + "2 \n", + "3 \n", + "\n", + " lsad classfp pcicbsa pcinecta mtfcc funcstat aland awater intptlat \\\n", + "0 0 0 \n", + "1 0 0 \n", + "2 0 0 \n", + "3 0 0 \n", + "\n", + " intptlon b01003_001e_1 \\\n", + "0 \n", + "1 \n", + "2 \n", + "3 \n", + "\n", + " FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissol_1 \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_1 \\\n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "\n", + " SUM_POP10_1 city_name_1 community_type_1 area_km2_1 \\\n", + "0 0 0.0 \n", + "1 0 0.0 \n", + "2 0 0.0 \n", + "3 0 0.0 \n", + "\n", + " population_estimate_1 population_density_1 surrounding_city_count_1 \\\n", + "0 0 0.0 0 \n", + "1 0 0.0 0 \n", + "2 0 0.0 0 \n", + "3 0 0.0 0 \n", + "\n", + " surrounding_population_list_1 surrounding_population_total_1 \\\n", + "0 0.0 \n", + "1 0.0 \n", + "2 0.0 \n", + "3 0.0 \n", + "\n", + " surrounding_area_total_1 surrounding_population_density_1 \\\n", + "0 0.0 0.0 \n", + "1 0.0 0.0 \n", + "2 0.0 0.0 \n", + "3 0.0 0.0 \n", + "\n", + " urbanized_area_prc_21071_21072 urban_area_prc_21094_5 shape_Length \\\n", + "0 0 0 264697.838868 \n", + "1 0 0 264697.838868 \n", + "2 0 0 264697.838868 \n", + "3 0 0 264697.838868 \n", + "\n", + " shape_Area submission_log_number program \\\n", + "0 7.144355e+07 5 SCCP \n", + "1 7.144355e+07 3 SCCP \n", + "2 7.144355e+07 2 SCCP \n", + "3 7.144355e+07 24 TCEP \n", + "\n", + " project_name data_enterer_name \\\n", + "0 Inglewood Transit Connector (ITC) Project Hunter \n", + "1 SMART Windsor Rail System Extension Project Hunter \n", + "2 Watsonville-Santa Cruz Multimodal Corridor Pro... Katrina \n", + "3 Yolo 80 / US 50 Managed Lanes Destiny \n", + "\n", + " done_y_n notes \\\n", + "0 Y None \n", + "1 Y None \n", + "2 Y Previously reviewed \n", + "3 Y Will construct a Park and Ride facility with a... \n", + "\n", + " increase_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stop \\\n", + "0 Y \n", + "1 Y \n", + "2 Y \n", + "3 Y \n", + "\n", + " transit_operator \\\n", + "0 Ingelwood Train? \n", + "1 SMART \n", + "2 Santa Cruz Metro \n", + "3 YCTD, Sacramento Regional Transit, and other t... \n", + "\n", + " relevant_transit_routes \\\n", + "0 the monorail? Do monorails count as HTQA \n", + "1 The train \n", + "2 69A, 69W, 71, 91X \n", + "3 New transit stop at proposed Park and Ride Fac... \n", + "\n", + " supporting_non_sov_infrastructure \\\n", + "0 None \n", + "1 new train stops \n", + "2 transit: bus on shoulder; active transportatio... \n", + "3 Yes; tolled managed lanes and seperated bikewa... \n", + "\n", + " has_significant_natural_resource_enhancement_element \\\n", + "0 None \n", + "1 None \n", + "2 None \n", + "3 None \n", + "\n", + " has_natural_resource_protecting_mitigation \n", + "0 None \n", + "1 None \n", + "2 salamander fencing \n", + "3 None " + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landuse_hqta" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ef34dbcd-a6d3-4fb4-a66b-6852f87aefc8", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_hqta.explore()" + ] + }, + { + "cell_type": "markdown", + "id": "f9ec002d-932f-44d7-ab8e-4d3902bc7a58", + "metadata": {}, + "source": [ + "Toss Yolo I-80/US-50. This would be a 1 (managed lanes). ITC and Watsonville-SC are 5 (new HQTA corridors), SMART is a 4 (new HQT Stop)" + ] + }, + { + "cell_type": "markdown", + "id": "9f5dbbdd-ec7e-450f-9dbc-dc45e758172f", + "metadata": {}, + "source": [ + "## Part 4: Score remaining urban projects" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "edbda7aa-edf0-42cc-937d-142092b4c4ee", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_urban = pd.merge(projects_urban, landuse_raw, how='inner', left_on='projname', right_on='project_name')" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c99d1481-6e4e-451e-bdc3-eaa1f00790dd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "41" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(landuse_urban)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "8d6b898d-d985-4e80-abaf-721fd9413d20", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_urban_nohqta = landuse_urban[landuse_urban.increase_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stop==\"N\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "83669045-f045-4220-960d-ab789c6c7c02", + "metadata": {}, + "outputs": [], + "source": [ + "check = anti_join(landuse_urban, landuse_urban_nohqta, on=[\"project_name\",\"projname\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "4431bc52-5dec-4246-9663-b2bd812a46e2", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
projnameparentglobalidlyr_globalidlyrlnsptsct_districtefiseappnogeopoint_typegeopoint_type_existinggeopoint_commentscreatoreditorgeometryshape_lengthOBJECTIDFID_urbanized_area_prc_21071_v1_0FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_2020namegeoidnamelsadb01003_001eFID_Unincorporated_Islands_CALFIRE_2021_with_Population_DissolveFID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_ISUM_POP10city_namecommunity_typearea_km2population_estimatepopulation_densitysurrounding_city_countsurrounding_population_listsurrounding_population_totalsurrounding_area_totalsurrounding_population_densityurbanized_area_prc_21071FID_2010_adjusted_urban_areaUACE10NAME10UATYP10INTPTLAT10INTPTLON10POPFID_urban_area_prc_21094_5_v1_0FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_20_2021name_1name_cbi_manual_changesstatefpplacefpplacensgeoid_1name_12namelsad_1lsadclassfppcicbsapcinectamtfccfuncstatalandawaterintptlatintptlonb01003_001e_1FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissol_1FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_1SUM_POP10_1city_name_1community_type_1area_km2_1population_estimate_1population_density_1surrounding_city_count_1surrounding_population_list_1surrounding_population_total_1surrounding_area_total_1surrounding_population_density_1urbanized_area_prc_21071_21072urban_area_prc_21094_5shape_Lengthshape_Areasubmission_log_numberprogramproject_namedata_enterer_namedone_y_nnotesincrease_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stoptransit_operatorrelevant_transit_routessupporting_non_sov_infrastructurehas_significant_natural_resource_enhancement_elementhas_natural_resource_protecting_mitigation
0805-15 Transit Priority Connector{2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}{6FF1E341-976E-47E8-8B80-04A6C72283F7}Lns11011None2T366NoneTransitNoneNonedarleen.mendezS148009POLYGON ((270956.840 -582125.372, 271093.390 -...1461.3742041-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+0712SCCP805-15 Transit Priority ConnectorDestinyYPage 13 of narrative doc; PD: \"...includes fea...Maybe? Initially it appeared there would be no...NoneNoneSee notes for full project descriptionNoneNone
3Autonomous, Zero-Emission, On-Demand Transit T...{F843EDA4-D23C-4B9C-85BB-949F62B7A7AA}{F843EDA4-D23C-4B9C-85BB-949F62B7A7AA}Pts11208NoneNoneNoneRail (Passenger)NoneProposed Transit Stationlarissa.lee_caltransS148009POLYGON ((221711.842 -436621.345, 221709.865 -...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+070SCCPAutonomous, Zero-Emission, On-Demand Transit T...KatrinaNoneNoneNoneNoneNoneNoneNoneNone
4Capital City Freeway Managed Lanes{1A01E2C9-91F2-4237-8B94-2B00D6C5D099}{1A01E2C9-91F2-4237-8B94-2B00D6C5D099}Pts13803NoneNoneNoneHighwayHighwayB st. underpass replacedarleen.mendezS148009POLYGON ((-127266.862 63842.672, -127268.120 6...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+070TCEPCapital City Freeway Managed LanesKatrinaYMention of increased transit schedule frequenc...?NoneNoneNoneNoneNone
11I-710/I-5 Flyover Utilities Relocation and Con...{F7C71A5A-9600-4CD5-8139-33E1ED9F95D5}{F7C71A5A-9600-4CD5-8139-33E1ED9F95D5}Pts11207NoneNoneNoneRail (Passenger)Highway (Freight)Project will be relocating and constructing Tr...larissa.lee_caltransS148009MULTIPOLYGON (((171121.119 -445397.309, 171118...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+070SCCPI-710/I-5 Flyover Utilities Relocation and Con...KatrinaNoneNoneNoneNoneNoneNoneNoneNone
13Inglewood Transit Connector (ITC) Project{333E0540-05E5-4AD3-8F3D-BB5374413FDD}{333E0540-05E5-4AD3-8F3D-BB5374413FDD}Pts11307NoneNoneNoneHighwayTransitone of three station transit stationsdarleen.mendezS148009MULTIPOLYGON (((153124.823 -450479.693, 153123...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+075SCCPInglewood Transit Connector (ITC) ProjectHunterYNoneYIngelwood Train?the monorail? Do monorails count as HTQANoneNoneNone
22SMART Windsor Rail System Extension Project{28EA65CA-73AD-429D-8D72-AFAC9E383AC1}{D87CAD96-20E0-48CD-8217-08B56D0E57DF}Lns11004NoneNoneNoneRail (Passenger)NoneNonedarleen.mendezS148009POLYGON ((-245210.422 62643.997, -245211.636 6...6250.5110241-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+073SCCPSMART Windsor Rail System Extension ProjectHunterYNoneYSMARTThe trainnew train stopsNoneNone
28Silicon Valley Express Lanes Program – Phase 5{5EBF7813-5EC3-416D-85A6-4CBEFF68F328}{FDE83E6E-23B6-4A42-846D-6E740BED0198}Lns1100404170002331K5532015HHOV+2NoneNonelarissa.lee_caltransS148009POLYGON ((-177443.341 -67227.181, -173394.131 ...15854.3118851-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+0720SCCPSilicon Valley Express Lanes Program – Phase 5KatrinaNoneNoneNoneNoneNoneNoneNoneNone
31State Route 241 to State Route 91 Express Lane...{C4286BCC-3429-4FD4-87E7-04CF115B6965}{CF745493-4827-452C-8F76-D23035A9F5C5}Lns1101212000200970K970NoneManaged LanesNoneNonelarissa.lee_caltransS148009POLYGON ((211250.756 -459012.036, 211251.456 -...4505.3612591-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+070SCCPState Route 241 to State Route 91 Express Lane...KatrinaNoneNoneNoneNoneNoneNoneNoneNone
38Watsonville-Santa Cruz Multimodal Corridor Pro...{10F7F2FB-78F5-4962-890D-84A2238ED6C4}{10F7F2FB-78F5-4962-890D-84A2238ED6C4}Pts14505NoneOC7340073DHighwayHighwayWiden Highway 1 Bridge over Aptos Creekdarleen.mendezS148009POLYGON ((-169142.966 -113801.095, -169139.980...0.0000001-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+072SCCPWatsonville-Santa Cruz Multimodal Corridor Pro...KatrinaYPreviously reviewedYSanta Cruz Metro69A, 69W, 71, 91Xtransit: bus on shoulder; active transportatio...Nonesalamander fencing
40Yolo 80 / US 50 Managed Lanes{FCFC6622-3497-4894-89DB-AD0316E52AD7}{3219C8DA-DAA2-47FC-8B95-3DC6AC59FCFA}Lns1100303180000853H9008922Managed LanesNoneNonelarissa.lee_caltransS148009MULTIPOLYGON (((-137283.856 63197.847, -137282...27444.4975301-100000.000.000.00.00.00002683Antioch, CAU+37.9916865-121.7821203277634-10000000.000.000.00.00.000264697.8388687.144355e+0724TCEPYolo 80 / US 50 Managed LanesDestinyYWill construct a Park and Ride facility with a...YYCTD, Sacramento Regional Transit, and other t...New transit stop at proposed Park and Ride Fac...Yes; tolled managed lanes and seperated bikewa...NoneNone
\n", + "
" + ], + "text/plain": [ + " projname \\\n", + "0 805-15 Transit Priority Connector \n", + "3 Autonomous, Zero-Emission, On-Demand Transit T... \n", + "4 Capital City Freeway Managed Lanes \n", + "11 I-710/I-5 Flyover Utilities Relocation and Con... \n", + "13 Inglewood Transit Connector (ITC) Project \n", + "22 SMART Windsor Rail System Extension Project \n", + "28 Silicon Valley Express Lanes Program – Phase 5 \n", + "31 State Route 241 to State Route 91 Express Lane... \n", + "38 Watsonville-Santa Cruz Multimodal Corridor Pro... \n", + "40 Yolo 80 / US 50 Managed Lanes \n", + "\n", + " parentglobalid \\\n", + "0 {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6} \n", + "3 {F843EDA4-D23C-4B9C-85BB-949F62B7A7AA} \n", + "4 {1A01E2C9-91F2-4237-8B94-2B00D6C5D099} \n", + "11 {F7C71A5A-9600-4CD5-8139-33E1ED9F95D5} \n", + "13 {333E0540-05E5-4AD3-8F3D-BB5374413FDD} \n", + "22 {28EA65CA-73AD-429D-8D72-AFAC9E383AC1} \n", + "28 {5EBF7813-5EC3-416D-85A6-4CBEFF68F328} \n", + "31 {C4286BCC-3429-4FD4-87E7-04CF115B6965} \n", + "38 {10F7F2FB-78F5-4962-890D-84A2238ED6C4} \n", + "40 {FCFC6622-3497-4894-89DB-AD0316E52AD7} \n", + "\n", + " lyr_globalid lyr lns pts ct_district \\\n", + "0 {6FF1E341-976E-47E8-8B80-04A6C72283F7} Lns1 1 0 11 \n", + "3 {F843EDA4-D23C-4B9C-85BB-949F62B7A7AA} Pts1 1 2 08 \n", + "4 {1A01E2C9-91F2-4237-8B94-2B00D6C5D099} Pts1 3 8 03 \n", + "11 {F7C71A5A-9600-4CD5-8139-33E1ED9F95D5} Pts1 1 2 07 \n", + "13 {333E0540-05E5-4AD3-8F3D-BB5374413FDD} Pts1 1 3 07 \n", + "22 {D87CAD96-20E0-48CD-8217-08B56D0E57DF} Lns1 1 0 04 \n", + "28 {FDE83E6E-23B6-4A42-846D-6E740BED0198} Lns1 1 0 04 \n", + "31 {CF745493-4827-452C-8F76-D23035A9F5C5} Lns1 1 0 12 \n", + "38 {10F7F2FB-78F5-4962-890D-84A2238ED6C4} Pts1 4 5 05 \n", + "40 {3219C8DA-DAA2-47FC-8B95-3DC6AC59FCFA} Lns1 1 0 03 \n", + "\n", + " efis ea ppno geopoint_type geopoint_type_existing \\\n", + "0 None 2T366 None Transit None \n", + "3 None None None Rail (Passenger) None \n", + "4 None None None Highway Highway \n", + "11 None None None Rail (Passenger) Highway (Freight) \n", + "13 None None None Highway Transit \n", + "22 None None None Rail (Passenger) None \n", + "28 0417000233 1K553 2015H HOV+2 None \n", + "31 1200020097 0K970 None Managed Lanes None \n", + "38 None OC734 0073D Highway Highway \n", + "40 0318000085 3H900 8922 Managed Lanes None \n", + "\n", + " geopoint_comments creator \\\n", + "0 None darleen.mendez \n", + "3 Proposed Transit Station larissa.lee_caltrans \n", + "4 B st. underpass replace darleen.mendez \n", + "11 Project will be relocating and constructing Tr... larissa.lee_caltrans \n", + "13 one of three station transit stations darleen.mendez \n", + "22 None darleen.mendez \n", + "28 None larissa.lee_caltrans \n", + "31 None larissa.lee_caltrans \n", + "38 Widen Highway 1 Bridge over Aptos Creek darleen.mendez \n", + "40 None larissa.lee_caltrans \n", + "\n", + " editor geometry shape_length \\\n", + "0 S148009 POLYGON ((270956.840 -582125.372, 271093.390 -... 1461.374204 \n", + "3 S148009 POLYGON ((221711.842 -436621.345, 221709.865 -... 0.000000 \n", + "4 S148009 POLYGON ((-127266.862 63842.672, -127268.120 6... 0.000000 \n", + "11 S148009 MULTIPOLYGON (((171121.119 -445397.309, 171118... 0.000000 \n", + "13 S148009 MULTIPOLYGON (((153124.823 -450479.693, 153123... 0.000000 \n", + "22 S148009 POLYGON ((-245210.422 62643.997, -245211.636 6... 6250.511024 \n", + "28 S148009 POLYGON ((-177443.341 -67227.181, -173394.131 ... 15854.311885 \n", + "31 S148009 POLYGON ((211250.756 -459012.036, 211251.456 -... 4505.361259 \n", + "38 S148009 POLYGON ((-169142.966 -113801.095, -169139.980... 0.000000 \n", + "40 S148009 MULTIPOLYGON (((-137283.856 63197.847, -137282... 27444.497530 \n", + "\n", + " OBJECTID FID_urbanized_area_prc_21071_v1_0 \\\n", + "0 1 -1 \n", + "3 1 -1 \n", + "4 1 -1 \n", + "11 1 -1 \n", + "13 1 -1 \n", + "22 1 -1 \n", + "28 1 -1 \n", + "31 1 -1 \n", + "38 1 -1 \n", + "40 1 -1 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_2020 name geoid \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " namelsad b01003_001e \\\n", + "0 \n", + "3 \n", + "4 \n", + "11 \n", + "13 \n", + "22 \n", + "28 \n", + "31 \n", + "38 \n", + "40 \n", + "\n", + " FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissolve \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_I \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " SUM_POP10 city_name community_type area_km2 population_estimate \\\n", + "0 0 0.0 0 \n", + "3 0 0.0 0 \n", + "4 0 0.0 0 \n", + "11 0 0.0 0 \n", + "13 0 0.0 0 \n", + "22 0 0.0 0 \n", + "28 0 0.0 0 \n", + "31 0 0.0 0 \n", + "38 0 0.0 0 \n", + "40 0 0.0 0 \n", + "\n", + " population_density surrounding_city_count surrounding_population_list \\\n", + "0 0.0 0 \n", + "3 0.0 0 \n", + "4 0.0 0 \n", + "11 0.0 0 \n", + "13 0.0 0 \n", + "22 0.0 0 \n", + "28 0.0 0 \n", + "31 0.0 0 \n", + "38 0.0 0 \n", + "40 0.0 0 \n", + "\n", + " surrounding_population_total surrounding_area_total \\\n", + "0 0.0 0.0 \n", + "3 0.0 0.0 \n", + "4 0.0 0.0 \n", + "11 0.0 0.0 \n", + "13 0.0 0.0 \n", + "22 0.0 0.0 \n", + "28 0.0 0.0 \n", + "31 0.0 0.0 \n", + "38 0.0 0.0 \n", + "40 0.0 0.0 \n", + "\n", + " surrounding_population_density urbanized_area_prc_21071 \\\n", + "0 0.0 0 \n", + "3 0.0 0 \n", + "4 0.0 0 \n", + "11 0.0 0 \n", + "13 0.0 0 \n", + "22 0.0 0 \n", + "28 0.0 0 \n", + "31 0.0 0 \n", + "38 0.0 0 \n", + "40 0.0 0 \n", + "\n", + " FID_2010_adjusted_urban_area UACE10 NAME10 UATYP10 INTPTLAT10 \\\n", + "0 0 02683 Antioch, CA U +37.9916865 \n", + "3 0 02683 Antioch, CA U +37.9916865 \n", + "4 0 02683 Antioch, CA U +37.9916865 \n", + "11 0 02683 Antioch, CA U +37.9916865 \n", + "13 0 02683 Antioch, CA U +37.9916865 \n", + "22 0 02683 Antioch, CA U +37.9916865 \n", + "28 0 02683 Antioch, CA U +37.9916865 \n", + "31 0 02683 Antioch, CA U +37.9916865 \n", + "38 0 02683 Antioch, CA U +37.9916865 \n", + "40 0 02683 Antioch, CA U +37.9916865 \n", + "\n", + " INTPTLON10 POP FID_urban_area_prc_21094_5_v1_0 \\\n", + "0 -121.7821203 277634 -1 \n", + "3 -121.7821203 277634 -1 \n", + "4 -121.7821203 277634 -1 \n", + "11 -121.7821203 277634 -1 \n", + "13 -121.7821203 277634 -1 \n", + "22 -121.7821203 277634 -1 \n", + "28 -121.7821203 277634 -1 \n", + "31 -121.7821203 277634 -1 \n", + "38 -121.7821203 277634 -1 \n", + "40 -121.7821203 277634 -1 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Join_ACS_20_2021 name_1 \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " name_cbi_manual_changes statefp placefp placens geoid_1 name_12 namelsad_1 \\\n", + "0 \n", + "3 \n", + "4 \n", + "11 \n", + "13 \n", + "22 \n", + "28 \n", + "31 \n", + "38 \n", + "40 \n", + "\n", + " lsad classfp pcicbsa pcinecta mtfcc funcstat aland awater intptlat \\\n", + "0 0 0 \n", + "3 0 0 \n", + "4 0 0 \n", + "11 0 0 \n", + "13 0 0 \n", + "22 0 0 \n", + "28 0 0 \n", + "31 0 0 \n", + "38 0 0 \n", + "40 0 0 \n", + "\n", + " intptlon b01003_001e_1 \\\n", + "0 \n", + "3 \n", + "4 \n", + "11 \n", + "13 \n", + "22 \n", + "28 \n", + "31 \n", + "38 \n", + "40 \n", + "\n", + " FID_Unincorporated_Islands_CALFIRE_2021_with_Population_Dissol_1 \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " FID_California_Incorporated_Cities_CALFIRE_2021_Unincorporated_1 \\\n", + "0 0 \n", + "3 0 \n", + "4 0 \n", + "11 0 \n", + "13 0 \n", + "22 0 \n", + "28 0 \n", + "31 0 \n", + "38 0 \n", + "40 0 \n", + "\n", + " SUM_POP10_1 city_name_1 community_type_1 area_km2_1 \\\n", + "0 0 0.0 \n", + "3 0 0.0 \n", + "4 0 0.0 \n", + "11 0 0.0 \n", + "13 0 0.0 \n", + "22 0 0.0 \n", + "28 0 0.0 \n", + "31 0 0.0 \n", + "38 0 0.0 \n", + "40 0 0.0 \n", + "\n", + " population_estimate_1 population_density_1 surrounding_city_count_1 \\\n", + "0 0 0.0 0 \n", + "3 0 0.0 0 \n", + "4 0 0.0 0 \n", + "11 0 0.0 0 \n", + "13 0 0.0 0 \n", + "22 0 0.0 0 \n", + "28 0 0.0 0 \n", + "31 0 0.0 0 \n", + "38 0 0.0 0 \n", + "40 0 0.0 0 \n", + "\n", + " surrounding_population_list_1 surrounding_population_total_1 \\\n", + "0 0.0 \n", + "3 0.0 \n", + "4 0.0 \n", + "11 0.0 \n", + "13 0.0 \n", + "22 0.0 \n", + "28 0.0 \n", + "31 0.0 \n", + "38 0.0 \n", + "40 0.0 \n", + "\n", + " surrounding_area_total_1 surrounding_population_density_1 \\\n", + "0 0.0 0.0 \n", + "3 0.0 0.0 \n", + "4 0.0 0.0 \n", + "11 0.0 0.0 \n", + "13 0.0 0.0 \n", + "22 0.0 0.0 \n", + "28 0.0 0.0 \n", + "31 0.0 0.0 \n", + "38 0.0 0.0 \n", + "40 0.0 0.0 \n", + "\n", + " urbanized_area_prc_21071_21072 urban_area_prc_21094_5 shape_Length \\\n", + "0 0 0 264697.838868 \n", + "3 0 0 264697.838868 \n", + "4 0 0 264697.838868 \n", + "11 0 0 264697.838868 \n", + "13 0 0 264697.838868 \n", + "22 0 0 264697.838868 \n", + "28 0 0 264697.838868 \n", + "31 0 0 264697.838868 \n", + "38 0 0 264697.838868 \n", + "40 0 0 264697.838868 \n", + "\n", + " shape_Area submission_log_number program \\\n", + "0 7.144355e+07 12 SCCP \n", + "3 7.144355e+07 0 SCCP \n", + "4 7.144355e+07 0 TCEP \n", + "11 7.144355e+07 0 SCCP \n", + "13 7.144355e+07 5 SCCP \n", + "22 7.144355e+07 3 SCCP \n", + "28 7.144355e+07 20 SCCP \n", + "31 7.144355e+07 0 SCCP \n", + "38 7.144355e+07 2 SCCP \n", + "40 7.144355e+07 24 TCEP \n", + "\n", + " project_name data_enterer_name \\\n", + "0 805-15 Transit Priority Connector Destiny \n", + "3 Autonomous, Zero-Emission, On-Demand Transit T... Katrina \n", + "4 Capital City Freeway Managed Lanes Katrina \n", + "11 I-710/I-5 Flyover Utilities Relocation and Con... Katrina \n", + "13 Inglewood Transit Connector (ITC) Project Hunter \n", + "22 SMART Windsor Rail System Extension Project Hunter \n", + "28 Silicon Valley Express Lanes Program – Phase 5 Katrina \n", + "31 State Route 241 to State Route 91 Express Lane... Katrina \n", + "38 Watsonville-Santa Cruz Multimodal Corridor Pro... Katrina \n", + "40 Yolo 80 / US 50 Managed Lanes Destiny \n", + "\n", + " done_y_n notes \\\n", + "0 Y Page 13 of narrative doc; PD: \"...includes fea... \n", + "3 None None \n", + "4 Y Mention of increased transit schedule frequenc... \n", + "11 None None \n", + "13 Y None \n", + "22 Y None \n", + "28 None None \n", + "31 None None \n", + "38 Y Previously reviewed \n", + "40 Y Will construct a Park and Ride facility with a... \n", + "\n", + " increase_in_transit_schedule_frequency_to_15_minute_peak_service_or_new_hqta_stop \\\n", + "0 Maybe? Initially it appeared there would be no... \n", + "3 None \n", + "4 ? \n", + "11 None \n", + "13 Y \n", + "22 Y \n", + "28 None \n", + "31 None \n", + "38 Y \n", + "40 Y \n", + "\n", + " transit_operator \\\n", + "0 None \n", + "3 None \n", + "4 None \n", + "11 None \n", + "13 Ingelwood Train? \n", + "22 SMART \n", + "28 None \n", + "31 None \n", + "38 Santa Cruz Metro \n", + "40 YCTD, Sacramento Regional Transit, and other t... \n", + "\n", + " relevant_transit_routes \\\n", + "0 None \n", + "3 None \n", + "4 None \n", + "11 None \n", + "13 the monorail? Do monorails count as HTQA \n", + "22 The train \n", + "28 None \n", + "31 None \n", + "38 69A, 69W, 71, 91X \n", + "40 New transit stop at proposed Park and Ride Fac... \n", + "\n", + " supporting_non_sov_infrastructure \\\n", + "0 See notes for full project description \n", + "3 None \n", + "4 None \n", + "11 None \n", + "13 None \n", + "22 new train stops \n", + "28 None \n", + "31 None \n", + "38 transit: bus on shoulder; active transportatio... \n", + "40 Yes; tolled managed lanes and seperated bikewa... \n", + "\n", + " has_significant_natural_resource_enhancement_element \\\n", + "0 None \n", + "3 None \n", + "4 None \n", + "11 None \n", + "13 None \n", + "22 None \n", + "28 None \n", + "31 None \n", + "38 None \n", + "40 None \n", + "\n", + " has_natural_resource_protecting_mitigation \n", + "0 None \n", + "3 None \n", + "4 None \n", + "11 None \n", + "13 None \n", + "22 None \n", + "28 None \n", + "31 None \n", + "38 salamander fencing \n", + "40 None " + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# verify we are not including the HQTA, also look at what didn't merge\n", + "check" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "b446463f-4b61-404c-a8e7-694bdf49ca38", + "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", + "
supporting_non_sov_infrastructuren
0Grade separated bikeway overcrossings1
1HOT lanes1
2HOT lanes (includes bus)2
3New toll road, plus other improvements to redu...1
4Platform expansion; new power substations to e...1
5Unclear3
6Yes, managed lanes and \"truck only\" lanes1
7Yes, the project seems to provide significant ...1
8Yes; peak period HOV lanes1
9Yes; providing HOV lanes and toll lanes.1
10Yes; seperated bikeway and pedestrian improvem...1
11active transportation: bike lanes1
12active transportation: bike/ped path, sidewalks1
13bike lanes3
14bike lanes, side walks connecting to existing ...1
15bike path1
16yes; adding a rail track, which will facilitat...1
17NaN8
\n", + "
" + ], + "text/plain": [ + " supporting_non_sov_infrastructure n\n", + "0 Grade separated bikeway overcrossings 1\n", + "1 HOT lanes 1\n", + "2 HOT lanes (includes bus) 2\n", + "3 New toll road, plus other improvements to redu... 1\n", + "4 Platform expansion; new power substations to e... 1\n", + "5 Unclear 3\n", + "6 Yes, managed lanes and \"truck only\" lanes 1\n", + "7 Yes, the project seems to provide significant ... 1\n", + "8 Yes; peak period HOV lanes 1\n", + "9 Yes; providing HOV lanes and toll lanes. 1\n", + "10 Yes; seperated bikeway and pedestrian improvem... 1\n", + "11 active transportation: bike lanes 1\n", + "12 active transportation: bike/ped path, sidewalks 1\n", + "13 bike lanes 3\n", + "14 bike lanes, side walks connecting to existing ... 1\n", + "15 bike path 1\n", + "16 yes; adding a rail track, which will facilitat... 1\n", + "17 NaN 8" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landuse_urban_nohqta >> count(_.supporting_non_sov_infrastructure)" + ] + }, + { + "cell_type": "markdown", + "id": "4f12951c-c923-485c-afa0-eb4a2ad27954", + "metadata": {}, + "source": [ + "11 score a -1 (NaN or Unclear), 19 score a 1 or 2" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "38436711-bf73-4369-88d1-dd9e13ecd4fe", + "metadata": {}, + "outputs": [], + "source": [ + "# merge on VMT scores or collect new lane miles y/n as part of data entry\n", + "vmt_raw = pd.read_parquet(f'{GCS_FILE_PATH}data_entry_raw_vmt.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "571cc932-2b84-4240-8e53-0c680d965633", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_urban_nohqta_vmt = pd.merge(landuse_urban_nohqta, vmt_raw, how='left', left_on='project_name', right_on='project_name', indicator=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "38518d85-bfdb-4c96-ad0f-f649cae47b3e", + "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", + "
supporting_non_sov_infrastructurescoren
0Grade separated bikeway overcrossings-1.01
1HOT lanes-1.01
2HOT lanesNaN1
3HOT lanes (includes bus)-3.01
4HOT lanes (includes bus)NaN1
5New toll road, plus other improvements to redu...-1.01
6Platform expansion; new power substations to e...3.01
7Unclear-1.01
8Unclear0.02
9Yes, managed lanes and \"truck only\" lanes0.01
10Yes, the project seems to provide significant ...1.01
11Yes; peak period HOV lanes1.01
12Yes; providing HOV lanes and toll lanes.1.01
13Yes; seperated bikeway and pedestrian improvem...-5.01
14active transportation: bike lanes-1.01
15active transportation: bike/ped path, sidewalks-1.01
16bike lanes0.03
17bike lanes, side walks connecting to existing ...-1.01
18bike path1.01
19yes; adding a rail track, which will facilitat...3.01
20NaN-3.01
21NaN-1.02
22NaN0.04
23NaN1.01
\n", + "
" + ], + "text/plain": [ + " supporting_non_sov_infrastructure score n\n", + "0 Grade separated bikeway overcrossings -1.0 1\n", + "1 HOT lanes -1.0 1\n", + "2 HOT lanes NaN 1\n", + "3 HOT lanes (includes bus) -3.0 1\n", + "4 HOT lanes (includes bus) NaN 1\n", + "5 New toll road, plus other improvements to redu... -1.0 1\n", + "6 Platform expansion; new power substations to e... 3.0 1\n", + "7 Unclear -1.0 1\n", + "8 Unclear 0.0 2\n", + "9 Yes, managed lanes and \"truck only\" lanes 0.0 1\n", + "10 Yes, the project seems to provide significant ... 1.0 1\n", + "11 Yes; peak period HOV lanes 1.0 1\n", + "12 Yes; providing HOV lanes and toll lanes. 1.0 1\n", + "13 Yes; seperated bikeway and pedestrian improvem... -5.0 1\n", + "14 active transportation: bike lanes -1.0 1\n", + "15 active transportation: bike/ped path, sidewalks -1.0 1\n", + "16 bike lanes 0.0 3\n", + "17 bike lanes, side walks connecting to existing ... -1.0 1\n", + "18 bike path 1.0 1\n", + "19 yes; adding a rail track, which will facilitat... 3.0 1\n", + "20 NaN -3.0 1\n", + "21 NaN -1.0 2\n", + "22 NaN 0.0 4\n", + "23 NaN 1.0 1" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landuse_urban_nohqta_vmt >> count(_.supporting_non_sov_infrastructure, _.score)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "e7516ae6-1673-4332-8f12-6582b66215d9", + "metadata": {}, + "outputs": [], + "source": [ + "# scoring func\n", + "def assign_landuse_score(row):\n", + " vmt_score = row.score\n", + " non_sov = row.supporting_non_sov_infrastructure\n", + " LU_score = np.nan\n", + " if non_sov==\"Unclear\":\n", + " LU_score = -1\n", + " elif pd.isnull(non_sov):\n", + " LU_score = -1\n", + " elif vmt_score>=0:\n", + " LU_score = 2\n", + " else:\n", + " LU_score = 1\n", + " row['landuse_score'] = LU_score\n", + " return row" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "9e549a85-33da-431b-a077-37bfa30b6889", + "metadata": {}, + "outputs": [], + "source": [ + "landuse_urban_nohqta_vmt = landuse_urban_nohqta_vmt.apply(assign_landuse_score, axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "9cd951cb-5566-4c91-966f-b2591a021ef7", + "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", + "
landuse_scoren
0-111
1110
2210
\n", + "
" + ], + "text/plain": [ + " landuse_score n\n", + "0 -1 11\n", + "1 1 10\n", + "2 2 10" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landuse_urban_nohqta_vmt >> count(_.landuse_score)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/project_prioritization/metrics/metrics_testing_safety.ipynb b/project_prioritization/metrics/metrics_testing_safety.ipynb index aa9d04ca9..77c339ca5 100644 --- a/project_prioritization/metrics/metrics_testing_safety.ipynb +++ b/project_prioritization/metrics/metrics_testing_safety.ipynb @@ -12,7 +12,7 @@ "text": [ "/opt/conda/lib/python3.9/site-packages/geopandas/_compat.py:124: UserWarning: The Shapely GEOS version (3.11.1-CAPI-1.17.1) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.\n", " warnings.warn(\n", - "/tmp/ipykernel_1617/3562477519.py:3: DeprecationWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas still uses PyGEOS by default. However, starting with version 0.14, the default will switch to Shapely. To force to use Shapely 2.0 now, you can either uninstall PyGEOS or set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:\n", + "/tmp/ipykernel_2290/3562477519.py:3: DeprecationWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas still uses PyGEOS by default. However, starting with version 0.14, the default will switch to Shapely. To force to use Shapely 2.0 now, you can either uninstall PyGEOS or set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:\n", "\n", "import os\n", "os.environ['USE_PYGEOS'] = '0'\n", @@ -571,7 +571,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 7, "id": "97bd907c-5c06-4f3a-8cbc-07b4c8e14ff7", "metadata": {}, "outputs": [], @@ -591,7 +591,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 8, "id": "c90dd7f9-1761-443b-8805-5eef498034b6", "metadata": {}, "outputs": [], @@ -601,7 +601,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 9, "id": "483f0924-99c5-4bfd-b61a-6bd81ff0dcea", "metadata": {}, "outputs": [ @@ -829,7 +829,7 @@ "26 No CRF 0.000000 22" ] }, - "execution_count": 13, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -840,7 +840,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 10, "id": "d0ef19b6-08b7-4c37-940c-591e9c11713c", "metadata": {}, "outputs": [], @@ -862,7 +862,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 11, "id": "0aa6d00e-4330-428e-8fef-b13c1f78007b", "metadata": {}, "outputs": [], @@ -872,20 +872,20 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 12, "id": "5c1481c7-084c-4783-8119-2c78aa59d06d", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 17, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -904,7 +904,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 13, "id": "9fe6f53f-9e2c-46aa-977c-108e3244ab95", "metadata": {}, "outputs": [], @@ -915,7 +915,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 14, "id": "fceefa00-56aa-4c2a-b721-cf800e7455ec", "metadata": {}, "outputs": [], @@ -927,18 +927,18 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 15, "id": "acfd7cc8-03a9-4497-b9c1-3babe38ef8ce", "metadata": {}, "outputs": [], "source": [ "# dissolve\n", - "project_geo_dissolve = project_geo.dissolve('projname')" + "project_geo_dissolve = project_geo.dissolve('projname').reset_index()" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 16, "id": "a7586370-6556-4ad1-a1ed-043091ac19b7", "metadata": {}, "outputs": [ @@ -948,7 +948,7 @@ "48" ] }, - "execution_count": 21, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -960,7 +960,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 17, "id": "c1e0ef60-8f75-4381-99f6-a74e27db40c6", "metadata": {}, "outputs": [], @@ -971,7 +971,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 18, "id": "92410329-10aa-49c2-a773-aa01782e3b7a", "metadata": {}, "outputs": [], @@ -983,7 +983,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 19, "id": "f28a97bc-c7ce-4aa6-8e9a-3a20420d2a99", "metadata": {}, "outputs": [ @@ -993,7 +993,7 @@ "11058" ] }, - "execution_count": 24, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -1004,7 +1004,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 20, "id": "6bea98a5-37f5-40f3-b273-4149cd1b1bc2", "metadata": {}, "outputs": [], @@ -1015,7 +1015,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 21, "id": "a8ed9cd9-2f1d-48ca-97a5-151260089171", "metadata": {}, "outputs": [ @@ -1040,7 +1040,7 @@ " \n", " \n", " \n", - " projname\n", + " index\n", " index_left\n", " CASE_ID\n", " ACCIDENT_YEAR\n", @@ -1059,6 +1059,7 @@ " POINT_X\n", " POINT_Y\n", " fsi_crash\n", + " projname\n", " b100\n", " parentglobalid\n", " lyr_globalid\n", @@ -1081,7 +1082,7 @@ " \n", " \n", " 0\n", - " 805-15 Transit Priority Connector\n", + " 0\n", " 694530.0\n", " 90126414.0\n", " 2016.0\n", @@ -1100,6 +1101,7 @@ " -117.111370\n", " 32.731190\n", " 0.0\n", + " 805-15 Transit Priority Connector\n", " POLYGON ((270878.283 -581835.565, 270956.840 -...\n", " {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}\n", " {6FF1E341-976E-47E8-8B80-04A6C72283F7}\n", @@ -1120,7 +1122,7 @@ " \n", " \n", " 1\n", - " 805-15 Transit Priority Connector\n", + " 0\n", " 729493.0\n", " 90664679.0\n", " 2018.0\n", @@ -1139,6 +1141,7 @@ " -117.111809\n", " 32.731289\n", " 0.0\n", + " 805-15 Transit Priority Connector\n", " POLYGON ((270878.283 -581835.565, 270956.840 -...\n", " {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}\n", " {6FF1E341-976E-47E8-8B80-04A6C72283F7}\n", @@ -1159,7 +1162,7 @@ " \n", " \n", " 2\n", - " 805-15 Transit Priority Connector\n", + " 0\n", " 728579.0\n", " 90314046.0\n", " 2016.0\n", @@ -1178,6 +1181,7 @@ " -117.111270\n", " 32.731410\n", " 1.0\n", + " 805-15 Transit Priority Connector\n", " POLYGON ((270878.283 -581835.565, 270956.840 -...\n", " {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}\n", " {6FF1E341-976E-47E8-8B80-04A6C72283F7}\n", @@ -1198,7 +1202,7 @@ " \n", " \n", " 3\n", - " 805-15 Transit Priority Connector\n", + " 0\n", " 675022.0\n", " 90344983.0\n", " 2016.0\n", @@ -1217,6 +1221,7 @@ " -117.111279\n", " 32.731674\n", " 0.0\n", + " 805-15 Transit Priority Connector\n", " POLYGON ((270878.283 -581835.565, 270956.840 -...\n", " {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}\n", " {6FF1E341-976E-47E8-8B80-04A6C72283F7}\n", @@ -1237,7 +1242,7 @@ " \n", " \n", " 4\n", - " 805-15 Transit Priority Connector\n", + " 0\n", " 681923.0\n", " 90462429.0\n", " 2017.0\n", @@ -1256,6 +1261,7 @@ " -117.111843\n", " 32.732072\n", " 1.0\n", + " 805-15 Transit Priority Connector\n", " POLYGON ((270878.283 -581835.565, 270956.840 -...\n", " {2FB073EE-3459-4C83-83DC-2FB00CE0C3F6}\n", " {6FF1E341-976E-47E8-8B80-04A6C72283F7}\n", @@ -1279,33 +1285,40 @@ "" ], "text/plain": [ - " projname index_left CASE_ID ACCIDENT_YEAR \\\n", - "0 805-15 Transit Priority Connector 694530.0 90126414.0 2016.0 \n", - "1 805-15 Transit Priority Connector 729493.0 90664679.0 2018.0 \n", - "2 805-15 Transit Priority Connector 728579.0 90314046.0 2016.0 \n", - "3 805-15 Transit Priority Connector 675022.0 90344983.0 2016.0 \n", - "4 805-15 Transit Priority Connector 681923.0 90462429.0 2017.0 \n", + " index index_left CASE_ID ACCIDENT_YEAR COLLISION_DATE \\\n", + "0 0 694530.0 90126414.0 2016.0 2016-02-18 \n", + "1 0 729493.0 90664679.0 2018.0 2018-02-08 \n", + "2 0 728579.0 90314046.0 2016.0 2016-09-20 \n", + "3 0 675022.0 90344983.0 2016.0 2016-12-11 \n", + "4 0 681923.0 90462429.0 2017.0 2017-04-29 \n", + "\n", + " COLLISION_TIME COLLISION_SEVERITY PCF_VIOL_CATEGORY TYPE_OF_COLLISION \\\n", + "0 518.0 3.0 01 E \n", + "1 538.0 4.0 08 F \n", + "2 1520.0 2.0 03 F \n", + "3 1038.0 3.0 08 E \n", + "4 1100.0 2.0 01 E \n", "\n", - " COLLISION_DATE COLLISION_TIME COLLISION_SEVERITY PCF_VIOL_CATEGORY \\\n", - "0 2016-02-18 518.0 3.0 01 \n", - "1 2018-02-08 538.0 4.0 08 \n", - "2 2016-09-20 1520.0 2.0 03 \n", - "3 2016-12-11 1038.0 3.0 08 \n", - "4 2017-04-29 1100.0 2.0 01 \n", + " MVIW NUMBER_KILLED NUMBER_INJURED PEDESTRIAN_ACCIDENT BICYCLE_ACCIDENT \\\n", + "0 I 0.0 1.0 \n", + "1 A 0.0 1.0 \n", + "2 A 0.0 1.0 \n", + "3 I 0.0 1.0 \n", + "4 I 0.0 1.0 \n", "\n", - " TYPE_OF_COLLISION MVIW NUMBER_KILLED NUMBER_INJURED PEDESTRIAN_ACCIDENT \\\n", - "0 E I 0.0 1.0 \n", - "1 F A 0.0 1.0 \n", - "2 F A 0.0 1.0 \n", - "3 E I 0.0 1.0 \n", - "4 E I 0.0 1.0 \n", + " LATITUDE LONGITUDE POINT_X POINT_Y fsi_crash \\\n", + "0 32.731190 -117.111370 -117.111370 32.731190 0.0 \n", + "1 32.731289 -117.111649 -117.111809 32.731289 0.0 \n", + "2 32.731410 -117.111270 -117.111270 32.731410 1.0 \n", + "3 32.731950 -117.111130 -117.111279 32.731674 0.0 \n", + "4 32.732160 -117.111770 -117.111843 32.732072 1.0 \n", "\n", - " BICYCLE_ACCIDENT LATITUDE LONGITUDE POINT_X POINT_Y fsi_crash \\\n", - "0 32.731190 -117.111370 -117.111370 32.731190 0.0 \n", - "1 32.731289 -117.111649 -117.111809 32.731289 0.0 \n", - "2 32.731410 -117.111270 -117.111270 32.731410 1.0 \n", - "3 32.731950 -117.111130 -117.111279 32.731674 0.0 \n", - "4 32.732160 -117.111770 -117.111843 32.732072 1.0 \n", + " projname \\\n", + "0 805-15 Transit Priority Connector \n", + "1 805-15 Transit Priority Connector \n", + "2 805-15 Transit Priority Connector \n", + "3 805-15 Transit Priority Connector \n", + "4 805-15 Transit Priority Connector \n", "\n", " b100 \\\n", "0 POLYGON ((270878.283 -581835.565, 270956.840 -... \n", @@ -1350,7 +1363,7 @@ "4 1461.374204 " ] }, - "execution_count": 26, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1361,7 +1374,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 22, "id": "9543009d-db9e-4f85-aac6-28500659e0c3", "metadata": {}, "outputs": [], @@ -1379,7 +1392,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 23, "id": "00003c5a-9482-4aa3-a89d-1938fe4f08a2", "metadata": {}, "outputs": [ @@ -1411,10 +1424,10 @@ " \n", " \n", " \n", - " 28\n", - " SR-46 East Antelope Grade Corridor Improvements\n", - " 2.0\n", - " 2\n", + " 25\n", + " SR 49 Corridor improvement project in Nevada C...\n", + " 5.0\n", + " 42\n", " \n", " \n", " 7\n", @@ -1423,70 +1436,64 @@ " 175\n", " \n", " \n", - " 32\n", - " Silicon Valley Express Lanes Program – Phase 5\n", - " 42.0\n", - " 790\n", - " \n", - " \n", - " 3\n", - " Autonomous, Zero-Emission, On-Demand Transit T...\n", - " 6.0\n", - " 126\n", + " 40\n", + " U.S. 101 Connected Communities Corridor Rail a...\n", + " 11.0\n", + " 113\n", " \n", " \n", - " 15\n", - " Interstate 10 Corridor Freight and Managed Lan...\n", - " 63.0\n", - " 865\n", + " 46\n", + " Westbound I-80 Cordelia Commercial Vehicle Enf...\n", + " 2.0\n", + " 20\n", " \n", " \n", - " 29\n", - " SR-91 Central Ave to Acacia Court Improvement ...\n", - " 14.0\n", - " 142\n", + " 31\n", + " Santa Barbara 101 Multimodal Corridor\n", + " 8.0\n", + " 94\n", " \n", " \n", - " 17\n", - " LA River Bike Path- San Fernando Valley Connec...\n", - " 3.0\n", - " 42\n", + " 39\n", + " Tulare Six-Lane and Paige Avenue Interchange I...\n", + " 10.0\n", + " 81\n", " \n", " \n", - " 10\n", - " I-605 at Valley Blvd Interchange Improvement P...\n", - " 6.0\n", - " 97\n", + " 22\n", + " POLA Maritime Support Facility Access/Terminal...\n", + " 0.0\n", + " 2\n", " \n", " \n", - " 18\n", - " Los Angeles Metro Light Rail Capital, Operatio...\n", + " 6\n", + " Capitol Corridor Regional Transit Improvement\n", " 20.0\n", - " 388\n", + " 339\n", " \n", " \n", - " 4\n", - " Bay Skyway Phase 1\n", - " 9.0\n", - " 104\n", + " 5\n", + " Capital City Freeway Managed Lanes\n", + " 21.0\n", + " 313\n", " \n", " \n", - " 39\n", - " Tulare Six-Lane and Paige Avenue Interchange I...\n", - " 10.0\n", - " 81\n", + " 20\n", + " National Highway Freight Network Improvement P...\n", + " 4.0\n", + " 16\n", " \n", " \n", - " 45\n", - " Watsonville-Santa Cruz Multimodal Corridor Pro...\n", - " 20.0\n", - " 272\n", + " 24\n", + " SMART Windsor Rail System Extension Project\n", + " 0.0\n", + " 4\n", " \n", " \n", - " 9\n", - " I-5 Managed Lanes\n", - " 102.0\n", - " 1786\n", + " 14\n", + " Inglewood Transit Connector (ITC) Project\n", + " 5.0\n", + " 76\n", " \n", " \n", " 35\n", @@ -1495,10 +1502,16 @@ " 162\n", " \n", " \n", - " 36\n", - " Stockton Channel Viaduct\n", - " 18.0\n", - " 139\n", + " 33\n", + " Sr-86/Avenue 50 New Interchange Project\n", + " 5.0\n", + " 34\n", + " \n", + " \n", + " 37\n", + " The Desert Rail Infrastructure Improvement\n", + " 0.0\n", + " 5\n", " \n", " \n", "\n", @@ -1506,24 +1519,24 @@ ], "text/plain": [ " projname sum_fsi sum_crashes\n", - "28 SR-46 East Antelope Grade Corridor Improvements 2.0 2\n", + "25 SR 49 Corridor improvement project in Nevada C... 5.0 42\n", "7 Five Cities Multimodal Transportation Network ... 13.0 175\n", - "32 Silicon Valley Express Lanes Program – Phase 5 42.0 790\n", - "3 Autonomous, Zero-Emission, On-Demand Transit T... 6.0 126\n", - "15 Interstate 10 Corridor Freight and Managed Lan... 63.0 865\n", - "29 SR-91 Central Ave to Acacia Court Improvement ... 14.0 142\n", - "17 LA River Bike Path- San Fernando Valley Connec... 3.0 42\n", - "10 I-605 at Valley Blvd Interchange Improvement P... 6.0 97\n", - "18 Los Angeles Metro Light Rail Capital, Operatio... 20.0 388\n", - "4 Bay Skyway Phase 1 9.0 104\n", + "40 U.S. 101 Connected Communities Corridor Rail a... 11.0 113\n", + "46 Westbound I-80 Cordelia Commercial Vehicle Enf... 2.0 20\n", + "31 Santa Barbara 101 Multimodal Corridor 8.0 94\n", "39 Tulare Six-Lane and Paige Avenue Interchange I... 10.0 81\n", - "45 Watsonville-Santa Cruz Multimodal Corridor Pro... 20.0 272\n", - "9 I-5 Managed Lanes 102.0 1786\n", + "22 POLA Maritime Support Facility Access/Terminal... 0.0 2\n", + "6 Capitol Corridor Regional Transit Improvement 20.0 339\n", + "5 Capital City Freeway Managed Lanes 21.0 313\n", + "20 National Highway Freight Network Improvement P... 4.0 16\n", + "24 SMART Windsor Rail System Extension Project 0.0 4\n", + "14 Inglewood Transit Connector (ITC) Project 5.0 76\n", "35 State Route 241 to State Route 91 Express Lane... 14.0 162\n", - "36 Stockton Channel Viaduct 18.0 139" + "33 Sr-86/Avenue 50 New Interchange Project 5.0 34\n", + "37 The Desert Rail Infrastructure Improvement 0.0 5" ] }, - "execution_count": 28, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -1542,7 +1555,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 24, "id": "176b1c46-004c-41b7-be2e-2f0901d3fe2e", "metadata": {}, "outputs": [], @@ -1553,7 +1566,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 25, "id": "8117a46f-6478-47db-b07e-8629d5e24d54", "metadata": {}, "outputs": [ @@ -1563,7 +1576,7 @@ "57" ] }, - "execution_count": 53, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -1574,7 +1587,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 26, "id": "bd2fc561-ef77-4289-a26a-89131c3bf31c", "metadata": {}, "outputs": [ @@ -1603,7 +1616,6 @@ " project_name\n", " crf_combined\n", " crf_cat\n", - " dupflag\n", " projname\n", " sum_fsi\n", " sum_crashes\n", @@ -1616,7 +1628,6 @@ " U.S. 101 Connected Communities Corridor Rail a...\n", " 0.907806\n", " High\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1627,7 +1638,6 @@ " Bay Skyway Phase 1\n", " 0.140000\n", " High\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1638,7 +1648,6 @@ " East Bay Greenway Multimodal Project Phase 1\n", " 0.955921\n", " High\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1649,7 +1658,6 @@ " Green Power Microgrid Project\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1660,7 +1668,6 @@ " Fresno Subdivision (Ceres to Turlock) Double T...\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1671,7 +1678,6 @@ " High Desert Operational Efficiency Project\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1682,7 +1688,6 @@ " TravelCenters of America: West Coast Electric ...\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1693,7 +1698,6 @@ " Southern California Hydrogen Fueling Stations\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1704,7 +1708,6 @@ " State Route 91 (State Route-55 to Lakeview Ave...\n", " 0.000000\n", " No CRF\n", - " False\n", " NaN\n", " NaN\n", " NaN\n", @@ -1715,7 +1718,6 @@ " NaN\n", " NaN\n", " NaN\n", - " NaN\n", " Bay Skyway Phase 1\n", " 9.0\n", " 104.0\n", @@ -1726,7 +1728,6 @@ " NaN\n", " NaN\n", " NaN\n", - " NaN\n", " Capitol Corridor Regional Transit Improvement\n", " 20.0\n", " 339.0\n", @@ -1737,7 +1738,6 @@ " NaN\n", " NaN\n", " NaN\n", - " NaN\n", " U.S. 101 Connected Communities Corridor Rail a...\n", " 11.0\n", " 113.0\n", @@ -1748,7 +1748,6 @@ " NaN\n", " NaN\n", " NaN\n", - " NaN\n", " Union Pacific (Fresno Subdivision) Ceres to Tu...\n", " 6.0\n", " 69.0\n", @@ -1773,38 +1772,38 @@ "55 NaN NaN \n", "56 NaN NaN \n", "\n", - " crf_combined crf_cat dupflag \\\n", - "0 0.907806 High False \n", - "6 0.140000 High False \n", - "7 0.955921 High False \n", - "13 0.000000 No CRF False \n", - "16 0.000000 No CRF False \n", - "18 0.000000 No CRF False \n", - "26 0.000000 No CRF False \n", - "27 0.000000 No CRF False \n", - "42 0.000000 No CRF False \n", - "53 NaN NaN NaN \n", - "54 NaN NaN NaN \n", - "55 NaN NaN NaN \n", - "56 NaN NaN NaN \n", + " crf_combined crf_cat projname \\\n", + "0 0.907806 High NaN \n", + "6 0.140000 High NaN \n", + "7 0.955921 High NaN \n", + "13 0.000000 No CRF NaN \n", + "16 0.000000 No CRF NaN \n", + "18 0.000000 No CRF NaN \n", + "26 0.000000 No CRF NaN \n", + "27 0.000000 No CRF NaN \n", + "42 0.000000 No CRF NaN \n", + "53 NaN NaN Bay Skyway Phase 1 \n", + "54 NaN NaN Capitol Corridor Regional Transit Improvement \n", + "55 NaN NaN U.S. 101 Connected Communities Corridor Rail a... \n", + "56 NaN NaN Union Pacific (Fresno Subdivision) Ceres to Tu... \n", "\n", - " projname sum_fsi sum_crashes \n", - "0 NaN NaN NaN \n", - "6 NaN NaN NaN \n", - "7 NaN NaN NaN \n", - "13 NaN NaN NaN \n", - "16 NaN NaN NaN \n", - "18 NaN NaN NaN \n", - "26 NaN NaN NaN \n", - "27 NaN NaN NaN \n", - "42 NaN NaN NaN \n", - "53 Bay Skyway Phase 1 9.0 104.0 \n", - "54 Capitol Corridor Regional Transit Improvement 20.0 339.0 \n", - "55 U.S. 101 Connected Communities Corridor Rail a... 11.0 113.0 \n", - "56 Union Pacific (Fresno Subdivision) Ceres to Tu... 6.0 69.0 " + " sum_fsi sum_crashes \n", + "0 NaN NaN \n", + "6 NaN NaN \n", + "7 NaN NaN \n", + "13 NaN NaN \n", + "16 NaN NaN \n", + "18 NaN NaN \n", + "26 NaN NaN \n", + "27 NaN NaN \n", + "42 NaN NaN \n", + "53 9.0 104.0 \n", + "54 20.0 339.0 \n", + "55 11.0 113.0 \n", + "56 6.0 69.0 " ] }, - "execution_count": 30, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -1816,7 +1815,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 27, "id": "e585bc60-5237-4d77-9183-7dc0c7ada8b1", "metadata": {}, "outputs": [], @@ -1827,7 +1826,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 28, "id": "dfee972a-7c66-45b3-9a1a-dc6ebedfb84c", "metadata": {}, "outputs": [], @@ -1837,7 +1836,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 29, "id": "5d0023dc-00e3-4554-8c24-c8a5704b1b84", "metadata": {}, "outputs": [ @@ -1847,7 +1846,7 @@ "49" ] }, - "execution_count": 52, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -1858,7 +1857,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 30, "id": "18c834db-0027-4677-b4e3-695302962ab8", "metadata": {}, "outputs": [], @@ -1879,7 +1878,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 31, "id": "91fd9dc3-532b-4ba1-91fa-72a642cb43c4", "metadata": {}, "outputs": [], @@ -1890,7 +1889,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 32, "id": "e62e2f09-24db-40ff-88cc-5c405cd67495", "metadata": {}, "outputs": [ @@ -2282,7 +2281,7 @@ "43 No Crashes NaN NaN 5" ] }, - "execution_count": 60, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -2294,7 +2293,7 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": 33, "id": "e91b711b-5de6-4aee-b370-5d0c945f3930", "metadata": {}, "outputs": [ @@ -2368,7 +2367,7 @@ "4 No CRF No Crashes 6" ] }, - "execution_count": 61, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -2380,7 +2379,7 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": 34, "id": "b8e3f98d-ae58-42cd-88b3-3c3f9c24953f", "metadata": {}, "outputs": [], @@ -2408,7 +2407,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 35, "id": "20c993fb-cc14-4787-a72e-fb28f735f584", "metadata": {}, "outputs": [], @@ -2418,7 +2417,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 36, "id": "fc891189-27e4-4575-b18c-5e9f3573736c", "metadata": {}, "outputs": [ @@ -2498,7 +2497,7 @@ "4 5 High High 25" ] }, - "execution_count": 64, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -2510,7 +2509,7 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 37, "id": "7071a9f5-23ba-4041-b142-fae89cc85a9a", "metadata": {}, "outputs": [ @@ -2572,7 +2571,7 @@ "3 5 25" ] }, - "execution_count": 66, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -2584,19 +2583,273 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 38, "id": "40509505-702d-44f5-ae8b-fcf17d82dc65", "metadata": {}, - "outputs": [], - "source": [] + "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", + "
programproject_namecrf_combinedcrf_catprojnamesum_fsisum_crashessafety_need_catsafety_score
1SCCPWatsonville-Santa Cruz Multimodal Corridor Pro...0.905395HighWatsonville-Santa Cruz Multimodal Corridor Pro...20.0272.0High5
4SCCPInglewood Transit Connector (ITC) Project0.270000HighInglewood Transit Connector (ITC) Project5.076.0High5
5SCCPI-5 Managed Lanes0.200000HighI-5 Managed Lanes102.01786.0High5
8SCCP805-15 Transit Priority Connector0.860266High805-15 Transit Priority Connector10.052.0High5
10SCCPUS 101/SR 92 Area Improvements & Multimodal Pr...0.779680HighUS 101/SR 92 Area Improvements & Multimodal Pr...6.0194.0High5
\n", + "
" + ], + "text/plain": [ + " program project_name crf_combined \\\n", + "1 SCCP Watsonville-Santa Cruz Multimodal Corridor Pro... 0.905395 \n", + "4 SCCP Inglewood Transit Connector (ITC) Project 0.270000 \n", + "5 SCCP I-5 Managed Lanes 0.200000 \n", + "8 SCCP 805-15 Transit Priority Connector 0.860266 \n", + "10 SCCP US 101/SR 92 Area Improvements & Multimodal Pr... 0.779680 \n", + "\n", + " crf_cat projname sum_fsi \\\n", + "1 High Watsonville-Santa Cruz Multimodal Corridor Pro... 20.0 \n", + "4 High Inglewood Transit Connector (ITC) Project 5.0 \n", + "5 High I-5 Managed Lanes 102.0 \n", + "8 High 805-15 Transit Priority Connector 10.0 \n", + "10 High US 101/SR 92 Area Improvements & Multimodal Pr... 6.0 \n", + "\n", + " sum_crashes safety_need_cat safety_score \n", + "1 272.0 High 5 \n", + "4 76.0 High 5 \n", + "5 1786.0 High 5 \n", + "8 52.0 High 5 \n", + "10 194.0 High 5 " + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "project_crf_tims2 >> filter(_.safety_score==5) >> head()" + ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 39, "id": "b249779c-6a49-49f7-90a7-f189fc0cfbe7", "metadata": {}, - "outputs": [], - "source": [] + "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", + "
programproject_namecrf_combinedcrf_catprojnamesum_fsisum_crashessafety_need_catsafety_score
3SCCPMetrolink Lilac to Sycamore Avenue Double Trac...0.0No CRFMetrolink Lilac to Sycamore Avenue Double Trac...0.02.0Low0
9SCCPLos Angeles Metro Light Rail Capital, Operatio...0.0No CRFLos Angeles Metro Light Rail Capital, Operatio...20.0388.0High0
12SCCP/TCEPSanta Barbara 101 Multimodal Corridor0.0No CRFSanta Barbara 101 Multimodal Corridor8.094.0High0
14TCEPSR-15 Operational Improvements-Vesta Street Br...0.0No CRFSR-15 Operational Improvements-Vesta Street Br...6.080.0High0
15TCEPAmerica's Green Port Gateway Phase 1: Pier B E...0.0No CRFAmerica's Green Port Gateway Phase 1: Pier B E...3.09.0High0
\n", + "
" + ], + "text/plain": [ + " program project_name \\\n", + "3 SCCP Metrolink Lilac to Sycamore Avenue Double Trac... \n", + "9 SCCP Los Angeles Metro Light Rail Capital, Operatio... \n", + "12 SCCP/TCEP Santa Barbara 101 Multimodal Corridor \n", + "14 TCEP SR-15 Operational Improvements-Vesta Street Br... \n", + "15 TCEP America's Green Port Gateway Phase 1: Pier B E... \n", + "\n", + " crf_combined crf_cat projname \\\n", + "3 0.0 No CRF Metrolink Lilac to Sycamore Avenue Double Trac... \n", + "9 0.0 No CRF Los Angeles Metro Light Rail Capital, Operatio... \n", + "12 0.0 No CRF Santa Barbara 101 Multimodal Corridor \n", + "14 0.0 No CRF SR-15 Operational Improvements-Vesta Street Br... \n", + "15 0.0 No CRF America's Green Port Gateway Phase 1: Pier B E... \n", + "\n", + " sum_fsi sum_crashes safety_need_cat safety_score \n", + "3 0.0 2.0 Low 0 \n", + "9 20.0 388.0 High 0 \n", + "12 8.0 94.0 High 0 \n", + "14 6.0 80.0 High 0 \n", + "15 3.0 9.0 High 0 " + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "project_crf_tims2 >> filter(_.safety_score==0) >> head()" + ] } ], "metadata": { diff --git a/project_prioritization/metrics/read_data_entry.ipynb b/project_prioritization/metrics/read_data_entry.ipynb index d28197ecf..b5de28be6 100644 --- a/project_prioritization/metrics/read_data_entry.ipynb +++ b/project_prioritization/metrics/read_data_entry.ipynb @@ -2,10 +2,27 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "34104da9-6af5-42e4-981c-c74ccf987005", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.9/site-packages/geopandas/_compat.py:124: UserWarning: The Shapely GEOS version (3.11.1-CAPI-1.17.1) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.\n", + " warnings.warn(\n", + "/tmp/ipykernel_311/1872485643.py:4: DeprecationWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas still uses PyGEOS by default. However, starting with version 0.14, the default will switch to Shapely. To force to use Shapely 2.0 now, you can either uninstall PyGEOS or set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:\n", + "\n", + "import os\n", + "os.environ['USE_PYGEOS'] = '0'\n", + "import geopandas\n", + "\n", + "In the next release, GeoPandas will switch to using Shapely by default, even if PyGEOS is installed. If you only have PyGEOS installed to get speed-ups, this switch should be smooth. However, if you are using PyGEOS directly (calling PyGEOS functions on geometries from GeoPandas), this will then stop working and you are encouraged to migrate from PyGEOS to Shapely 2.0 (https://shapely.readthedocs.io/en/latest/migration_pygeos.html).\n", + " import geopandas as gpd\n" + ] + } + ], "source": [ "import os\n", "os.environ[\"CALITP_BQ_MAX_BYTES\"] = str(1_000_000_000_000) ## 1TB?\n", @@ -162,10 +179,149 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "598992c9-c36a-4702-802d-aa75366c7410", "metadata": {}, "outputs": [], + "source": [ + "# VMT\n", + "vmt = to_snakecase(pd.read_excel(f'{GCS_FILE_PATH}Metrics_Scoring_All_Projects.xlsx', sheet_name=\"VMT\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "8f9e5dfa-d007-478d-99e0-5f3bdcf2ee6a", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/tmp/ipykernel_311/65901047.py:1: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will *not* be treated as literal strings when regex=True.\n", + " vmt.columns = vmt.columns.str.replace('?', '')\n" + ] + } + ], + "source": [ + "vmt.columns = vmt.columns.str.replace('?', '')" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "e51f873a-f82e-4df1-b87f-bb2b59fc6d5e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 80 entries, 0 to 79\n", + "Data columns (total 17 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 submission_log_number 80 non-null int64 \n", + " 1 program 80 non-null object \n", + " 2 project_name 80 non-null object \n", + " 3 data_enterer_name 54 non-null object \n", + " 4 done_y_n 50 non-null object \n", + " 5 notes 53 non-null object \n", + " 6 estimated_change_in_vmt__total_for_project_ 39 non-null object \n", + " 7 is_specific_ 52 non-null object \n", + " 8 project_contains_new_lane_miles_ 50 non-null object \n", + " 9 total_new_lane_miles 45 non-null object \n", + " 10 project_contains_new_interchange_ 51 non-null object \n", + " 11 project_contains_new_transit_riders_ 52 non-null object \n", + " 12 project_contains_active_transportation_element_ 52 non-null object \n", + " 13 score 53 non-null float64\n", + " 14 additional_notes 18 non-null object \n", + " 15 hunter_esimtate_comments 6 non-null object \n", + " 16 henry_estimate_comments 13 non-null object \n", + "dtypes: float64(1), int64(1), object(15)\n", + "memory usage: 10.8+ KB\n" + ] + } + ], + "source": [ + "vmt.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "a8f83277-c61e-4d0b-9b59-37b6ba747012", + "metadata": {}, + "outputs": [], + "source": [ + "vmt['estimated_change_in_vmt__total_for_project_'] = vmt['estimated_change_in_vmt__total_for_project_'].str.replace('\\n', '')" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "6635b7d9-c04a-4d57-9aa8-be8fb1ef05b1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 14\n", + "N 14\n", + "? 3\n", + "3.5 1\n", + "7.8 1\n", + "16 1\n", + "17.2 1\n", + "10.4 1\n", + "7.5 1\n", + "32 1\n", + "30.4 1\n", + "4.2 1\n", + "1.3 1\n", + "22.2 1\n", + "14 1\n", + "6.7 1\n", + "4.4 1\n", + "Name: total_new_lane_miles, dtype: int64" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vmt.total_new_lane_miles.value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "d4eaa6d4-1895-40ff-99e1-8e5d4d4ceaf9", + "metadata": {}, + "outputs": [], + "source": [ + "vmt = vmt.astype({'project_contains_new_lane_miles_':'str', 'total_new_lane_miles':'str'})" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "6dffb368-6ac8-4d16-8355-221aea3b0381", + "metadata": {}, + "outputs": [], + "source": [ + "vmt.to_parquet(f'{GCS_FILE_PATH}data_entry_raw_vmt.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "53334538-9502-4ed3-92f3-0ad5b00ac993", + "metadata": {}, + "outputs": [], "source": [] } ], diff --git a/project_prioritization/metrics/read_data_entry.py b/project_prioritization/metrics/read_data_entry.py index 4560ddd49..c438d5975 100644 --- a/project_prioritization/metrics/read_data_entry.py +++ b/project_prioritization/metrics/read_data_entry.py @@ -24,5 +24,12 @@ # Land use land_use = to_snakecase(pd.read_excel(f'{GCS_FILE_PATH}Metrics_Scoring_All_Projects.xlsx', sheet_name="Land Use")) +land_use.columns = land_use.columns.str.replace('?', '') land_use.to_parquet(f'{GCS_FILE_PATH}data_entry_raw_land_use.parquet') +# VMT +vmt = to_snakecase(pd.read_excel(f'{GCS_FILE_PATH}Metrics_Scoring_All_Projects.xlsx', sheet_name="VMT")) +vmt.columns = vmt.columns.str.replace('?', '') +vmt['estimated_change_in_vmt__total_for_project_'] = vmt['estimated_change_in_vmt__total_for_project_'].str.replace('\n', '') +vmt.to_parquet(f'{GCS_FILE_PATH}data_entry_raw_vmt.parquet') +