lib/get-transitive-data.js
function getRouteIndexFromPatternId (pattern: string | number): number {
    const pat = transitiveNetwork.patterns.find(p => p.pattern_id === String(pattern))
    if (!pat) return -1
    return transitiveNetwork.routes.findIndex(r => r.route_id === pat.route_id)
  }
function getRouteIndexFromPatternId (pattern: string | number): number {
    const pat = transitiveNetwork.patterns.find(p => p.pattern_id === String(pattern))
    if (!pat) return -1
    return transitiveNetwork.routes.findIndex(r => r.route_id === pat.route_id)
  }
function getRouteIndexFromPatternId ( pattern : string | number ) : number { const pat = transitiveNetwork . patterns . find ( p => p . pattern_id === String ( pattern ) ) if ( ! pat ) return - 1 return transitiveNetwork . routes . findIndex ( r => r . route_id === pat . route_id ) }
function to convert pattern ID to route ID
function to convert pattern ID to route ID