make_gtfsを使って仮のGTFS(時刻表)を生成する (山陽電鉄の一部)
実際の発車時刻とは異なるが、1時間あたりの本数はなるべく合わせた時刻表。
駅の緯度経度や線路(ルート)形状の情報は、 国土数値情報 鉄道データを利用。
指定したbounding box内の駅のみを対象とする。
実際の発車時刻とは異なるが、1時間あたりの本数はなるべく合わせた時刻表。
駅の緯度経度や線路(ルート)形状の情報は、 国土数値情報 鉄道データを利用。
指定したbounding box内の駅のみを対象とする。
| import csv | |
| import io | |
| import re | |
| import sys | |
| sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') | |
| sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8') | |
| def get_price(s): |
| { | |
| "mcpServers": { | |
| "road_network": { | |
| "command": "uv", | |
| "args": ["run", "./mcp_server_road_network.py"] | |
| } | |
| } | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <!-- modified from https://github.com/frogcat/gtfs-preview/ --> | |
| <title>GTFS to GeoJSON for kepler.gl Trip Layer</title> | |
| <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" /> | |
| <script src="https://unpkg.com/[email protected]/dist/jszip.min.js"></script> | |
| <script src="https://unpkg.com/[email protected]/papaparse.min.js"></script> | |
| </head> |
| import folium | |
| m = folium.Map(location=[35.681, 139.767], zoom_start=15) | |
| m.add_css_link( | |
| "leaflet-dark", | |
| "https://deton.github.io/folium_tripslayer/leaflet-dark.css" | |
| ) | |
| m.save('dark.html') | |
| # leaflet-dark.css: https://dev.to/deepakdevanand/leaflet-map-dark-theme-5ej0 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>GraphFromOSM and sample random points</title> | |
| <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
| integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" | |
| crossorigin=""/> | |
| <script src="https://unpkg.com/[email protected]/dist/leaflet.js" | |
| integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" |
| # lynx-textfragment.patch | |
| Lynx patch to support scroll to text fragment #:~:text= | |
| ## Limitations | |
| * Not support prefix, suffix, textEnd, multiple text fragments(&). | |
| * Not support word boundary. | |
| (for example, | |
| https://blog.chromium.org/2019/12/chrome-80-content-indexing-es-modules.html#:~:text=text | |
| matches `context` before `text`) |