diff --git a/open_data/Makefile b/open_data/Makefile index c8376836b..3d68717e5 100644 --- a/open_data/Makefile +++ b/open_data/Makefile @@ -8,8 +8,11 @@ compile_open_data_portal: python gcs_to_esri.py #update metadata.yml (add new datasets here) python supplement_meta.py # run if any changes are made to yml - #python arcgis_script_pro.py #(in ESRI!) python update_data_dict.py # check if columns are missing in data_dictionary yml python update_fields_fgdc.py # populate fields with data dictionary yml values, run if update_data_dict had changes to incorporate + # Download the zipped shapefiles and metadata.yml and move to local ESRI directory + #python arcgis_script_pro.py #(in ESRI!) python metadata_update_pro.py # go back into ESRI and update xml + # Download the overwritten XML files in xml/run_in_esri/ and move to local ESRI directory. + #python arcgis_script_pro.py #(in ESRI!) python cleanup.py # run after ESRI work done \ No newline at end of file diff --git a/open_data/arcgis_pro_notebook_sample.ipynb b/open_data/arcgis_pro_notebook_sample.ipynb new file mode 100644 index 000000000..cbbd6cff6 --- /dev/null +++ b/open_data/arcgis_pro_notebook_sample.ipynb @@ -0,0 +1,477 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "import os\n", + "import arcpy\n", + "import json\n", + "\n", + "from arcpy import metadata as md\n", + "S_NUMBER = \"\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "arcpy.env.workspace = os.path.join(\n", + " \"C:\\\\\", \"Users\", S_NUMBER, \n", + " \"Documents\", \"ArcGIS\"\n", + ")\n", + "working_dir = arcpy.env.workspace\n", + "working_dir" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "directory = arcpy.GetInstallInfo(\"desktop\")[\"InstallDir\"] \n", + "directory" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# Set datasets to update...match to `update_vars.RUN_ME`\n", + "in_features = [\n", + " 'ca_hq_transit_areas',\n", + " 'ca_hq_transit_stops',\n", + " 'ca_transit_routes',\n", + " 'ca_transit_stops',\n", + " 'speeds_by_stop_segments',\n", + " 'speeds_by_route_time_of_day'\n", + "]\n", + "\n", + "staging_location = 'staging.gdb'\n", + "out_location = 'open_data.gdb'\n", + "\n", + "def feature_class_in_gdb_path(my_gdb, file_name):\n", + " return os.path.join(my_gdb, file_name)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Unzip zipped shapefiles, download metadata.json into local path\n", + "\n", + "### Set FGDC field defs for each dataset and export XML (do once when new dataset added)\n", + "\n", + "Only the FGDC standard keeps fields.\n", + "See if we can use this and combine it with our ISO 19139 standard later." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Read in json with all the changes we need for each layer\n", + "with open(f\"{working_dir}\\metadata.json\") as f:\n", + " meta_dict = json.load(f)\n", + "\n", + " \n", + "def update_metadata_class(this_feature_class, meta_dict_for_dataset: dict):\n", + " \"\"\"\n", + " Update the elements in the arcpy.metadata class.\n", + " \"\"\"\n", + " # Now update metadata class elements that are available\n", + " source_metadata = md.Metadata(this_feature_class)\n", + "\n", + " source_metadata.title = meta_dict_for_dataset[\"dataset_name\"]\n", + " source_metadata.tags = meta_dict_for_dataset[\"theme_keywords\"]\n", + " source_metadata.summary = meta_dict_for_dataset[\"summary_purpose\"]\n", + " source_metadata.description = meta_dict_for_dataset[\"description\"]\n", + " source_metadata.accessConstraints = meta_dict_for_dataset[\"public_access\"]\n", + " source_metadata.save()\n", + " \n", + " return" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "def export_fgdc_metadata(one_feature_class):\n", + " \"\"\"\n", + " Export XML as FGDC format, \n", + " that's the only one that keeps field names and definitions\n", + " available.\n", + " \"\"\"\n", + " this_feature_class = feature_class_in_gdb_path(\n", + " staging_location, \n", + " one_feature_class\n", + " )\n", + " \n", + " subset_meta_dict = meta_dict[one_feature_class]\n", + "\n", + " update_metadata_class(this_feature_class, subset_meta_dict)\n", + " \n", + " source_metadata = md.Metadata(this_feature_class)\n", + " \n", + " # Export metadata XML in FGDC \n", + " meta_output = os.path.join(working_dir, \n", + " f\"./{one_feature_class}_fgdc.xml\")\n", + " \n", + " TRANSLATOR = \"FGDC_CSDGM\" \n", + "\n", + " source_metadata.exportMetadata(\n", + " outputPath = meta_output, \n", + " metadata_export_option = TRANSLATOR\n", + " )\n", + " print(f\"Exported FGDC XML for {one_feature_class}\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Do field data dictionary updates in Jupyter Hub\n", + "### Use shapefile and write it to a file gdb layer" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# Clean up last run (if applicable)\n", + "for f in in_features:\n", + " feature_path = f\"{working_dir}\\{f}.xml\"\n", + " if os.path.exists(feature_path):\n", + " os.remove(feature_path)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "def shp_to_feature_class(file_name: str):\n", + " \"\"\"\n", + " From shapefile (directory of files), unpack those\n", + " and write it to our staging gdb as a feature class.\n", + " \"\"\"\n", + " # construct the filename, which is takes form of routes_assembled/routes_assembled.shp\n", + " shp_file_name = f\"{os.path.join(file_name, f'{file_name}.shp')}\"\n", + " \n", + " this_feature_class = os.path.join(staging_location, file_name)\n", + " \n", + " if arcpy.Exists(this_feature_class): \n", + " arcpy.management.Delete(this_feature_class)\n", + "\n", + " # Execute FeatureClassToGeodatabase\n", + " arcpy.FeatureClassToGeodatabase_conversion(\n", + " shp_file_name, \n", + " staging_location\n", + " )\n", + " \n", + " # Print field names, just in case it needs renaming\n", + " # get a list of fields for each feature class\n", + " field_list = arcpy.ListFields(this_feature_class) \n", + " \n", + " print(this_feature_class)\n", + " for field in field_list: \n", + " print(field.name)\n", + " \n", + " return\n", + "\n", + "\n", + "for f in in_features:\n", + " shp_to_feature_class(f)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "def rename_columns_with_dict(this_feature_class, rename_dict: dict):\n", + " \"\"\"\n", + " Get a list of fields for each feature class and use a dict to rename.\n", + " To change field names, must use AlterField_management, \n", + " because changing it in XML won't carry through when you sync\n", + " \"\"\"\n", + " field_list = arcpy.ListFields(this_feature_class) \n", + "\n", + " for field in field_list: \n", + " if field.name in rename_dict: \n", + " arcpy.AlterField_management(\n", + " this_feature_class, \n", + " field.name, \n", + " rename_dict[field.name], # new_field_name\n", + " rename_dict[field.name] # new_field_alias\n", + " ) \n", + " return" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "def update_feature_class_with_json(one_feature_class, meta_json_dict: dict):\n", + " \"\"\"\n", + " Update a single feature class.\n", + " Rename columns, apply FGDC metadata fields \n", + " template, and update metadata class attributes\n", + " that can be accessed through the arcpy.metadata class.\n", + " \"\"\"\n", + " this_feature_class = feature_class_in_gdb_path(\n", + " staging_location, \n", + " one_feature_class\n", + " )\n", + " \n", + " subset_meta_dict = meta_json_dict[one_feature_class]\n", + " \n", + " if \"rename_cols\" in subset_meta_dict.keys(): \n", + " rename_dict = subset_meta_dict[\"rename_cols\"]\n", + "\n", + " rename_columns_with_dict(this_feature_class, rename_dict)\n", + " \n", + " # Check that renaming is done\n", + " print(this_feature_class)\n", + " check_fields = arcpy.ListFields(this_feature_class)\n", + " for field in check_fields:\n", + " print(field.name)\n", + " \n", + " # Sync with FGDC metadata \n", + " # (this is on the one_feature_class, which sits outside of staging/)\n", + " #import_fgdc_metadata_and_sync(one_feature_class)\n", + " \n", + " # Now update the rest of the metadata elements\n", + " update_metadata_class(this_feature_class, subset_meta_dict)\n", + "\n", + " return\n", + "\n", + " \n", + "for f in in_features:\n", + " update_feature_class_with_json(f, meta_dict)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "'''\n", + "# if there are updates to data_dictionary.yml, this needs to be run\n", + "# so fields reflect new definitions.\n", + "for f in in_features:\n", + " export_fgdc_metadata(f)\n", + "'''" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for f in in_features:\n", + " this_feature_class = feature_class_in_gdb_path(staging_location, f)\n", + "\n", + " # Original metadata\n", + " # Migrating to Pro: https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/migrating-from-arcmap-to-arcgis-pro.htm\n", + "\n", + " source_metadata = md.Metadata(this_feature_class)\n", + " # Export metadata XML \n", + " meta_output = os.path.join(working_dir, f\"{f}.xml\")\n", + " \n", + " # In ArcGIS Pro, instead of FGDC for Desktop, use ISO 19139 GML 3.2\n", + " # https://sv03tmcpo.ct.dot.ca.gov/portal/apps/sites/#/geep/pages/open-data-request\n", + " TRANSLATOR = \"ISO19139_GML32\" \n", + " \n", + " source_metadata.exportMetadata(\n", + " outputPath = meta_output, \n", + " metadata_export_option = TRANSLATOR\n", + " )\n", + " \n", + " print(f\"successful export: {f}\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Update XML in JupyterHub\n", + "\n", + "Run `python metadata_update_pro.py`\n", + "\n", + "### Import FGDC metadata for each dataset manually\n", + "The button to Metadata > Import > type of metadata set to FGDC does something different than the `metadata.importMetadata` feature, which doesn't do it. Manually doing the import for the fgdb metadata works for each dataset only.\n", + "\n", + "Do this FGDC metadata first to get the field descriptions populated. If we do this second, certain items in the metadata will get overwritten and set to blank.\n", + "\n", + "Somewhere once FGDC applied first, it erases the tags we included. Sad.\n", + "\n", + "### With new XML, finish up workflow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Write layers to open_data gdb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# Write layers to open_data (with the overwritten and updated XML already)\n", + "def write_feature_class_to_open_data(\n", + " one_feature_class,\n", + " staging_gdb = staging_location, \n", + " output_gdb = out_location, \n", + "):\n", + " \"\"\"\n", + " Move the feature class from the staging gdb to the output gdb.\n", + " Delete the feature class in the output gdb because\n", + " we don't want _1 appended to the end\n", + " \"\"\"\n", + " staging_feature_class = feature_class_in_gdb_path(\n", + " staging_gdb, \n", + " one_feature_class\n", + " )\n", + " out_feature_class = feature_class_in_gdb_path(\n", + " output_gdb, \n", + " one_feature_class\n", + " )\n", + " \n", + " if arcpy.Exists(out_feature_class): \n", + " arcpy.management.Delete(out_feature_class)\n", + "\n", + " # Copy over the feature class from staging.gdb to open_data.gdb\n", + " arcpy.conversion.FeatureClassToFeatureClass(\n", + " staging_feature_class, \n", + " output_gdb, \n", + " one_feature_class\n", + " )\n", + " \n", + " arcpy.conversion.FeatureClassToFeatureClass(\n", + " staging_feature_class, \n", + " output_gdb, \n", + " one_feature_class\n", + " )\n", + " \n", + " return\n", + " \n", + "\n", + "for f in in_features:\n", + " write_feature_class_to_open_data(f)\n", + " print(f\"in open_data.gdb: {f}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Exit and restart ArcPro to clear locks on layers in overwriting\n", + "\n", + "If we don't exit, the layer will be locked because it shows we're already using it (staging to open_data), and it will prevent writing from open_data to the enterprise gdb.\n", + "\n", + "License Select must be set to `Advanced` for this to work" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "ENTERPRISE_DATABASE = \"Database Connections/HQrail(edit)@sv03tmcsqlprd1.sde\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for f in in_features:\n", + " out_feature_class = feature_class_in_gdb_path(out_location, f)\n", + " \n", + " arcpy.FeatureClassToFeatureClass_conversion(\n", + " in_features = out_feature_class,\n", + " out_path = ENTERPRISE_DATABASE,\n", + " out_name = f\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [] + } + ], + "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": 4 +} diff --git a/open_data/arcgis_pro_script.py b/open_data/arcgis_pro_script.py index 1bf13d3db..b5745d9ea 100644 --- a/open_data/arcgis_pro_script.py +++ b/open_data/arcgis_pro_script.py @@ -213,6 +213,7 @@ def update_feature_class_with_json(one_feature_class, meta_json_dict: dict): ### (4) UPDATE XML METADATA SEPARATELY IN PYTHON OUTSIDE OF ARCGIS IN JUPYTERHUB +# Run `python metadata_update_pro.py` ## Import FGDC metadata for each dataset manually # The button to Metadata > Import > type of metadata set to FGDC does something different than the `metadata.importMetadata` feature, which doesn't do it. Manually doing the import for the fgdb metadata works for each dataset only. diff --git a/open_data/metadata.json b/open_data/metadata.json index 6a455e678..a62a99df8 100644 --- a/open_data/metadata.json +++ b/open_data/metadata.json @@ -1 +1 @@ -{"ca_hq_transit_areas": {"dataset_name": "ca_hq_transit_areas", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Estimated High Quality Transit Areas as described in Public Resources Code 21155, 21064.3, 21060.2.", "description": "Use GTFS schedule trips, stop_times, shapes, and stops to estimate whether corridor segments have scheduled frequencies of 15 minutes or less.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Land Use, Transit-Oriented Development, TOD, High Quality Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/high_quality_transit_areas/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Eric Dasmalchi", "contact_email": "eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated using a spatial process derived from General Transit Feed Specification (GTFS) schedule data. To find high-quality bus corridors, we split each corridor into 1,500 meter segments and counted frequencies at the stop within that segment with the highest number of transit trips. If that stop saw at least 4 trips per hour for at least one hour in the morning, and again for at least one hour in the afternoon, we consider that segment a high-quality bus corridor. Segments without a stop are not considered high-quality corridors. Major transit stops were identified as either the intersection of two high-quality corridors from the previous step, a rail or bus rapid transit station, or a ferry terminal with bus service. Note that the definition of `bus rapid transit` in Public Resources Code 21060.2 includes features not captured by available data sources, these features were captured manually using information from transit agency sources and imagery. We believe this data to be broadly accurate, and fit for purposes including overall dashboards, locating facilities in relation to high quality transit areas, and assessing community transit coverage. However, the spatial determination of high-quality transit areas from GTFS data necessarily involves some assumptions as described above. Any critical determinations of whether a specific parcel is located within a high-quality transit area should be made in conjunction with local sources, such as transit agency timetables. Notes: Null values may be present. The `hqta_details` columns defines which part of the Public Resources Code definition the HQTA classification was based on. If `hqta_details` references a single operator, then `agency_secondary` and `base64_url_secondary` are null. If `hqta_details` references the same operator, then `agency_secondary` and `base64_url_secondary` are the same as `agency_primary` and `base64_url_primary`.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_HQ_Transit_Areas/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"agency_pri": "agency_primary", "agency_sec": "agency_secondary", "hqta_detai": "hqta_details", "base64_url": "base64_url_primary", "base64_u_1": "base64_url_secondary", "org_id_pri": "org_id_primary", "org_id_sec": "org_id_secondary"}}, "ca_hq_transit_stops": {"dataset_name": "ca_hq_transit_stops", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Estimated stops along High Quality Transit Corridors, plus major transit stops for bus rapid transit, ferry, rail modes as described in Public Resources Code 21155, 21064.3, 21060.2.", "description": "Use GTFS schedule trips, stop_times, shapes, and stops to estimate whether corridor segments have scheduled frequencies of 15 minutes or less.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Land Use, Transit-Oriented Development, TOD, High Quality Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/high_quality_transit_areas/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Eric Dasmalchi", "contact_email": "eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated using a spatial process derived from General Transit Feed Specification (GTFS) schedule data. To find high-quality bus corridors, we split each corridor into 1,500 meter segments and counted frequencies at the stop within that segment with the highest number of transit trips. If that stop saw at least 4 trips per hour for at least one hour in the morning, and again for at least one hour in the afternoon, we consider that segment a high-quality bus corridor. Segments without a stop are not considered high-quality corridors. Major transit stops were identified as either the intersection of two high-quality corridors from the previous step, a rail or bus rapid transit station, or a ferry terminal with bus service. Note that the definition of `bus rapid transit` in Public Resources Code 21060.2 includes features not captured by available data sources, these features were captured manually using information from transit agency sources and imagery. We believe this data to be broadly accurate, and fit for purposes including overall dashboards, locating facilities in relation to high quality transit areas, and assessing community transit coverage. However, the spatial determination of high-quality transit areas from GTFS data necessarily involves some assumptions as described above. Any critical determinations of whether a specific parcel is located within a high-quality transit area should be made in conjunction with local sources, such as transit agency timetables. Notes: Null values may be present. The `hqta_details` columns defines which part of the Public Resources Code definition the HQTA classification was based on. If `hqta_details` references a single operator, then `agency_secondary` and `base64_url_secondary` are null. If `hqta_details` references the same operator, then `agency_secondary` and `base64_url_secondary` are the same as `agency_primary` and `base64_url_primary`.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_HQ_Transit_Stops/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"agency_pri": "agency_primary", "agency_sec": "agency_secondary", "hqta_detai": "hqta_details", "base64_url": "base64_url_primary", "base64_u_1": "base64_url_secondary", "org_id_pri": "org_id_primary", "org_id_sec": "org_id_secondary"}}, "ca_transit_routes": {"dataset_name": "ca_transit_routes", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Provide all CA transit stops and routes (geospatial) from all transit operators.", "description": "Provide compiled GTFS schedule data in geospatial format. Transit routes associates route information to shapes. Transit stops associates aggregated stop times and route information aggregated for each stops.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, GTFS, Transit routes, Transit stops, Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/open_data/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was assembled from the General Transit Feed Specification (GTFS) schedule data. GTFS tables are text files, but these have been compiled for all operators and transformed into geospatial data, with minimal data processing. The transit routes dataset is assembled from two tables: (1) `shapes.txt`, which defines the route alignment path, and (2) `trips.txt` and `stops.txt`, for routes not found in `shapes.txt`. `shapes.txt` is an optional GTFS table with richer information than just transit stop longitude and latitude. The transit stops dataset is assembled from `stops.txt`, which contains information about the route, stop sequence, and stop longitude and latitude. References: https://gtfs.org/. https://gtfs.org/schedule/reference/#shapestxt. https://gtfs.org/schedule/reference/#stopstxt. https://gtfs.org/schedule/reference/#tripstxt.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_Transit_Routes/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"caltrans_district": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "agency_name_primary": "agency_primary", "agency_name_secondary": "agency_secondary", "route_name_used": "route_name", "route_types_served": "routetypes", "n_hours_in": "n_hours_in_service", "route_ids_": "route_ids_served"}}, "ca_transit_stops": {"dataset_name": "ca_transit_stops", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Provide all CA transit stops and routes (geospatial) from all transit operators.", "description": "Provide compiled GTFS schedule data in geospatial format. Transit routes associates route information to shapes. Transit stops associates aggregated stop times and route information aggregated for each stops.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, GTFS, Transit routes, Transit stops, Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/open_data/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was assembled from the General Transit Feed Specification (GTFS) schedule data. GTFS tables are text files, but these have been compiled for all operators and transformed into geospatial data, with minimal data processing. The transit routes dataset is assembled from two tables: (1) `shapes.txt`, which defines the route alignment path, and (2) `trips.txt` and `stops.txt`, for routes not found in `shapes.txt`. `shapes.txt` is an optional GTFS table with richer information than just transit stop longitude and latitude. The transit stops dataset is assembled from `stops.txt`, which contains information about the route, stop sequence, and stop longitude and latitude. References: https://gtfs.org/. https://gtfs.org/schedule/reference/#shapestxt. https://gtfs.org/schedule/reference/#stopstxt. https://gtfs.org/schedule/reference/#tripstxt.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_Transit_Stops/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"caltrans_district": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "agency_name_primary": "agency_primary", "agency_name_secondary": "agency_secondary", "route_name_used": "route_name", "route_types_served": "routetypes", "n_hours_in": "n_hours_in_service", "route_ids_": "route_ids_served"}}, "speeds_by_stop_segments": {"dataset_name": "speeds_by_stop_segments", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Average all-day, peak, and offpeak transit speeds by segments for all CA operators that provide GTFS real-time vehicle positions data.", "description": "All day and peak transit 20th, 50th, and 80th percentile speeds on stop segments estimated on a single day for all CA transit operators that provide GTFS real-time vehicle positions data.", "public_access": "Public.", "creation_date": "2023-06-14", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Transit, GTFS, GTFS RT, real time, speeds, vehicle positions ", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/rt_segment_speeds/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku / Eric Dasmalchi", "contact_email": "tiffany.ku@dot.ca.gov / eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated by combining GTFS real-time vehicle positions to GTFS scheduled trips, shapes, stops, and stop times tables. GTFS shapes provides the route alignment path. Multiple trips may share the same shape, with a route typically associated with multiple shapes. Shapes are cut into segments at stop positions (stop_id-stop_sequence combination). A `stop segment` refers to the portion of shapes between the prior stop and the current stop. Vehicle positions are spatially joined to 35 meter buffered segments. Within each segment-trip, the first and last vehicle position observed are used to calculate the speed. Since multiple trips may occur over a segment each day, the multiple trip speeds provide a distribution. From this distribution, the 20th percentile, 50th percentile (median), and 80th percentile speeds are calculated. For all day speed metrics, all trips are used. For peak speed metrics, only trips with start times between 7 - 9:59 AM and 4 - 7:59 PM are used to find the 20th, 50th, and 80th percentile metrics. Data processing notes: (a) GTFS RT trips whose vehicle position timestamps span 10 minutes or less are dropped. Incomplete data would lead to unreliable estimates of speed at the granularity we need. (b) Segment-trip speeds of over 70 mph are excluded. These are erroneously calculated as transit does not typically reach those speeds. (c) Other missing or erroneous calculations, either arising from only one vehicle position found in a segment (change in time or change in distance cannot be calculated).", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/Speeds_By_Stop_Segments/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"stop_seque": "stop_sequence", "time_of_da": "time_of_day", "time_perio": "time_period", "district_n": "district_name", "direction_": "direction_id", "common_sha": "common_shape_id", "avg_sched_": "avg_sched_trip_min", "avg_rt_tri": "avg_rt_trip_min", "caltrans_d": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "stop_pair_": "stop_pair_name"}}, "speeds_by_route_time_of_day": {"dataset_name": "speeds_by_route_time_of_day", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Average transit speeds by route-direction estimated on a single day for all CA transit operators that provide GTFS real-time vehicle positions data.", "description": "Provide average transit speeds, number of trips by route-direction.", "public_access": "Public.", "creation_date": "2023-06-14", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Transit, GTFS, GTFS RT, real time, speeds, vehicle positions ", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/rt_segment_speeds/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated by combining GTFS real-time vehicle positions with GTFS scheduled trips and shapes. GTFS real-time (RT) vehicle positions are spatially joined to GTFS scheduled shapes, so only vehicle positions traveling along the route alignment path are kept. A sample of five vehicle positions are selected (min, 25th percentile, 50th percentile, 75th percentile, max). The trip speed is calculated using these five vehicle positions. Each trip is categorized into a time-of-day. The average speed for a route-direction-time_of_day is calculated. Additional metrics are stored, such as the number of trips observed, the average scheduled service minutes, and the average RT observed service minutes. For convenience, we also provide a singular shape (common_shape_id) to associate with a route-direction. This is the shape that had the most number of trips for a given route-direction. Time-of-day is determined by the GTFS scheduled trip start time. The trip start hour (military time) is categorized based on the following: Owl (0-3), Early AM (4-6), AM Peak (7-9), Midday (10-14), PM Peak (15-19), and Evening (20-23). The start and end hours are inclusive (e.g., 4-6 refers to 4am, 5am, and 6am).", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/Speeds_By_Route_Time_of_Day/FeatureServer", "revision_date": "2024-09-18", "rename_cols": {"stop_seque": "stop_sequence", "time_of_da": "time_of_day", "time_perio": "time_period", "district_n": "district_name", "direction_": "direction_id", "common_sha": "common_shape_id", "avg_sched_": "avg_sched_trip_min", "avg_rt_tri": "avg_rt_trip_min", "caltrans_d": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "stop_pair_": "stop_pair_name"}}} \ No newline at end of file +{"ca_hq_transit_areas": {"dataset_name": "ca_hq_transit_areas", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Estimated High Quality Transit Areas as described in Public Resources Code 21155, 21064.3, 21060.2.", "description": "Use GTFS schedule trips, stop_times, shapes, and stops to estimate whether corridor segments have scheduled frequencies of 15 minutes or less.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Land Use, Transit-Oriented Development, TOD, High Quality Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/high_quality_transit_areas/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Eric Dasmalchi", "contact_email": "eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated using a spatial process derived from General Transit Feed Specification (GTFS) schedule data. To find high-quality bus corridors, we split each corridor into 1,500 meter segments and counted frequencies at the stop within that segment with the highest number of transit trips. If that stop saw at least 4 trips per hour for at least one hour in the morning, and again for at least one hour in the afternoon, we consider that segment a high-quality bus corridor. Segments without a stop are not considered high-quality corridors. Major transit stops were identified as either the intersection of two high-quality corridors from the previous step, a rail or bus rapid transit station, or a ferry terminal with bus service. Note that the definition of `bus rapid transit` in Public Resources Code 21060.2 includes features not captured by available data sources, these features were captured manually using information from transit agency sources and imagery. We believe this data to be broadly accurate, and fit for purposes including overall dashboards, locating facilities in relation to high quality transit areas, and assessing community transit coverage. However, the spatial determination of high-quality transit areas from GTFS data necessarily involves some assumptions as described above. Any critical determinations of whether a specific parcel is located within a high-quality transit area should be made in conjunction with local sources, such as transit agency timetables. Notes: Null values may be present. The `hqta_details` columns defines which part of the Public Resources Code definition the HQTA classification was based on. If `hqta_details` references a single operator, then `agency_secondary` and `base64_url_secondary` are null. If `hqta_details` references the same operator, then `agency_secondary` and `base64_url_secondary` are the same as `agency_primary` and `base64_url_primary`.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_HQ_Transit_Areas/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"agency_pri": "agency_primary", "agency_sec": "agency_secondary", "hqta_detai": "hqta_details", "base64_url": "base64_url_primary", "base64_u_1": "base64_url_secondary", "org_id_pri": "org_id_primary", "org_id_sec": "org_id_secondary"}}, "ca_hq_transit_stops": {"dataset_name": "ca_hq_transit_stops", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Estimated stops along High Quality Transit Corridors, plus major transit stops for bus rapid transit, ferry, rail modes as described in Public Resources Code 21155, 21064.3, 21060.2.", "description": "Use GTFS schedule trips, stop_times, shapes, and stops to estimate whether corridor segments have scheduled frequencies of 15 minutes or less.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Land Use, Transit-Oriented Development, TOD, High Quality Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/high_quality_transit_areas/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Eric Dasmalchi", "contact_email": "eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated using a spatial process derived from General Transit Feed Specification (GTFS) schedule data. To find high-quality bus corridors, we split each corridor into 1,500 meter segments and counted frequencies at the stop within that segment with the highest number of transit trips. If that stop saw at least 4 trips per hour for at least one hour in the morning, and again for at least one hour in the afternoon, we consider that segment a high-quality bus corridor. Segments without a stop are not considered high-quality corridors. Major transit stops were identified as either the intersection of two high-quality corridors from the previous step, a rail or bus rapid transit station, or a ferry terminal with bus service. Note that the definition of `bus rapid transit` in Public Resources Code 21060.2 includes features not captured by available data sources, these features were captured manually using information from transit agency sources and imagery. We believe this data to be broadly accurate, and fit for purposes including overall dashboards, locating facilities in relation to high quality transit areas, and assessing community transit coverage. However, the spatial determination of high-quality transit areas from GTFS data necessarily involves some assumptions as described above. Any critical determinations of whether a specific parcel is located within a high-quality transit area should be made in conjunction with local sources, such as transit agency timetables. Notes: Null values may be present. The `hqta_details` columns defines which part of the Public Resources Code definition the HQTA classification was based on. If `hqta_details` references a single operator, then `agency_secondary` and `base64_url_secondary` are null. If `hqta_details` references the same operator, then `agency_secondary` and `base64_url_secondary` are the same as `agency_primary` and `base64_url_primary`.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_HQ_Transit_Stops/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"agency_pri": "agency_primary", "agency_sec": "agency_secondary", "hqta_detai": "hqta_details", "base64_url": "base64_url_primary", "base64_u_1": "base64_url_secondary", "org_id_pri": "org_id_primary", "org_id_sec": "org_id_secondary"}}, "ca_transit_routes": {"dataset_name": "ca_transit_routes", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Provide all CA transit stops and routes (geospatial) from all transit operators.", "description": "Provide compiled GTFS schedule data in geospatial format. Transit routes associates route information to shapes. Transit stops associates aggregated stop times and route information aggregated for each stops.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, GTFS, Transit routes, Transit stops, Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/open_data/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was assembled from the General Transit Feed Specification (GTFS) schedule data. GTFS tables are text files, but these have been compiled for all operators and transformed into geospatial data, with minimal data processing. The transit routes dataset is assembled from two tables: (1) `shapes.txt`, which defines the route alignment path, and (2) `trips.txt` and `stops.txt`, for routes not found in `shapes.txt`. `shapes.txt` is an optional GTFS table with richer information than just transit stop longitude and latitude. The transit stops dataset is assembled from `stops.txt`, which contains information about the route, stop sequence, and stop longitude and latitude. References: https://gtfs.org/. https://gtfs.org/schedule/reference/#shapestxt. https://gtfs.org/schedule/reference/#stopstxt. https://gtfs.org/schedule/reference/#tripstxt.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_Transit_Routes/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"caltrans_district": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "agency_name_primary": "agency_primary", "agency_name_secondary": "agency_secondary", "route_name_used": "route_name", "route_types_served": "routetypes", "n_hours_in": "n_hours_in_service", "route_ids_": "route_ids_served"}}, "ca_transit_stops": {"dataset_name": "ca_transit_stops", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Provide all CA transit stops and routes (geospatial) from all transit operators.", "description": "Provide compiled GTFS schedule data in geospatial format. Transit routes associates route information to shapes. Transit stops associates aggregated stop times and route information aggregated for each stops.", "public_access": "Public.", "creation_date": "2022-02-08", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, GTFS, Transit routes, Transit stops, Transit", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/open_data/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was assembled from the General Transit Feed Specification (GTFS) schedule data. GTFS tables are text files, but these have been compiled for all operators and transformed into geospatial data, with minimal data processing. The transit routes dataset is assembled from two tables: (1) `shapes.txt`, which defines the route alignment path, and (2) `trips.txt` and `stops.txt`, for routes not found in `shapes.txt`. `shapes.txt` is an optional GTFS table with richer information than just transit stop longitude and latitude. The transit stops dataset is assembled from `stops.txt`, which contains information about the route, stop sequence, and stop longitude and latitude. References: https://gtfs.org/. https://gtfs.org/schedule/reference/#shapestxt. https://gtfs.org/schedule/reference/#stopstxt. https://gtfs.org/schedule/reference/#tripstxt.", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/CA_Transit_Stops/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"caltrans_district": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "agency_name_primary": "agency_primary", "agency_name_secondary": "agency_secondary", "route_name_used": "route_name", "route_types_served": "routetypes", "n_hours_in": "n_hours_in_service", "route_ids_": "route_ids_served"}}, "speeds_by_stop_segments": {"dataset_name": "speeds_by_stop_segments", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Average all-day, peak, and offpeak transit speeds by segments for all CA operators that provide GTFS real-time vehicle positions data.", "description": "All day and peak transit 20th, 50th, and 80th percentile speeds on stop segments estimated on a single day for all CA transit operators that provide GTFS real-time vehicle positions data.", "public_access": "Public.", "creation_date": "2023-06-14", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Transit, GTFS, GTFS RT, real time, speeds, vehicle positions ", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/rt_segment_speeds/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku / Eric Dasmalchi", "contact_email": "tiffany.ku@dot.ca.gov / eric.dasmalchi@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated by combining GTFS real-time vehicle positions to GTFS scheduled trips, shapes, stops, and stop times tables. GTFS shapes provides the route alignment path. Multiple trips may share the same shape, with a route typically associated with multiple shapes. Shapes are cut into segments at stop positions (stop_id-stop_sequence combination). A `stop segment` refers to the portion of shapes between the prior stop and the current stop. Vehicle positions are spatially joined to 35 meter buffered segments. Within each segment-trip, the first and last vehicle position observed are used to calculate the speed. Since multiple trips may occur over a segment each day, the multiple trip speeds provide a distribution. From this distribution, the 20th percentile, 50th percentile (median), and 80th percentile speeds are calculated. For all day speed metrics, all trips are used. For peak speed metrics, only trips with start times between 7 - 9:59 AM and 4 - 7:59 PM are used to find the 20th, 50th, and 80th percentile metrics. Data processing notes: (a) GTFS RT trips whose vehicle position timestamps span 10 minutes or less are dropped. Incomplete data would lead to unreliable estimates of speed at the granularity we need. (b) Segment-trip speeds of over 70 mph are excluded. These are erroneously calculated as transit does not typically reach those speeds. (c) Other missing or erroneous calculations, either arising from only one vehicle position found in a segment (change in time or change in distance cannot be calculated).", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/Speeds_By_Stop_Segments/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"stop_seque": "stop_sequence", "time_of_da": "time_of_day", "time_perio": "time_period", "district_n": "district_name", "direction_": "direction_id", "common_sha": "common_shape_id", "avg_sched_": "avg_sched_trip_min", "avg_rt_tri": "avg_rt_trip_min", "caltrans_d": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "stop_pair_": "stop_pair_name"}}, "speeds_by_route_time_of_day": {"dataset_name": "speeds_by_route_time_of_day", "publish_entity": "Data & Digital Services / California Integrated Travel Project", "summary_purpose": "Average transit speeds by route-direction estimated on a single day for all CA transit operators that provide GTFS real-time vehicle positions data.", "description": "Provide average transit speeds, number of trips by route-direction.", "public_access": "Public.", "creation_date": "2023-06-14", "place": "California", "status": "completed", "frequency": "monthly", "theme_topic": "transportation", "theme_keywords": "Transportation, Transit, GTFS, GTFS RT, real time, speeds, vehicle positions ", "data_dict_type": "XML", "readme": "https://github.com/cal-itp/data-analyses/blob/main/rt_segment_speeds/README.md", "readme_desc": "This site allows you to access the code used to create this dataset and provides additional explanatory resources.", "contact_organization": "Caltrans", "contact_person": "Tiffany Ku", "contact_email": "tiffany.ku@dot.ca.gov", "horiz_accuracy": "4 meters", "boilerplate_desc": "The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information Use Limitation - The data are made available to the public solely for informational purposes. Information provided in the Caltrans GIS Data Library is accurate to the best of our knowledge and is subject to change on a regular basis, without notice. While Caltrans makes every effort to provide useful and accurate information, we do not warrant the information to be authoritative, complete, factual, or timely. Information is provided on an 'as is' and an 'as available' basis. The Department of Transportation is not liable to any party for any cost or damages, including any direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the access or use of, or the inability to access or use, the Site or any of the Materials or Services described herein.", "boilerplate_license": "Creative Commons 4.0 Attribution.", "methodology": "This data was estimated by combining GTFS real-time vehicle positions with GTFS scheduled trips and shapes. GTFS real-time (RT) vehicle positions are spatially joined to GTFS scheduled shapes, so only vehicle positions traveling along the route alignment path are kept. A sample of five vehicle positions are selected (min, 25th percentile, 50th percentile, 75th percentile, max). The trip speed is calculated using these five vehicle positions. Each trip is categorized into a time-of-day. The average speed for a route-direction-time_of_day is calculated. Additional metrics are stored, such as the number of trips observed, the average scheduled service minutes, and the average RT observed service minutes. For convenience, we also provide a singular shape (common_shape_id) to associate with a route-direction. This is the shape that had the most number of trips for a given route-direction. Time-of-day is determined by the GTFS scheduled trip start time. The trip start hour (military time) is categorized based on the following: Owl (0-3), Early AM (4-6), AM Peak (7-9), Midday (10-14), PM Peak (15-19), and Evening (20-23). The start and end hours are inclusive (e.g., 4-6 refers to 4am, 5am, and 6am).", "data_dict_url": "https://gisdata.dot.ca.gov/arcgis/rest/services/CHrailroad/Speeds_By_Route_Time_of_Day/FeatureServer", "revision_date": "2024-10-16", "rename_cols": {"stop_seque": "stop_sequence", "time_of_da": "time_of_day", "time_perio": "time_period", "district_n": "district_name", "direction_": "direction_id", "common_sha": "common_shape_id", "avg_sched_": "avg_sched_trip_min", "avg_rt_tri": "avg_rt_trip_min", "caltrans_d": "district_name", "organization_source_record_id": "org_id", "organization_name": "agency", "stop_pair_": "stop_pair_name"}}} \ No newline at end of file diff --git a/open_data/xml/ca_transit_routes.xml b/open_data/xml/ca_transit_routes.xml index 6c83f0622..c9abad723 100644 --- a/open_data/xml/ca_transit_routes.xml +++ b/open_data/xml/ca_transit_routes.xml @@ -85,7 +85,7 @@ - 2024-09-18 + 2024-10-16 diff --git a/open_data/xml/ca_transit_stops.xml b/open_data/xml/ca_transit_stops.xml index b383f144d..1a5965092 100644 --- a/open_data/xml/ca_transit_stops.xml +++ b/open_data/xml/ca_transit_stops.xml @@ -85,7 +85,7 @@ - 2024-09-18 + 2024-10-16 diff --git a/open_data/xml/speeds_by_route_time_of_day.xml b/open_data/xml/speeds_by_route_time_of_day.xml index d0ea6d1f1..7a4b73f6f 100644 --- a/open_data/xml/speeds_by_route_time_of_day.xml +++ b/open_data/xml/speeds_by_route_time_of_day.xml @@ -85,7 +85,7 @@ - 2024-09-18 + 2024-10-16 diff --git a/open_data/xml/speeds_by_stop_segments.xml b/open_data/xml/speeds_by_stop_segments.xml index 2b1b8daa2..4d405e9b5 100644 --- a/open_data/xml/speeds_by_stop_segments.xml +++ b/open_data/xml/speeds_by_stop_segments.xml @@ -85,7 +85,7 @@ - 2024-09-18 + 2024-10-16