PageSourceSearch

https://metrorouteatlas.net/brtscores/brtscores.js

js metrorouteatlas.net collected 2026-10-02 22:46:34 UTC 13,584 bytes, 171 lines download raw bytes

1"use strict";
2
3const brt2013_basics_categories = ["BRT Basics", "Busway alignment", "Dedicated right-of-way", "Off-board fare collection", "Intersection treatments", "Platform-level boarding"];
4const brt2013_basics_scores = [33,7,7,7,6,6];
5const brt2013_service_categories = ["Service Planning", "Multiple routes", "Peak frequency", "Off-peak frequency", "Express, limited, and local services", "Control center", "Located in top ten corridors", "Hours of operations", "Demand profile", "Multi-corridor network"];
6const brt2013_service_scores = [24,4,3,2,3,3,2,2,3,2];
7const brt2013_infra_categories = ["Infrastructure", "Passing lanes at stations", "Minimizing bus emissions", "Stations set back from intersections", "Center stations", "Pavement quality"];
8const brt2013_infra_scores = [14,4,3,3,2,2];
9const brt2013_stations_categories = ["Station Design and Station-Bus Interface", "Distances between stations", "Safe and comfortable statons", "Number of doors on bus", "Docking bays and sub-stops", "Sliding doors in BRT stations"];
10const brt2013_stations_scores = [10,2,3,3,1,1];
11const brt2013_comms_categories = ["Quality of Service & Passenger Information Systems", "Branding", "Passenger information"];
12const brt2013_comms_scores = [5,3,2];
13const brt2013_integ_categories = ["Integration and Access", "Universal access", "Integration with other public transport", "Pedestrian access", "Secure bicycle parking", "Bicycle lanes", "Bicycle-sharing integration"];
14const brt2013_integ_scores = [14,3,3,3,2,2,1];
15const brt2013_deductions_categories = ["Point Deductions", "Commercial speeds", "Peak passengers per hour per direction (pphpd) below 1,000", "Lack of enforcement of right-of-way", "Significant gap between bus floor and station platform", "Overcrowding", "Poorly-maintained busway, buses, stations, and technology systems"];
16const brt2013_deductions_scores = [-36,-10,-5,-5,-5,-3,-8];
17const brt2013_minimumreq = ["At least 4km length with dedicated lanes", "Score 4 or more points in dedicated right-of-way element", "Score 4 or more points in busway alignment element", "Score 18 or more points across all five BRT Basics elements"];
18const brt2013_thresholds = ["55-69", "70-84", "85-100"];
19
20const brt2014_basics_categories = ["BRT Basics", "Dedicated right-of-way", "Busway alignment", "Off-board fare collection", "Intersection treatments", "Platform-level boarding"];
21const brt2014_basics_scores = [38,8,8,8,7,7];
22const brt2014_service_categories = ["Service Planning", "Multiple routes", "Express, limited, and local services", "Control center", "Located in top ten corridors", "Demand profile", "Hours of operations", "Multi-corridor network"];
23const brt2014_service_scores = [19,4,3,3,2,3,2,2];
24const brt2014_infra_categories = ["Infrastructure", "Passing lanes at stations", "Minimizing bus emissions", "Stations set back from intersections", "Center stations", "Pavement quality"];
25const brt2014_infra_scores = [14,4,3,3,2,2];
26const brt2014_stations_categories = ["Stations", "Distances between stations", "Safe and comfortable statons", "Number of doors on bus", "Docking bays and sub-stops", "Sliding doors in BRT stations"];
27const brt2014_stations_scores = [10,2,3,3,1,1];
28const brt2014_comms_categories = ["Communications", "Branding", "Passenger information"];
29const brt2014_comms_scores = [5,3,2];
30const brt2014_integ_categories = ["Access and Integration", "Universal access", "Integration with other public transport", "Pedestrian access", "Secure bicycle parking", "Bicycle lanes", "Bicycle-sharing integration"];
31const brt2014_integ_scores = [14,3,3,3,2,2,1];
32const brt2014_deductions_categories = ["Point Deductions", "Commercial speeds", "Peak passengers per hour per direction (pphpd) below 1,000", "Lack of enforcement of right-of-way", "Significant gap between bus floor and station platform", "Overcrowding", "Poorly-maintained busway, buses, stations, and technology systems", "Low Peak frequency", "Low Off-peak frequency"];
33const brt2014_deductions_scores = [-45,-10,-5,-5,-5,-5,-10,-3,-2];
34const brt2014_minimumreq = ["At least 3km length with dedicated lanes", "Score 4 or more points in dedicated right-of-way element", "Score 4 or more points in busway alignment element", "Score 20 or more points across all five BRT Basics elements"];
35const brt2014_thresholds = ["55-69", "70-84", "85-100"];
36
37const brt2016_basics_categories = ["BRT Basics", "Dedicated right-of-way", "Busway alignment", "Off-board fare collection", "Intersection treatments", "Platform-level boarding"];
38const brt2016_basics_scores = [38,8,8,8,7,7];
39const brt2016_service_categories = ["Service Planning", "Multiple routes", "Express, limited, and local services", "Control center", "Located in top ten corridors", "Demand profile", "Hours of operations", "Multi-corridor network"];
40const brt2016_service_scores = [19,4,3,3,2,3,2,2];
41const brt2016_infra_categories = ["Infrastructure", "Passing lanes at stations", "Minimizing bus emissions", "Stations set back from intersections", "Center stations", "Pavement quality"];
42const brt2016_infra_scores = [13,3,3,3,2,2];
43const brt2016_stations_categories = ["Stations", "Distances between stations", "Safe and comfortable statons", "Number of doors on bus", "Docking bays and sub-stops", "Sliding doors in BRT stations"];
44const brt2016_stations_scores = [10,2,3,3,1,1];
45const brt2016_comms_categories = ["Communications", "Branding", "Passenger information"];
46const brt2016_comms_scores = [5,3,2];
47const brt2016_integ_categories = ["Access and Integration", "Universal access", "Integration with other public transport", "Pedestrian access", "Secure bicycle parking", "Bicycle lanes", "Bicycle-sharing integration"];
48const brt2016_integ_scores = [15,3,3,4,2,2,1];
49const brt2016_deductions_categories = ["Operations Deductions", "Commercial speeds", "Peak passengers per hour per direction (pphpd) below 1,000", "Lack of enforcement of right-of-way", "Significant gap between bus floor and station platform", "Overcrowding", "Poorly-maintained infrastructure", "Low Peak frequency", "Low Off-peak frequency", "Permitting unsafe bicycle use", "Lack of traffic safety data", "Buses running parallel to BRT Corridor", "Bus bunching"];
50const brt2016_deductions_scores = [-63,-10,-5,-5,-5,-5,-14,-3,-2,-2,-2,-6,-4];
51const brt2016_minimumreq = ["At least 3km length with dedicated lanes", "Score 4 or more points in dedicated right-of-way element", "Score 4 or more points in busway alignment element", "Score 20 or more points across all five BRT Basics elements"];
52const brt2016_thresholds = ["55-69.9", "70-84.9", "85-100"];
53
54// Given a linename from the list, retrieves data
55function renderData(linename) {
56    let lineobj = getScoreData(linename);
57    let basics_cat, basics_sc, service_cat, service_sc, infra_cat, infra_sc, stations_cat, stations_sc, comms_cat, comms_sc, integ_cat, integ_sc, ded_cat, ded_sc, minreq, thr;
58    if (lineobj["standard"] === 2013) {
59        basics_cat = brt2013_basics_categories;
60        basics_sc = brt2013_basics_scores;
61        service_cat = brt2013_service_categories;
62        service_sc = brt2013_service_scores;
63        infra_cat = brt2013_infra_categories;
64        infra_sc = brt2013_infra_scores;
65        stations_cat = brt2013_stations_categories;
66        stations_sc = brt2013_stations_scores;
67        comms_cat = brt2013_comms_categories;
68        comms_sc = brt2013_comms_scores;
69        integ_cat = brt2013_integ_categories;
70        integ_sc = brt2013_integ_scores;
71        ded_cat = brt2013_deductions_categories;
72        ded_sc = brt2013_deductions_scores;
73        minreq = brt2013_minimumreq;
74        thr = brt2013_thresholds;
75    } else if (lineobj["standard"] === 2014) {
76        basics_cat = brt2014_basics_categories;
77        basics_sc = brt2014_basics_scores;
78        service_cat = brt2014_service_categories;
79        service_sc = brt2014_service_scores;
80        infra_cat = brt2014_infra_categories;
81        infra_sc = brt2014_infra_scores;
82        stations_cat = brt2014_stations_categories;
83        stations_sc = brt2014_stations_scores;
84        comms_cat = brt2014_comms_categories;
85        comms_sc = brt2014_comms_scores;
86        integ_cat = brt2014_integ_categories;
87        integ_sc = brt2014_integ_scores;
88        ded_cat = brt2014_deductions_categories;
89        ded_sc = brt2014_deductions_scores;
90        minreq = brt2014_minimumreq;
91        thr = brt2014_thresholds;
92    } else if (lineobj["standard"] === 2016) {
93        basics_cat = brt2016_basics_categories;
94        basics_sc = brt2016_basics_scores;
95        service_cat = brt2016_service_categories;
96        service_sc = brt2016_service_scores;
97        infra_cat = brt2016_infra_categories;
98        infra_sc = brt2016_infra_scores;
99        stations_cat = brt2016_stations_categories;
100        stations_sc = brt2016_stations_scores;
101        comms_cat = brt2016_comms_categories;
102        comms_sc = brt2016_comms_scores;
103        integ_cat = brt2016_integ_categories;
104        integ_sc = brt2016_integ_scores;
105        ded_cat = brt2016_deductions_categories;
106        ded_sc = brt2016_deductions_scores;
107        minreq = brt2016_minimumreq;
108        thr = brt2016_thresholds;
109    }
110    let output = "<br><p><strong>" + lineobj.description + "</strong></p>";
111    output += "<p>Scored Corridor Length: " + lineobj.corridorlength + " km | Scored Portion: " + lineobj.scoredportion + "</p>";
112    output += "<p>Score prior to deductions: <strong>" + lineobj.scores[0] + "</strong> | Final Score: <strong>" + lineobj.scores[1] + "</strong> | Rating: <strong>" + lineobj.scores[2] + "</strong></p>";
113    let i = 0;
114    output += "<div style='display:flex;'>"; // Container div
115    // We will have a four column layout.
116    output += "<div class='brtstandardflextable'><table class='city_table verysmall_table' style='width:100%'>";
117    output += "<tr style='background-color:#CCFFCC'><th>" + basics_cat[0] + "</th><th>" + lineobj["basics"][0] + "/" + basics_sc[0] + "</th></tr>";
118    for (i = 1; i < basics_cat.length; i += 1) {
119        output += "<tr><td>" + basics_cat[i] + "</td><td>" + lineobj["basics"][i] + "/" + basics_sc[i] + "</td></tr>";
120    }
121    output += "<tr style='background-color:#CCFFCC'><th>" + service_cat[0] + "</th><th>" + lineobj["serviceplanning"][0] + "/" + service_sc[0] + "</th></tr>";
122    for (i = 1; i < service_cat.length; i += 1) {
123        output += "<tr><td>" + service_cat[i] + "</td><td>" + lineobj["serviceplanning"][i] + "/" + service_sc[i] + "</td></tr>";
124    }
125    output += "</table></div><div class='brtstandardflextable'><table class='city_table verysmall_table' style='width:100%'>";
126    output += "<tr style='background-color:#CCFFCC'><th>" + infra_cat[0] + "</th><th>" + lineobj["infrastructure"][0] + "/" + infra_sc[0] + "</th></tr>";
127    for (i = 1; i < infra_cat.length; i += 1) {
128        output += "<tr><td>" + infra_cat[i] + "</td><td>" + lineobj["infrastructure"][i] + "/" + infra_sc[i] + "</td></tr>";
129    }
130    output += "<tr style='background-color:#CCFFCC'><th>" + stations_cat[0] + "</th><th>" + lineobj["stations"][0] + "/" + stations_sc[0] + "</th></tr>";
131    for (i = 1; i < stations_cat.length; i += 1) {
132        output += "<tr><td>" + stations_cat[i] + "</td><td>" + lineobj["stations"][i] + "/" + stations_sc[i] + "</td></tr>";
133    }
134    output += "</table></div><div class='brtstandardflextable'><table class='city_table verysmall_table' style='width:100%'>";
135    output += "<tr style='background-color:#CCFFCC'><th>" + comms_cat[0] + "</th><th>" + lineobj["communications"][0] + "/" + comms_sc[0] + "</th></tr>";
136    for (i = 1; i < comms_cat.length; i += 1) {
137        output += "<tr><td>" + comms_cat[i] + "</td><td>" + lineobj["communications"][i] + "/" + comms_sc[i] + "</td></tr>";
138    }
139    output += "<tr style='background-color:#CCFFCC'><th>" + integ_cat[0] + "</th><th>" + lineobj["integrationandaccess"][0] + "/" + integ_sc[0] + "</th></tr>";
140    for (i = 1; i < integ_cat.length; i += 1) {
141        output += "<tr><td>" + integ_cat[i] + "</td><td>" + lineobj["integrationandaccess"][i] + "/" + integ_sc[i] + "</td></tr>";
142    }
143    output += "</table></div><div class='brtstandardflextable'><table class='city_table verysmall_table' style='width:100%'>";
144    output += "<tr style='background-color:#FFCCCC'><th>" + ded_cat[0] + "</th><th>" + lineobj["deductions"][0] + "/" + ded_sc[0] + "</th></tr>";
145    for (i = 1; i < ded_cat.length; i += 1) {
146        output += "<tr><td>" + ded_cat[i] + "</td><td>" + lineobj["deductions"][i] + "/" + ded_sc[i] + "</td></tr>";
147    }
148    output += "</table></div></div>";
149
150    if ("notes" in lineobj) {
151        output += "<div>Notes: " + lineobj["notes"] + "</div>";
152    }
153    output += "<div>Minimum Requirements - " + lineobj["standard"] + " Standard<br>• " + minreq.join(", ") + "</div>";
154    output += "<div>" + lineobj["standard"] + " Standard Thresholds - Bronze: " + thr[0] + " | Silver: " + thr[1] + " | Gold: " + thr[2] + "</div>";
155    output += "<p>Data Sources: " + lineobj["source"] + "</p>";
156    if (lineobj["altlinks"] != "") {
157        output += "<p>Other Scores: " + lineobj["altlinks"] + "</p>";
158    }
159    output += "<div><button type='button' onclick='document.getElementById(\"brtscores_float\").innerHTML = \"\"'>Collapse</button></div>";
160    document.getElementById("brtscores_float").innerHTML = output;
161}
162
163function getScoreData(linename) {
164    let i = 0;
165    for (i = 0; i < brtscorelist.length; i += 1) {
166        if (brtscorelist[i]["name"] === linename) {
167            return brtscorelist[i];
168        }
169    }
170    console.log("getScoreData: Could not find line with name " + linename);
171}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.