Service Ridership Dashboard Queries¶
This page documents query functions in the Service Ridership Dashboard module.
ingestor.chalicelib.service_ridership_dashboard.queries
¶
query_scheduled_service(start_date, end_date, route_id)
¶
Query the ScheduledServiceDaily DynamoDB table for a route within a date range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
date
|
The start date of the query range. |
required |
end_date
|
date
|
The end date of the query range. |
required |
route_id
|
str
|
The MBTA route identifier to query. |
required |
Returns:
| Type | Description |
|---|---|
list[ScheduledServiceRow]
|
A list of ScheduledServiceRow dicts from DynamoDB. |
Source code in ingestor/chalicelib/service_ridership_dashboard/queries.py
query_ridership(start_date, end_date, line_id)
¶
Query the Ridership DynamoDB table for a line within a date range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
date
|
The start date of the query range. |
required |
end_date
|
date
|
The end date of the query range. |
required |
line_id
|
str
|
The MBTA line identifier to query. |
required |
Returns:
| Type | Description |
|---|---|
list[RidershipRow]
|
A list of RidershipRow dicts from DynamoDB. |