Session Ready
Exercise

Most Traveled To and From Stations

Here we'll look at which stations are most commonly traveled to and from, as well as the ratio of in to out degree. This will tell us which stations are skewed as either having many stations pulling bikes from them or leaving bikes at them. In order for a bike sharing graph like this to work effectively, you can't have too many source or sink stations, otherwise the owner of the network would need to be constantly moving around bikes! Ideally, the network is designed to self correct, and if it's doing that, we expect to see almost all the stations with an in to out degree ratio of around one. First, we're going to look at this in the unweighted case.

Instructions
100 XP
  • Create a data frame containing the following columns.
    • trip_out should contain the "out" degree distribution of trip_g_simp.
    • trip_in should contain the "in" degree distribution.
    • ratio should contain the ratio of "out" degrees divided by "in" degrees.
  • Filter trip_deg for rows where both trip_out and trip_in are greater than 10.
  • Plot a histogram of the filtered ratios.