From bdca4fbecc0266eec82b46d97c79a12fbf8b1a82 Mon Sep 17 00:00:00 2001 From: Jake Coppinger Date: Sat, 28 Jan 2023 14:45:42 +1100 Subject: [PATCH] Improve safety documentation and loading status --- README.md | 2 +- docs/key.md | 32 +++++++++++++++++++++----------- src/map.tsx | 8 ++++---- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9f0bc84..a7cbcea 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ When zoomed in close, individual road and bicycle lanes are shown. When zoomed o coloured by their safety ratings. # Disclaimer -Warning: This is an arbitrary rating system. Data is not guaranteed to be accurate. +Warning: This is an arbitrary rating system. Data is open source and not guaranteed to be accurate. This map uses OpenStreetMap data. It is not a complete or accurate map of the world and should not be used in such a manner that deficiencies, omissions, inaccuracies or errors could result in death, diff --git a/docs/key.md b/docs/key.md index ebc29d8..380d14d 100644 --- a/docs/key.md +++ b/docs/key.md @@ -2,7 +2,7 @@ Safe Cycling Map ================ Zoom in to see individual lanes, zoom out a little to see street safety. -Warning: This is an arbitrary rating system. Data is not guaranteed to be accurate. +Warning: This is an arbitrary rating system. Data is open source and not guaranteed to be accurate. This map uses OpenStreetMap data. It is not a complete or accurate map of the world and should not be used in such a manner that deficiencies, omissions, inaccuracies or errors could result in death, @@ -14,19 +14,29 @@ propose improvments to the safety rating system). # Key ## Safe streets - green -- Speed is less than or equal to 30kph -- Is a [living street](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dliving_street) -- Is a separated cycleway -- Is a cycle lane separated from the road -- Is a shared path (bikes + pedestrians allowed) +The street satisfies any of the below conditions: +- The speed is less than or equal to 30kph +- It's a [living street](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dliving_street) +- Is has a separated cycleway +- It has a cycle lane separated from the road +- Is has a shared path (bikes + pedestrians allowed) ## More dangerous streets -- Road has a speed limit less than 40kph and greater than 30kmh -- Has an on road, painted (non-separated) bike lane +The street satisfies any of the below conditions: +- It has a speed limit less than 40kph and greater than 30kmh +- It has an on road, painted (non-separated) bike lane ## Dangerous streets -- Speed is higher than 40kmh -- Road is a residental street with default speed limit (50kph) +The street satisfies any of the below conditions: +- It has a speed higher than 40kmh +- It is a residental street with the default speed limit (assumed to be 50kph) ## TODO: Banned streets -Currently banned streets (eg. motorways/Sydney Harbour Bridge) are currently displayed as red. \ No newline at end of file +Currently banned streets (eg. motorways/Sydney Harbour Bridge) are currently displayed as red. + +# Technical details + +These safety ratings are calculated in +https://github.com/jakecoppinger/safe-cycling-map/blob/main/src/osm-selectors.ts + +PRs are very welcome! \ No newline at end of file diff --git a/src/map.tsx b/src/map.tsx index 5201bb0..acc6aad 100644 --- a/src/map.tsx +++ b/src/map.tsx @@ -112,10 +112,10 @@ export function Map() { }); }); const statusMessages = { - loading: "Loading from OpenStreetMap...", - success: "Done loading", - ready_to_load: "About to load...", - too_zoomed_out: "Zoom in to see street safety", + loading: "Loading safety ratings...", + success: "Done loading safety ratings", + ready_to_load: "About to load ratings...", + too_zoomed_out: "Zoom in to see street safety ratings", unknownerror: "Error loading. Please wait a bit", "429error": "Too many requests, please try in a bit", };