{ "cells": [ { "cell_type": "markdown", "id": "254f2546-3218-4548-8132-828037d7a641", "metadata": {}, "source": [ "# Interactive plot of simple vector features (points) with Bokeh and GeoPandas\n", "\n", "Data used: Pilgrim Paths in Ireland ()" ] }, { "cell_type": "code", "execution_count": 1, "id": "bdea9c1b-021a-490b-b008-2bae375ab83c", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# import libraries\n", "import os\n", "from zipfile import ZipFile\n", "\n", "import geopandas as gpd\n", "import pooch\n", "import xyzservices.providers as xyz\n", "from bokeh.io import output_notebook\n", "from bokeh.models import CategoricalColorMapper, GeoJSONDataSource\n", "from bokeh.palettes import Category20b\n", "from bokeh.plotting import figure, show" ] }, { "cell_type": "code", "execution_count": 2, "id": "45f054e6-35bf-4940-a932-51cba972ffb1", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/html": [ " \n", "
\n", " \n", " Loading BokehJS ...\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(\"c5a3f02d-9d23-4d35-b58a-2feacb59df1a\");\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.4.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {display_loaded(error);throw error;\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"c5a3f02d-9d23-4d35-b58a-2feacb59df1a\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# set inline plots\n", "output_notebook()" ] }, { "cell_type": "code", "execution_count": 3, "id": "5857dfb4", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# pilgrims paths dataset\n", "URL = (\n", " \"http://www.heritagecouncil.ie/content/files/Pilgrim-Paths-Shapefiles.zip\"\n", ")\n", "KNOWN_HASH = None\n", "FILE_NAME = \"Pilgrim-Paths-Shapefiles.zip\"\n", "SUB_DIR = os.path.join(\"data\", \"Pilgrim-Paths\")\n", "DATA_FILE = os.path.join(SUB_DIR, FILE_NAME)" ] }, { "cell_type": "code", "execution_count": 4, "id": "5d4a6347", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# download data if necessary\n", "if not os.path.isfile(os.path.join(SUB_DIR, FILE_NAME)):\n", " os.makedirs(SUB_DIR, exist_ok=True)\n", " pooch.retrieve(\n", " url=URL, known_hash=KNOWN_HASH, fname=FILE_NAME, path=SUB_DIR\n", " )" ] }, { "cell_type": "code", "execution_count": 5, "id": "c77b2c38", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/plain": [ "['Pilgrim Paths Shapefiles/PilgrimPaths.cpg',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.dbf',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.prj',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.sbn',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.sbx',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.shp',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.shp.xml',\n", " 'Pilgrim Paths Shapefiles/PilgrimPaths.shx']" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# list of files in the ZIP archive\n", "ZipFile(DATA_FILE).namelist()" ] }, { "cell_type": "code", "execution_count": 6, "id": "f6277054", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# read shapefile data\n", "pilgrim_paths = gpd.read_file(\n", " f\"zip://{DATA_FILE}!\"\n", " + [x for x in ZipFile(DATA_FILE).namelist() if x.endswith(\".shp\")][0]\n", ")" ] }, { "cell_type": "code", "execution_count": 7, "id": "92e6d211", "metadata": { "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", "
Feature_IdFeature_TyHCVector_HLengthProjectionX_Co_ordY_Co_ordZ_Co_ordCountryCounty...Data_SourcCommissionSurvey_ConData_DataResource_PURL_2URL_3URL_1Emailgeometry
01.0Pilgrim WalkNoneNoneITM553160.0884600.0NoneIEDonegal...Data gathered from publicly available websites...The Heritage CouncilP. Reid21/08/2014To promote and aid in the preservation of the ...http://www.colmcille.org/glencolmcillehttp://www.heritagecouncil.ie/landscape/initia...http://www.pilgrimpath.ie/pilgrim-paths-day/tu...liam@fiontrai.ie or oideasgael@eircom.netPOINT (553160.033 884600.238)
12.0Pilgrim WalkNoneNoneITM555550.0878100.0NoneIEDonegal...Data gathered from publicly available websites...The Heritage CouncilP. Reid22/08/2014To promote and aid in the preservation of the ...http://www.irishtrails.ie/Trail/Sliabh-Liag-Pi...http://www.heritagecouncil.ie/landscape/initia...http://www.pilgrimpath.ie/pilgrim-paths-day/sl...info@slieveleaguecliffs.iePOINT (555550.005 878100.224)
23.0Pilgrim WalkNoneNoneITM609000.0873200.0NoneIEDonegal...Data gathered from publicly available websites...The Heritage CouncilP. Reid23/08/2014To promote and aid in the preservation of the ...http://www.irishtrails.ie/Trail/Lough-Derg-Pil...http://www.heritagecouncil.ie/fileadmin/user_u...http://www.pilgrimpath.ie/pilgrim-paths-day/lo...info@loughderg.orgPOINT (609000.015 873200.115)
34.0Pilgrim WalkNoneNoneITM515400.0779340.0NoneIEMayo...Data gathered from publicly available websites...The Heritage CouncilP. Reid24/08/2014To promote and aid in the preservation of the ...http://www.mayo-ireland.ie/en/towns-villages/b...http://www.heritagecouncil.ie/landscape/initia...http://www.pilgrimpath.ie/pilgrim-paths-day/to...info@ballintubberabbey.iePOINT (515399.821 779340.039)
45.0Pilgrim WalkNoneNoneITM621000.0730700.0NoneIEOffaly...Data gathered from publicly available websites...The Heritage CouncilP. Reid25/08/2014To promote and aid in the preservation of the ...http://www.offaly.ie/eng/Services/Heritage/Doc...Nonehttp://www.pilgrimpath.ie/pilgrim-paths-day/sl...info@offalytourism.comPOINT (620999.767 730699.983)
\n", "

5 rows × 34 columns

\n", "
" ], "text/plain": [ " Feature_Id Feature_Ty HCVector_H Length Projection X_Co_ord Y_Co_ord \\\n", "0 1.0 Pilgrim Walk None None ITM 553160.0 884600.0 \n", "1 2.0 Pilgrim Walk None None ITM 555550.0 878100.0 \n", "2 3.0 Pilgrim Walk None None ITM 609000.0 873200.0 \n", "3 4.0 Pilgrim Walk None None ITM 515400.0 779340.0 \n", "4 5.0 Pilgrim Walk None None ITM 621000.0 730700.0 \n", "\n", " Z_Co_ord Country County ... \\\n", "0 None IE Donegal ... \n", "1 None IE Donegal ... \n", "2 None IE Donegal ... \n", "3 None IE Mayo ... \n", "4 None IE Offaly ... \n", "\n", " Data_Sourc Commission \\\n", "0 Data gathered from publicly available websites... The Heritage Council \n", "1 Data gathered from publicly available websites... The Heritage Council \n", "2 Data gathered from publicly available websites... The Heritage Council \n", "3 Data gathered from publicly available websites... The Heritage Council \n", "4 Data gathered from publicly available websites... The Heritage Council \n", "\n", " Survey_Con Data_Data Resource_P \\\n", "0 P. Reid 21/08/2014 To promote and aid in the preservation of the ... \n", "1 P. Reid 22/08/2014 To promote and aid in the preservation of the ... \n", "2 P. Reid 23/08/2014 To promote and aid in the preservation of the ... \n", "3 P. Reid 24/08/2014 To promote and aid in the preservation of the ... \n", "4 P. Reid 25/08/2014 To promote and aid in the preservation of the ... \n", "\n", " URL_2 \\\n", "0 http://www.colmcille.org/glencolmcille \n", "1 http://www.irishtrails.ie/Trail/Sliabh-Liag-Pi... \n", "2 http://www.irishtrails.ie/Trail/Lough-Derg-Pil... \n", "3 http://www.mayo-ireland.ie/en/towns-villages/b... \n", "4 http://www.offaly.ie/eng/Services/Heritage/Doc... \n", "\n", " URL_3 \\\n", "0 http://www.heritagecouncil.ie/landscape/initia... \n", "1 http://www.heritagecouncil.ie/landscape/initia... \n", "2 http://www.heritagecouncil.ie/fileadmin/user_u... \n", "3 http://www.heritagecouncil.ie/landscape/initia... \n", "4 None \n", "\n", " URL_1 \\\n", "0 http://www.pilgrimpath.ie/pilgrim-paths-day/tu... \n", "1 http://www.pilgrimpath.ie/pilgrim-paths-day/sl... \n", "2 http://www.pilgrimpath.ie/pilgrim-paths-day/lo... \n", "3 http://www.pilgrimpath.ie/pilgrim-paths-day/to... \n", "4 http://www.pilgrimpath.ie/pilgrim-paths-day/sl... \n", "\n", " Email geometry \n", "0 liam@fiontrai.ie or oideasgael@eircom.net POINT (553160.033 884600.238) \n", "1 info@slieveleaguecliffs.ie POINT (555550.005 878100.224) \n", "2 info@loughderg.org POINT (609000.015 873200.115) \n", "3 info@ballintubberabbey.ie POINT (515399.821 779340.039) \n", "4 info@offalytourism.com POINT (620999.767 730699.983) \n", "\n", "[5 rows x 34 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# view data\n", "pilgrim_paths.head()" ] }, { "cell_type": "code", "execution_count": 8, "id": "0e8d8d19", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/plain": [ "(13, 34)" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pilgrim_paths.shape" ] }, { "cell_type": "code", "execution_count": 9, "id": "4959d2ef", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/plain": [ "['Feature_Id',\n", " 'Feature_Ty',\n", " 'HCVector_H',\n", " 'Length',\n", " 'Projection',\n", " 'X_Co_ord',\n", " 'Y_Co_ord',\n", " 'Z_Co_ord',\n", " 'Country',\n", " 'County',\n", " 'Local_Auth',\n", " 'Electoral',\n", " 'Townland',\n", " 'Dataset_Na',\n", " 'Object_Typ',\n", " 'Start_Poin',\n", " 'Length_1',\n", " 'Duration',\n", " 'Level_of_D',\n", " 'Map',\n", " 'Contact_Ph',\n", " 'Photo_ID',\n", " 'Object_Own',\n", " 'Landowner',\n", " 'Data_Sourc',\n", " 'Commission',\n", " 'Survey_Con',\n", " 'Data_Data',\n", " 'Resource_P',\n", " 'URL_2',\n", " 'URL_3',\n", " 'URL_1',\n", " 'Email',\n", " 'geometry']" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(pilgrim_paths)" ] }, { "cell_type": "code", "execution_count": 10, "id": "68115077", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/plain": [ "\n", "Name: IRENET95 / Irish Transverse Mercator\n", "Axis Info [cartesian]:\n", "- E[east]: Easting (metre)\n", "- N[north]: Northing (metre)\n", "Area of Use:\n", "- name: Ireland - onshore. United Kingdom (UK) - Northern Ireland (Ulster) - onshore.\n", "- bounds: (-10.56, 51.39, -5.34, 55.43)\n", "Coordinate Operation:\n", "- name: Irish Transverse Mercator\n", "- method: Transverse Mercator\n", "Datum: IRENET95\n", "- Ellipsoid: GRS 1980\n", "- Prime Meridian: Greenwich" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pilgrim_paths.crs" ] }, { "cell_type": "code", "execution_count": 11, "id": "b9d562c2-803e-4c9c-8495-62c96b2b5bca", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# reproject to web mercator\n", "data = pilgrim_paths.to_crs(3857)" ] }, { "cell_type": "code", "execution_count": 12, "id": "68984457-115a-41a4-8b9f-27f3d946d782", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# convert data source to GeoJSON\n", "geo_source = GeoJSONDataSource(geojson=data.to_json())" ] }, { "cell_type": "code", "execution_count": 13, "id": "f8a8eb73-fa0f-4169-9029-98868f853374", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# generate unique colours for each point\n", "const = list(set(data[\"Object_Typ\"]))\n", "palette = Category20b[len(const)]\n", "color_map = CategoricalColorMapper(factors=const, palette=palette)" ] }, { "cell_type": "code", "execution_count": 16, "id": "767c5b8c-68f0-4224-ab61-2c31a73edf7d", "metadata": { "metadata": {} }, "outputs": [], "source": [ "# define title and tooltips\n", "TITLE = \"Pilgrim Paths in Ireland. © Heritage Council.\"\n", "\n", "TOOLTIPS = [\n", " (\"Name\", \"@Object_Typ\"),\n", " (\"County\", \"@County\"),\n", " (\"Townland\", \"@Townland\"),\n", " (\"Start point\", \"@Start_Poin\"),\n", " (\"Length\", \"@Length_1\"),\n", " (\"Difficulty\", \"@Level_of_D\"),\n", "]" ] }, { "cell_type": "code", "execution_count": 17, "id": "e6095dac", "metadata": { "metadata": {} }, "outputs": [ { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"918aa471-e79e-479f-8878-a151a9d00f1a\":{\"version\":\"3.4.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1044\",\"attributes\":{\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1045\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1046\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1054\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1055\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1047\",\"attributes\":{\"text\":\"Pilgrim Paths in Ireland. \\u00a9 Heritage Council.\"}},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1077\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"GeoJSONDataSource\",\"id\":\"p1001\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1002\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1003\"},\"geojson\":\"{\\\"type\\\": \\\"FeatureCollection\\\", \\\"features\\\": [{\\\"id\\\": \\\"0\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 1.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 553160.0, \\\"Y_Co_ord\\\": 884600.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Donegal\\\", \\\"Local_Auth\\\": \\\"Donegal County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Glencolumbkille\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Turas Cholmcille\\\", \\\"Start_Poin\\\": \\\"St. Culumba's Church, Glencolumbkille, Co. Donegal\\\", \\\"Length_1\\\": \\\"5.4 km\\\", \\\"Duration\\\": \\\"3 hours\\\", \\\"Level_of_D\\\": \\\"Difficult\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 10\\\", \\\"Contact_Ph\\\": \\\"074 9730248\\\", \\\"Photo_ID\\\": \\\"PP001\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"21/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.colmcille.org/glencolmcille\\\", \\\"URL_3\\\": \\\"http://www.heritagecouncil.ie/landscape/initiatives/the-pilgrim-paths/turas-gleann-cholm-cille-valley/\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/turas-cholmcille-donegal/\\\", \\\"Email\\\": \\\"liam@fiontrai.ie or oideasgael@eircom.net\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-971462.8036928177, 7305266.883888756]}}, {\\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 2.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 555550.0, \\\"Y_Co_ord\\\": 878100.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Donegal\\\", \\\"Local_Auth\\\": \\\"Donegal County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Shanbally, Ballymore\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Sliabh A'Liag\\\", \\\"Start_Poin\\\": \\\"Car Park on Sliabh Liag, Bunglass, Co. Donegal\\\", \\\"Length_1\\\": \\\"7 km\\\", \\\"Duration\\\": \\\"3.5 hours\\\", \\\"Level_of_D\\\": \\\"Moderate\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 10\\\", \\\"Contact_Ph\\\": \\\"074 9739077\\\", \\\"Photo_ID\\\": \\\"PP002\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"22/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.irishtrails.ie/Trail/Sliabh-Liag-Pilgrim-Path/377/\\\", \\\"URL_3\\\": \\\"http://www.heritagecouncil.ie/landscape/initiatives/the-pilgrim-paths/pilgrim-path-co-offaly/\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/sliabh-aliag-donegal/\\\", \\\"Email\\\": \\\"info@slieveleaguecliffs.ie\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-967224.8219644389, 7294064.759591806]}}, {\\\"id\\\": \\\"2\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 3.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 609000.0, \\\"Y_Co_ord\\\": 873200.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Donegal\\\", \\\"Local_Auth\\\": \\\"Donegal County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Ballymacavany\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Lough Derg\\\", \\\"Start_Poin\\\": \\\"Station Island Visitor Centre, Lough Derg, Ballymacavany, Co. Donegal\\\", \\\"Length_1\\\": \\\"12 km\\\", \\\"Duration\\\": \\\"3 hours\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 11\\\", \\\"Contact_Ph\\\": \\\"071 9861518\\\", \\\"Photo_ID\\\": \\\"PP003\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"23/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.irishtrails.ie/Trail/Lough-Derg-Pilgrim-Path/369/\\\", \\\"URL_3\\\": \\\"http://www.heritagecouncil.ie/fileadmin/user_upload/Publications/Landscape/Lough_Derg_Pilgrim_Paths_Booklet_2004.pdf\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/lough-derg-donegal/\\\", \\\"Email\\\": \\\"info@loughderg.org\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-875048.546558942, 7285959.3291182425]}}, {\\\"id\\\": \\\"3\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 4.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 515400.0, \\\"Y_Co_ord\\\": 779340.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Mayo\\\", \\\"Local_Auth\\\": \\\"Mayo County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Ballintober, Skehanagh Upper\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"T\\\\u00f3char Phadraig\\\", \\\"Start_Poin\\\": \\\"Ballintuber Abbey, Ballintubber, Co. Mayo\\\", \\\"Length_1\\\": \\\"35 km\\\", \\\"Duration\\\": \\\"12 hours\\\", \\\"Level_of_D\\\": \\\"Difficult\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheets 30 & 38\\\", \\\"Contact_Ph\\\": \\\"094 9030934\\\", \\\"Photo_ID\\\": \\\"PP004\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"24/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.mayo-ireland.ie/en/towns-villages/ballintubber/ballintubber-tochar-padraig.html\\\", \\\"URL_3\\\": \\\"http://www.heritagecouncil.ie/landscape/initiatives/the-pilgrim-paths/tochar-phadraig/\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/tochar-phadraig-mayo/\\\", \\\"Email\\\": \\\"info@ballintubberabbey.ie\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-1033369.0312178457, 7124230.84442715]}}, {\\\"id\\\": \\\"4\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 5.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 621000.0, \\\"Y_Co_ord\\\": 730700.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Offaly\\\", \\\"Local_Auth\\\": \\\"Offaly County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Ballycumber\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Sl\\\\u00ed M\\\\u00f3r\\\", \\\"Start_Poin\\\": \\\"Ballycumber Village Shrine, Co. Offaly\\\", \\\"Length_1\\\": \\\"24 km\\\", \\\"Duration\\\": \\\"2 hour cycle\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheets 47 & 48\\\", \\\"Contact_Ph\\\": \\\"057 9325017\\\", \\\"Photo_ID\\\": \\\"PP005\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"25/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.offaly.ie/eng/Services/Heritage/Documents/Pilgrim's_Road.pdf\\\", \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/sli-mor-offaly/\\\", \\\"Email\\\": \\\"info@offalytourism.com\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-855465.1319087902, 7043553.903394217]}}, {\\\"id\\\": \\\"5\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 6.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 694000.0, \\\"Y_Co_ord\\\": 705500.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Wicklow\\\", \\\"Local_Auth\\\": \\\"Wicklow County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Knockroe, Hollywood Upper\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"St. Kevin's Way\\\", \\\"Start_Poin\\\": \\\"St. Kevin's Church, Hollywood, Co. Wicklow\\\", \\\"Length_1\\\": \\\"30 km\\\", \\\"Duration\\\": \\\"9 hours\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 11\\\", \\\"Contact_Ph\\\": \\\"0404 69117\\\", \\\"Photo_ID\\\": \\\"PP006\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"26/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.irishtrails.ie/Trail/St-Kevins-Way---Pilgrim-Path-/371/\\\", \\\"URL_3\\\": \\\"http://visitwicklow.ie/activities/saint-kevins-way/\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/st-kevins-way-wicklow/\\\", \\\"Email\\\": \\\"wicklowtourism@gmail.com\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-734332.2353064562, 6999997.551941214]}}, {\\\"id\\\": \\\"6\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 7.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 527000.0, \\\"Y_Co_ord\\\": 685700.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Clare\\\", \\\"Local_Auth\\\": \\\"Clare County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Doonagurroge, Molougha\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Rath/Dysert Pilgrim Path\\\", \\\"Start_Poin\\\": \\\"St. Blathmac's Church, Rath, Corofin, Co. Clare\\\", \\\"Length_1\\\": \\\"8 km\\\", \\\"Duration\\\": \\\"2.5 hours\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 57\\\", \\\"Contact_Ph\\\": \\\"087 9828173\\\", \\\"Photo_ID\\\": \\\"PP007\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"27/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": null, \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/rathdysert-pilgrim-path/\\\", \\\"Email\\\": \\\"www.facebook.com/CoisceimAnama\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-1011389.0009632518, 6967691.025893156]}}, {\\\"id\\\": \\\"7\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 8.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 590100.0, \\\"Y_Co_ord\\\": 660100.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Tipperary\\\", \\\"Local_Auth\\\": \\\"Tipperary County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"ChurchQuarter\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Kilcommon Pilgrim Loop\\\", \\\"Start_Poin\\\": \\\"Kilcommon Community Centre, Kilcommon, Co. Tipperary\\\", \\\"Length_1\\\": \\\"7 km\\\", \\\"Duration\\\": \\\"2 hours\\\", \\\"Level_of_D\\\": \\\"Moderate\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 59\\\", \\\"Contact_Ph\\\": \\\"0504 22257\\\", \\\"Photo_ID\\\": \\\"PP008\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"28/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.irishtrails.ie/Trail/Kilcommon-Pilgrim-Loop/536/\\\", \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/kilcommon-pilgrim-loop-tipperary/\\\", \\\"Email\\\": \\\"info@bookworm.ie\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-906858.1748692244, 6926219.168457715]}}, {\\\"id\\\": \\\"8\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 9.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 438400.0, \\\"Y_Co_ord\\\": 600500.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Kerry\\\", \\\"Local_Auth\\\": \\\"Kerry County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Cantra\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Cos\\\\u00e1n Na Naomh\\\", \\\"Start_Poin\\\": \\\"Ventry Strand, Ventry, Co. Kerry\\\", \\\"Length_1\\\": \\\"18 km\\\", \\\"Duration\\\": \\\"5.5 hours\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 70\\\", \\\"Contact_Ph\\\": \\\"066 9151188\\\", \\\"Photo_ID\\\": \\\"PP009\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"29/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.irishtrails.ie/Trail/Cosan-na-Naomh--Saints-Road-/370/\\\", \\\"URL_3\\\": \\\"http://www.dingle-peninsula.ie/cosan.html\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/cosan-na-naomh-kerry/\\\", \\\"Email\\\": \\\"dingletio@failteireland.ie\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-1153333.9084324923, 6824156.097322467]}}, {\\\"id\\\": \\\"9\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 10.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 450620.0, \\\"Y_Co_ord\\\": 584540.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Kerry\\\", \\\"Local_Auth\\\": \\\"Kerry County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Killurly West, Dooneen\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"Cnoc Na dTobar\\\", \\\"Start_Poin\\\": \\\"Killurly West, Caherciveen, Co. Kerry\\\", \\\"Length_1\\\": \\\"8 km\\\", \\\"Duration\\\": \\\"3.5 hours\\\", \\\"Level_of_D\\\": \\\"Moderate\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 83\\\", \\\"Contact_Ph\\\": \\\"094 71300\\\", \\\"Photo_ID\\\": \\\"PP010\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"30/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.activeme.ie/guides/walks/knocknadobar-stations-of-the-cross/\\\", \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/cnoc-na-dtobar-kerry/\\\", \\\"Email\\\": \\\"caherciveencrc@eircom.net\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-1132702.4148103257, 6798820.821193198]}}, {\\\"id\\\": \\\"10\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 11.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 513360.0, \\\"Y_Co_ord\\\": 547000.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Cork\\\", \\\"Local_Auth\\\": \\\"Cork County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Dromdaleague\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"St. Finbarr's Pilgrim Path\\\", \\\"Start_Poin\\\": \\\"Top of the Rock Pod Park, Rockmount, Drimoleague, Co. Cork\\\", \\\"Length_1\\\": \\\"33 km\\\", \\\"Duration\\\": \\\"2 Days\\\", \\\"Level_of_D\\\": \\\"Difficult\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 85\\\", \\\"Contact_Ph\\\": \\\"028 31547\\\", \\\"Photo_ID\\\": \\\"PP011\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"31/08/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://topoftherock.ie/st-finbarrs-way/\\\", \\\"URL_3\\\": \\\"http://www.westcorkwalking.com\\\", \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/st-finbarrs-pilgrim-path-cork/\\\", \\\"Email\\\": \\\"david@topoftherock.ie\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-1029990.734071091, 6740449.878113345]}}, {\\\"id\\\": \\\"11\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 12.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 618800.0, \\\"Y_Co_ord\\\": 577400.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Waterford/Tipperary\\\", \\\"Local_Auth\\\": \\\"Waterford & Tipperary County Councils\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Farrangarret, Ardocheasty, Dysert\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"St. Declan's Way\\\", \\\"Start_Poin\\\": \\\"Cliff Road, Ardmore, Co. Waterford\\\", \\\"Length_1\\\": \\\"96 km\\\", \\\"Duration\\\": \\\"4 Days\\\", \\\"Level_of_D\\\": \\\"Moderate to Difficult\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheets 66, 67, 74, 75, 82\\\", \\\"Contact_Ph\\\": \\\"086 3541700\\\", \\\"Photo_ID\\\": \\\"PP012\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"01/09/2014\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.knockmealdownactive.com/active/walks/st-declans-way-walk-ardmore-to-cashel/\\\", \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/st-declans-way-waterford-tipperary/\\\", \\\"Email\\\": \\\"info@knockmealdownactive.com\\\"}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-860111.9832316053, 6790796.869695075]}}, {\\\"id\\\": \\\"12\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"Feature_Id\\\": 13.0, \\\"Feature_Ty\\\": \\\"Pilgrim Walk\\\", \\\"HCVector_H\\\": null, \\\"Length\\\": null, \\\"Projection\\\": \\\"ITM\\\", \\\"X_Co_ord\\\": 672800.0, \\\"Y_Co_ord\\\": 712500.0, \\\"Z_Co_ord\\\": null, \\\"Country\\\": \\\"IE\\\", \\\"County\\\": \\\"Kildare\\\", \\\"Local_Auth\\\": \\\"Kildare County Council\\\", \\\"Electoral\\\": null, \\\"Townland\\\": \\\"Kildare\\\", \\\"Dataset_Na\\\": \\\"Pilgrim Paths of Ireland\\\", \\\"Object_Typ\\\": \\\"St. Brigid's Way\\\", \\\"Start_Poin\\\": \\\"St. Brigid's Monastic City, Kildare Cathedral, Kildare, Co. Kildare.\\\", \\\"Length_1\\\": \\\"11 km\\\", \\\"Duration\\\": \\\"4 hours\\\", \\\"Level_of_D\\\": \\\"Easy\\\", \\\"Map\\\": \\\"OSi Discovery Series Sheet 55\\\", \\\"Contact_Ph\\\": \\\"087 4677632\\\", \\\"Photo_ID\\\": \\\"PP013\\\", \\\"Object_Own\\\": null, \\\"Landowner\\\": null, \\\"Data_Sourc\\\": \\\"Data gathered from publicly available websites, http://www.pilgrimpath.ie/ and from O'Dwyer, J. (2013)Pilgrim Paths in ireland. Cork: Collins Press.\\\", \\\"Commission\\\": \\\"The Heritage Council\\\", \\\"Survey_Con\\\": \\\"P. Reid\\\", \\\"Data_Data\\\": \\\"04/02/2015\\\", \\\"Resource_P\\\": \\\"To promote and aid in the preservation of the known Pilgrim Paths across Ireland.\\\", \\\"URL_2\\\": \\\"http://www.brigidsway.ie/\\\", \\\"URL_3\\\": null, \\\"URL_1\\\": \\\"http://www.pilgrimpath.ie/pilgrim-paths-day/brigids-way-kildare/\\\", \\\"Email\\\": null}, \\\"geometry\\\": {\\\"type\\\": \\\"Point\\\", \\\"coordinates\\\": [-769380.9813498155, 7012280.178899558]}}], \\\"crs\\\": {\\\"type\\\": \\\"name\\\", \\\"properties\\\": {\\\"name\\\": \\\"urn:ogc:def:crs:EPSG::3857\\\"}}}\"}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1078\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1079\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1074\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"size\":{\"type\":\"value\",\"value\":15},\"line_color\":{\"type\":\"value\",\"value\":\"darkslategrey\"},\"line_width\":{\"type\":\"value\",\"value\":0.5},\"fill_color\":{\"type\":\"field\",\"field\":\"Object_Typ\",\"transform\":{\"type\":\"object\",\"name\":\"CategoricalColorMapper\",\"id\":\"p1004\",\"attributes\":{\"palette\":[\"#393b79\",\"#5254a3\",\"#6b6ecf\",\"#9c9ede\",\"#637939\",\"#8ca252\",\"#b5cf6b\",\"#cedb9c\",\"#8c6d31\",\"#bd9e39\",\"#e7ba52\",\"#e7cb94\",\"#843c39\"],\"factors\":[\"Turas Cholmcille\",\"St. Kevin's Way\",\"St. Declan's Way\",\"T\\u00f3char Phadraig\",\"Cos\\u00e1n Na Naomh\",\"Cnoc Na dTobar\",\"Lough Derg\",\"Rath/Dysert Pilgrim Path\",\"St. Brigid's Way\",\"Kilcommon Pilgrim Loop\",\"Sliabh A'Liag\",\"Sl\\u00ed M\\u00f3r\",\"St. Finbarr's Pilgrim Path\"]}}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.7},\"marker\":{\"type\":\"value\",\"value\":\"square_pin\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1075\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"size\":{\"type\":\"value\",\"value\":15},\"line_color\":{\"type\":\"value\",\"value\":\"darkslategrey\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":0.5},\"fill_color\":{\"type\":\"field\",\"field\":\"Object_Typ\",\"transform\":{\"id\":\"p1004\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1},\"marker\":{\"type\":\"value\",\"value\":\"square_pin\"}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1076\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"size\":{\"type\":\"value\",\"value\":15},\"line_color\":{\"type\":\"value\",\"value\":\"darkslategrey\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":0.5},\"fill_color\":{\"type\":\"field\",\"field\":\"Object_Typ\",\"transform\":{\"id\":\"p1004\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2},\"marker\":{\"type\":\"value\",\"value\":\"square_pin\"}}}}},{\"type\":\"object\",\"name\":\"TileRenderer\",\"id\":\"p1081\",\"attributes\":{\"tile_source\":{\"type\":\"object\",\"name\":\"WMTSTileSource\",\"id\":\"p1080\",\"attributes\":{\"url\":\"https://a.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png\",\"max_zoom\":20,\"attribution\":\"© OpenStreetMap contributors © CARTO\"}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1053\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1066\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1067\"},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1068\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1069\",\"attributes\":{\"renderers\":\"auto\",\"tooltips\":[[\"Name\",\"@Object_Typ\"],[\"County\",\"@County\"],[\"Townland\",\"@Townland\"],[\"Start point\",\"@Start_Poin\"],[\"Length\",\"@Length_1\"],[\"Difficulty\",\"@Level_of_D\"]],\"point_policy\":\"follow_mouse\"}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1070\"}]}},\"left\":[{\"type\":\"object\",\"name\":\"MercatorAxis\",\"id\":\"p1061\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"MercatorTicker\",\"id\":\"p1062\",\"attributes\":{\"mantissas\":[1,2,5],\"dimension\":\"lat\"}},\"formatter\":{\"type\":\"object\",\"name\":\"MercatorTickFormatter\",\"id\":\"p1063\",\"attributes\":{\"dimension\":\"lat\"}},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1064\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"MercatorAxis\",\"id\":\"p1056\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"MercatorTicker\",\"id\":\"p1057\",\"attributes\":{\"mantissas\":[1,2,5],\"dimension\":\"lon\"}},\"formatter\":{\"type\":\"object\",\"name\":\"MercatorTickFormatter\",\"id\":\"p1058\",\"attributes\":{\"dimension\":\"lon\"}},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1059\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1060\",\"attributes\":{\"axis\":{\"id\":\"p1056\"},\"grid_line_color\":\"lightgrey\"}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1065\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1061\"},\"grid_line_color\":\"lightgrey\"}}]}}]}};\n const render_items = [{\"docid\":\"918aa471-e79e-479f-8878-a151a9d00f1a\",\"roots\":{\"p1044\":\"ec54e558-ceba-418e-8bac-fef98e1485b6\"},\"root_ids\":[\"p1044\"]}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1044" } }, "output_type": "display_data" } ], "source": [ "# configure plot\n", "p = figure(\n", " title=TITLE,\n", " tools=\"wheel_zoom, pan, reset, hover, save\",\n", " tooltips=TOOLTIPS,\n", " x_axis_type=\"mercator\",\n", " y_axis_type=\"mercator\",\n", ")\n", "\n", "p.grid.grid_line_color = \"lightgrey\"\n", "\n", "p.hover.point_policy = \"follow_mouse\"\n", "\n", "# add data points\n", "p.scatter(\n", " \"x\",\n", " \"y\",\n", " source=geo_source,\n", " size=15,\n", " marker=\"square_pin\",\n", " line_width=0.5,\n", " line_color=\"darkslategrey\",\n", " fill_color={\"field\": \"Object_Typ\", \"transform\": color_map},\n", " fill_alpha=0.7,\n", ")\n", "\n", "# add basemap\n", "p.add_tile(xyz.CartoDB.Voyager)\n", "\n", "show(p)" ] } ], "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.11.0" } }, "nbformat": 4, "nbformat_minor": 5 }