From 230fe1a93115d376183791946aa7141deea919df Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Thu, 2 Sep 2021 16:36:11 -0400 Subject: [PATCH] update ac transit fare system wrangler card --- project_cards/ac-transit-fare-system-change.wrangler | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project_cards/ac-transit-fare-system-change.wrangler b/project_cards/ac-transit-fare-system-change.wrangler index 785a75e5..c59a95bb 100644 --- a/project_cards/ac-transit-fare-system-change.wrangler +++ b/project_cards/ac-transit-fare-system-change.wrangler @@ -20,4 +20,5 @@ dependencies: actransit_trips_list = self.feed.trips[self.feed.trips.agency_raw_name == "ACTransit_2015_8_14"].trip_id.tolist() actransit_stops_list = self.feed.stop_times[self.feed.stop_times.trip_id.isin(actransit_trips_list)].stop_id.tolist() -self.feed.stops["zone_id"] = np.where((self.feed.stops.stop_id.isin(actransit_stops_list)) & (self.feed.stops.model_node_id.astype(int) <= 1500000),"1",np.where(self.feed.stops.stop_id.isin(actransit_stops_list), "2", self.feed.stops.zone_id)) +# stops in Alameda and Contra Costa are zone 1, all others are zone 2 +self.feed.stops["zone_id"] = np.where((self.feed.stops.stop_id.isin(actransit_stops_list)) & (self.feed.stops.model_node_id.astype(int) >= 2500000) & (self.feed.stops.model_node_id.astype(int) <= 3500000),"1",np.where(self.feed.stops.stop_id.isin(actransit_stops_list), "2", self.feed.stops.zone_id))