tigop-visualization

this was just awful

Table allRidesTable;
int stationRideCounts[]; 
String stations[] = {
"Centre Ave & PPG Paints Arena",
"North Shore Trail & Fort Duquesne Bridge",
"Ross St & Sixth Ave (Steel Plaza T Station)",
"37th St & Butler St",
"Bigelow Blvd & Fifth Ave",
"Frew St & Schenley Dr",
"Forbes Ave & Market Square",
"Forbes Ave & Grant St",
"Stevenson St & Forbes Ave",
"12th St & Penn Ave",
"Ridge Ave & Brighton Rd (CCAC)",
"17th St & Penn Ave",
"Taylor St & Liberty Ave",
"Liberty Ave & Baum Blvd",
"Shady Ave & Ellsworth Ave",
"Penn Ave & Putnam St (Bakery Square)",
"Alder St & S Highland Ave",
"Maryland Ave & Ellsworth Ave",
"Ivy St & Walnut St",
"Fifth Ave & S Dithridge St",
"Schenley Dr at Schenley Plaza (Carnegie Library Main)",
"Boulevard of the Allies & Parkview Ave",
"Atwood St & Bates",
"Fifth Ave & S Bouquet St",
"Zulema St & Coltart Ave",
"S 27th St & Sidney St. (Southside Works)",
"S 25th St & E Carson St",
"S 22nd St & E Carson St",
"S 12th St & E Carson St",
"21st St & Penn Ave",
"42nd St & Butler St",
"S Negley Ave & Baum Blvd",
"Liberty Ave & Stanwix St",
"S 18th St & Sidney St",
"Third Ave & Wood St",
"First Ave & Smithfield St (Art Institute)",
"First Ave & B St (T Station)",
"10th St & Penn Ave (David L. Lawrence Convention Center)",
"Fort Duquesne Blvd & 7th",
"Isabella St & Federal St (PNC Park)",
"42nd & Penn Ave.",
"Liberty Ave & S Millvale Ave (West Penn Hospital)",
"Penn Ave & N Fairmount St",
"Ellsworth Ave & N Neville St",
"Coltart Ave & Forbes Ave",
"Walnut St & College St",
"Penn Ave & S Whitfield St",
"Federal St & E North Ave",
"S Euclid Ave & Centre Ave",
"Centre Ave & Kirkpatrick St"
};
void setup() {
 
  int nStations = stations.length;
  stationRideCounts = new int[nStations];
  for (int s=0; s<nStations; s++) {
    stationRideCounts[s] = 0; // initialized to zero yo
  }
 
 
  allRidesTable = loadTable("HealthyRideRentals2016Q3.csv", "header"); 
  // Trip id,Starttime,Stoptime,Bikeid,Tripduration,From station id,From station name,To station id,To station name,Usertype
 
  int nRows = allRidesTable.getRowCount(); 
  for (int i=0; i<nRows; i++) {
    TableRow ithRow = allRidesTable.getRow(i); 
    String ithFromStationName = ithRow.getString("From station name");
    String ithToStationName = ithRow.getString("To station name"); 
 
    for (int s=0; s<nStations; s++) {
      if (ithFromStationName.contains(stations[s])){
        stationRideCounts[s] = stationRideCounts[s] + 1;
      }
      if (ithToStationName.contains(stations[s])){
        stationRideCounts[s]++;
      }
    }
  }
 
  println("Station" + "\t" + "nRides"); 
  for (int s=0; s<nStations; s++) {
    println (stations[s] + "\t" + stationRideCounts[s]);
  }
}

.