Skip to content

Commit

Permalink
context guidance for JAT tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter York committed Aug 6, 2024
1 parent fce1c16 commit adc7d4d
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 88 deletions.
65 changes: 42 additions & 23 deletions src/routes/route_check/jat_check/guidance/Guidance.svelte
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
<script lang="ts">
import { Radio } from "govuk-svelte";
import { pairs } from "$lib";
import MovementAssesment from "./MovementAssessment.svelte";
import { guidance } from "./data.ts";
let junctionTypes: string[] = Object.keys(guidance);
let selectedJunctionType: string = junctionTypes[0];
let movementTypes: string[] = [];
let selectedMovementType: string = "";
$: {
movementTypes = Object.keys(guidance[selectedJunctionType]).filter(
(key) => key !== "summary",
);
if (movementTypes.length === 1) {
selectedMovementType = movementTypes[0];
}
}
</script>

<h3>Generic Guidance</h3>
<MovementAssesment
junctionType={"Any type of junction"}
cycleMovement={"Any movement"}
scoreZeroBullets={[
"Cycle movement in potential conflict with heavy motor traffic flow",
"Cycle movement mixed with or crossing traffic with 85th percentile speed exceeding 60kph, or where vehicles accelerate rapidly.",
"Necessary to cross more than one traffic lane (without refuge or protection) to complete cycle movement unless traffic flows are low.",
"Cycle movementcrosses wide junctionentry or exit: e.g. withmerge or diverge taper or slip lane.",
"Pinch points on junction entry or exit (lane width 3.2m-3.9m).",
"Cycle movement affected by very poor surface quality utility reinstatement, gully positioning, debris.",
]}
scoreOneBullets={[
"Cycle movement in potential conflict with moderate traffic flow.",
"Cycle lanes through junction meeting appropriate desirable minimum width requirements for the movement under consideration.",
"Raised table at junction crossed by traffic in potential conflict with cycle movement.",
"Cycle movement made by transiting onto section of shared use footway.",
]}
scoreTwoBullets={[
"Low traffic speed and volume in mixed traffic environment (e.g. accessonly streets in a residential area).",
"Cycle movement separated physically and/or in time from motor traffic and also separated from pedestrians.",
"Cycle movement bypasses junction completely, including via good quality grade separation",
]}
<Radio
label="What type of junction do you need guidance for"
choices={pairs(junctionTypes)}
bind:value={selectedJunctionType}
/>
{#if movementTypes.length > 1}
<Radio
label="What type of movement do you need guidance for"
choices={pairs(movementTypes)}
bind:value={selectedMovementType}
/>
{/if}

{#if guidance[selectedJunctionType][selectedMovementType]}
<MovementAssesment
junctionType={selectedJunctionType}
cycleMovement={selectedMovementType}
summary={guidance[selectedJunctionType].summary}
scoreZeroBullets={guidance[selectedJunctionType][selectedMovementType]
.scoreZero}
scoreOneBullets={guidance[selectedJunctionType][selectedMovementType]
.scoreOne}
scoreTwoBullets={guidance[selectedJunctionType][selectedMovementType]
.scoreTwo}
/>
{/if}
132 changes: 67 additions & 65 deletions src/routes/route_check/jat_check/guidance/MovementAssessment.svelte
Original file line number Diff line number Diff line change
@@ -1,63 +1,76 @@
<script lang="ts">
import { Modal } from "$lib";
import { SecondaryButton } from "govuk-svelte";
export let junctionType: string;
export let cycleMovement: string;
export let summary: string = "";
export let scoreZeroBullets: string[];
export let scoreOneBullets: string[];
export let scoreTwoBullets: string[];
let showModal = false;
function openModal() {
showModal = true;
}
</script>

<h3>{junctionType}: {cycleMovement}</h3>
<table>
<tr>
<th class="has-hover score-zero-header">
Score = 0
<span class="hover-text">
Suitable only for confident existing cyclists, and may be avoided by
some experienced cyclists Conditions are most likely to give rise to the
most common collision types
</span>
</th>
<th class="has-hover score-one-header">
Score = 1
<span class="hover-text">
Likely to be more acceptable to most cyclists, but may still pose
problems for less confident or new cyclists The risk of collisions has
been reduced by design layout or traffic management interventions
</span>
</th>
<th class="has-hover score-two-header">
Score = 2
<span class="hover-text">
Suitable for all potential and existing cyclists The potential for
collisions has been removed, or managed to a high standard of safety for
cyclists
</span>
</th>
</tr>
<tr>
<td class="score-zero">
<ul>
{#each scoreZeroBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
<td class="score-one">
<ul>
{#each scoreOneBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
<td class="score-two">
<ul>
{#each scoreTwoBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
</tr>
</table>
<div>
<SecondaryButton on:click={openModal}>Display guidance</SecondaryButton>
</div>
<Modal title={`Guidance`} bind:open={showModal}>
<h3>{`${junctionType}: ${cycleMovement}`}</h3>
{#if summary}
<p>{summary}</p>
{/if}
<table>
<tr>
<th class="score-zero-header">
Score = 0
<br />
Suitable only for confident existing cyclists, and may be avoided by some
experienced cyclists Conditions are most likely to give rise to the most
common collision types
</th>
<th class="score-one-header">
Score = 1
<br />
Likely to be more acceptable to most cyclists, but may still pose problems
for less confident or new cyclists The risk of collisions has been reduced
by design layout or traffic management interventions
</th>
<th class="has-hover score-two-header">
Score = 2
<br />
Suitable for all potential and existing cyclists The potential for collisions
has been removed, or managed to a high standard of safety for cyclists
</th>
</tr>
<tr>
<td class="score-zero">
<ul>
{#each scoreZeroBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
<td class="score-one">
<ul>
{#each scoreOneBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
<td class="score-two">
<ul>
{#each scoreTwoBullets as bulletPoint}
<li>{bulletPoint}</li>
{/each}
</ul>
</td>
</tr>
</table>
</Modal>

<style>
.score-zero-header {
Expand All @@ -83,19 +96,8 @@
background-color: #e5edd8;
}
td, th {
td,
th {
padding: 0.25em;
}
.has-hover {
position: relative;
}
.hover-text {
visibility: hidden;
position: absolute;
z-index: 1;
}
.has-hover:hover .hover-text {
visibility: visible;
}
</style>
132 changes: 132 additions & 0 deletions src/routes/route_check/jat_check/guidance/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
export const guidance = {
"Any type of junction": {
"Any movement": {
scoreZero: [
"Cycle movement in potential conflict with heavy motor traffic flow",
"Cycle movement mixed with or crossing traffic with 85th percentile speed exceeding 60kph, or where vehicles accelerate rapidly.",
"Necessary to cross more than one traffic lane (without refuge or protection) to complete cycle movement unless traffic flows are low.",
"Cycle movementcrosses wide junctionentry or exit: e.g. withmerge or diverge taper or slip lane.",
"Pinch points on junction entry or exit (lane width 3.2m-3.9m).",
"Cycle movement affected by very poor surface quality utility reinstatement, gully positioning, debris.",
],
scoreOne: [
"Cycle movement in potential conflict with moderate traffic flow.",
"Cycle lanes through junction meeting appropriate desirable minimum width requirements for the movement under consideration.",
"Raised table at junction crossed by traffic in potential conflict with cycle movement.",
"Cycle movement made by transiting onto section of shared use footway.",
],
scoreTwo: [
"Low traffic speed and volume in mixed traffic environment (e.g. accessonly streets in a residential area).",
"Cycle movement separated physically and/or in time from motor traffic and also separated from pedestrians.",
"Cycle movement bypasses junction completely, including via good quality grade separation",
],
},
},
"Simple priority T-junction": {
summary:
"This guidance is in addition to and notwithstanding any of the above “any junction” conditions.",
"Right turn from minor arm": {
scoreZero: [
"Heavy traffic movements and/or high bus and HGV flows in potential conflict with cycle movement, with no physical refuge in the centre of the major road (including ghost island junction).",
],
scoreOne: [
"Central refuge allowing two-stage cycle movement crossing one traffic lane at a time.",
],
scoreTwo: [
"Cycle movement made via crossing of major arm with dedicated cycle signals or cycle priority.",
],
},
"Left turn from major arm": {
scoreZero: [],
scoreOne: ["Side road entry treatment (table across minor arm)."],
scoreTwo: ["Continuous footway and cycle track across minor arm."],
},
"Right turn from major arm": {
scoreZero: [
"Heavy traffic movements and/or high bus and HGV flows in potential conflict with no physical refuge in the centre of major road (including ghost island junction).",
],
scoreOne: [
"Protected turning refuge allowing two stage cycle movement, crossing one lane at a time.",
],
scoreTwo: [
"Cycle movement made via crossing of major arm via dedicated cycle signals or cycle priority",
],
},
"Ahead on major arm, crossing minor arm": {
scoreZero: [
"Congested conditions causing poor visibility for right-turning motor vehicles from major arm.",
"Cycle movement mixed with or crossing traffic with 85th percentile speed exceeding 60kph, or where vehicles accelerate rapidly.Junction corner radius ≥9m, including where off-carriageway cycle track crosses minor arm.",
],
scoreOne: [
"Cycle movement in potential conflict with moderate traffic flow.Junction free from queueing traffic and cycle lane on major arm meeting desirable minimum width requirements.",
"Junction corner radius <9m, including where off-carriageway cycle track crosses minor arm without priority.",
"Side road entry treatment (table across minor arm).",
],
scoreTwo: [
"Off-carriageway cycle track or stepped cycle track alongside major arm, crossing minor arm with priority over turning traffic.",
],
},
},
Crossroads: {
summary:
"This guidance is in addition to and notwithstanding any of the above “any junction” and T junction conditions.",
"Ahead from minor arm": {
scoreZero: [
"Heavy opposing traffic movements with no physical refuge (including ghost island junction).",
],
scoreOne: [
"Protected pocket refuge for ahead cycles allowing two stage movement, crossing one lane at a time.",
],
scoreTwo: [
"Cycle movement made via crossing of major arm via dedicated cycle signals or cycle priority.",
],
},
},
"Traffic Signals": {
summary:
"This guidance is in addition to and notwithstanding any of the above “any junction” conditions.",
"All movements": {
scoreZero: [
"Single or multiple queuing lanes with no cycle lanes or tracks on approaches.",
"Junctions with unsignalised left turn merge/diverge and signalised ahead lanes.",
],
scoreOne: [
"Advance Cycle Stop lines, at least 5m deep and where the signals on the approach are on green for <30% of the cycle time.",
"Signal timings adjusted to provide extended intergreen to suit cycle movement under consideration.",
"Cycle/pedestrian scramble (toucan crossings with all-red stage).",
"Early release for cycles, with enough time to clear junction for cycle movement being considered.",
],
scoreTwo: [
"Cycle movement has no potential conflict with motor traffic, e.g. dedicated cycle stage, conflicting traffic movement held or banned.",
],
},
"Right turn": {
scoreZero: [],
scoreOne: [
"Two-stage right turn viaASL or marked area in front of stop line.",
],
scoreTwo: [
"Two-stage right turn with physically protected waiting area.",
],
},
},
Roundabout: {
summary:
"This guidance is in addition to and notwithstanding any of the above “any junction” conditions.",
"All movements": {
scoreZero: [
"a Any type of roundabout with high traffic throughput.",
"Normal roundabout with multi-lane flared approaches.",
"Any type of roundabout with annular cycle lane marked on the circulatory carriageway.",
],
scoreOne: [
"Compact roundabout or raised mini roundabout with no more than moderate traffic throughput",
"Off-carriageway cycle track with crossings of entries and exits without cycle priority, crossing single traffic lanes with traffic flows < 4000 vehicles per day or 400 HGV/bus flow. ",
"Cycle/pedestrian scramble (toucan crossings with all-red stage).",
],
scoreTwo: [
"Off-carriageway cycle track with crossings of entries and exits with signals or cycle priority.",
],
},
},
};

0 comments on commit adc7d4d

Please sign in to comment.