Generalize Marey chart and avoid using "Inbound" and "Outbound"
SF Muni uses the terms "Inbound" and "Outbound" for all routes, which are always associated with the GTFS direction_ids '1' and '0' respectively. However, other transit agencies may not use the concept of "Inbound" and "Outbound". Also, routes with branches may contain more than just these two direction IDs.
The Marey Chart currently uses the terms "Inbound" and "Outbound" in the UI to describe the directions, and only supports the direction IDs '1' and '0'.
For it to work for arbitrary transit agencies and routes with multiple branches, it seems like the easiest way would be for the Marey chart to only show 1 direction at a time, which is configured based on the Direction dropdown at the top of the page (removing the radio buttons within the Marey Chart for selecting directions as well as the functionality to overlay inbound/outbound trips on the same graph and to show trips in the the outbound direction in "reverse")
thoughts on this @exxonvaldez ?
There are some nice Marey charts in the MTBA viz ( http://mbtaviz.github.io/ ) that label the terminals on the x-axis. And highlight hovered stops on the map (we've just added a similar highlight capability when using the stops dropdown menus). They also handle a branch by plotting the branch to the right of the other branch (but there's only one branch, not sure how this would look for many branches).
I think using the direction pulldown to show one direction's data is a good starting point. I'm picturing the "overlay" option as a checkbox that says something like "show return trips" or "show reverse trips". This would require us to determine, for the current direction, which other direction is the corresponding return/reverse direction -- pretty easy if there are just two directions, but if there are multiple, not sure if the config yaml would have to specify it, or if we can determine it based on proximity of terminals.
Even for SFMTA, I would prefer to have 2 checkboxes -- it's cleaner.
And Jesse is right that this can get flaky if the agency doesn't use inbound/outbound.

Perhaps we could generalize it to "Toward [Terminal 1]" and "Toward [Terminal 2]"? But sometimes routes branch; not sure how we handle that.
I will note that some cities use inbound/outbound a lot (Boston is the obvious case; I think SF does to an extent). Some don't (PDX and DC, I think). You may have to encode this into the yaml configuration file.
NYC has a weird system too: "uptown and bronx/queens" vs "downtown and queens/bklyn" or something. using terminals for everything is def more robust, but riders do often think in terms of whatever quirky system each city uses.
Re: showing only one direction: Fundamentally a Marey chart should have the ability to show a direction and its “reverse” direction at the same time. This is important in use cases where the user is tracking vehicles across multiple runs and needs a picture what the vehicles did over a long period of time. The use case given by Tal at SFMTA was time to recovery after interruption of service on a line. An extreme example is this: https://blog.data.gov.sg/how-we-caught-the-circle-line-rogue-train-with-data-79405c86ab6a , where by analyzing failures on a line, they correlated them with the movements of a specific train.