Skip to content

Enoumy/capy-maps-ui

Repository files navigation

Capy Maps

Hosted on capymaps.com via github pages.

The site is roughtly equivalent to:

curl https://panynj.gov/bin/portauthority/ridepath.json | jq '.results | map({(.consideredStation|tostring) : .})|add|map_values(.destinations | map({(.label|tostring) : .}) | add | map_values(.messages | map({target : .target, eta: .arrivalTimeMessage}) | group_by(.target)[] | {(.[0].target|tostring) : [.[] | .eta]}))'```

for all path stations. Here is the jq query with nicer, non-bash formatting:

.results
| map({( .consideredStation | tostring ) : . })
| add
| map_values(
  .destinations
  | map({( .label | tostring ) : . })
  | add
  | map_values(
    .messages
    | map({ target : .target, eta: .arrivalTimeMessage })
    | group_by(.target)[]
    | {( .[0].target | tostring ) : [ .[] | .eta ]}))