Open EyalBerger opened 4 years ago
I think we should add the attribute "makat number", in addition to agency_id, route_id, route_short_name.
Some thoughts and fields I think we also need:
distance
is_loop
kind of matches the thing I mentioned above about back and forthsiri_route_stats
with fields matching the ones in the gtfs route_statsI like the idea of dividing the variables into complexity classes. My suggestions/comments:
@AvivSela - I didn't understand your suggestion in (1), what is the purpose of each class? Why should they be separated? Regarding (2) - I think that merging the date and time can hurt efficiency of indexing. Maybe we would like to index the date and not the time.
for ind, point_time in enumerate(points_time_list):
time = point_time
lat, lon = points_latlon_list[ind]
Vs.
for record in records:
time = record.time
lat, lon = record.latlon
Thanks you all for your comments and insights!
I updated the design following it.
The variables list became too long so I ended up opening a design doc for it. Please see here.
In summary:
Open issues:
Following 15/4 Zoom meeting, some required updates in the data design:
I added data types and update dependencies (when variable based directly on Siri or GTFS) to the data design.
Hi, I looked at SIRI 2.8. it might take some time but we will get there. there are some more fields there that come "free of charge" without the need to calculate them. Here is example of the JSON format: ICD_SM_2_8_ver25.pdf
{
"-version": "2.8",
"ResponseTimestamp": "2020-10-16T06:32:30+03:00",
"Status": "true",
"MonitoredStopVisit": [
{
"RecordedAtTime": "2020-10-16T06:32:19+03:00",
"ItemIdentifier": "1455075547",
"MonitoringRef": "47507",
"MonitoredVehicleJourney": {
"LineRef": "28209",
"DirectionRef": "1",
"FramedVehicleJourneyRef": {
"DataFrameRef": "2020-10-16",
"DatedVehicleJourneyRef": "50698246"
},
"PublishedLineName": "52",
"OperatorRef": "3",
"DestinationRef": "47453",
"OriginAimedDepartureTime": "2020-10-16T06:25:00+03:00",
"VehicleLocation": {
"Longitude": "35.079803",
"Latitude": "32.823952"
},
"Bearing": "8",
"Velocity": "29",
"VehicleRef": "7576269",
"MonitoredCall": {
"StopPointRef": "47507",
"Order": "26",
"ExpectedArrivalTime": "2020-10-16T06:49:00+03:00",
"DistanceFromStop": "4009"
}
}
}
]
}
If im taking those fields combine them into one object that represent a ride that have list of records with the observation over time i will get the following schema:
SiriRide
LineRef: "Reference to a LINE"
DirectionRef: "Reference to a DIRECTION the VEHICLE is running along the LINE"
FramedVehicleJourneyRef_DataFrameRef: "The date part of the trip ID"
FramedVehicleJourneyRef_DatedVehicleJourneyRef: "The number part of trip ID"
PublishedLineName: "The bus number, as published on the bus"
OperatorRef: "The Operator code"
DestinationRef: "The destination stop code"
VehicleRef: "Vehicle number. The value should match the license number of the Vehicle"
OriginAimedDepartureTime: "The start time of the Journey, according to the licensing system" The value should match DepartureTime at TripIdToDate.txt file at the GTFS"
SiriRecords
ResponseTimestamp: "The time of the Response"
RecordedAtTime: "Time at which data was recorded at the Vehicle"
VehicleLocation
Longitude: Latitude from equator
Latitude: Latitude from equator
Bearing: "Vehicle bearing with respect to the North"
Velocity: "Vehicle speed at Km/h."
StopPointRef: "The stop code of the stop that the Vehicle is stopping at now, or recently visited"
Order: "The stop order of the stop that the Vehicle is stopping at now, or recently visited"
DistanceFromStop: "The distance that the Vehicle travelled from the start of the journey. in meters"
{
"title": "SiriRide",
"type": "object",
"properties": {
"LineRef": {
"title": "Lineref",
"description": "Reference to a LINE ",
"type": "integer"
},
"DirectionRef": {
"title": "Directionref",
"description": "Reference to a DIRECTION the VEHICLE is running along the LINE",
"type": "integer"
},
"FramedVehicleJourneyRef_DataFrameRef": {
"title": "Framedvehiclejourneyref Dataframeref",
"description": "The date part of the trip ID",
"type": "string",
"format": "date-time"
},
"FramedVehicleJourneyRef_DatedVehicleJourneyRef": {
"title": "Framedvehiclejourneyref Datedvehiclejourneyref",
"description": "The number part of trip ID",
"type": "integer"
},
"PublishedLineName": {
"title": "Publishedlinename",
"description": "The bus number, as published on the bus",
"type": "string"
},
"OperatorRef": {
"title": "Operatorref",
"description": "The Operator code",
"type": "integer"
},
"DestinationRef": {
"title": "Destinationref",
"description": "The destination stop code",
"type": "integer"
},
"VehicleRef": {
"title": "Vehicleref",
"description": "Vehicle number. The value should match the license number of the Vehicle",
"type": "integer"
},
"OriginAimedDepartureTime": {
"title": "Originaimeddeparturetime",
"description": "The start time of the Journey, according to the licensing system\" The value should match DepartureTime at TripIdToDate.txt file at the GTFS",
"type": "string",
"format": "date-time"
},
"SiriRecords": {
"title": "Sirirecords",
"description": "represent one observation on a vehicle over time",
"type": "array",
"items": {
"$ref": "#/definitions/SiriRecord"
}
}
},
"required": [
"LineRef",
"DirectionRef",
"FramedVehicleJourneyRef_DataFrameRef",
"FramedVehicleJourneyRef_DatedVehicleJourneyRef",
"PublishedLineName",
"OperatorRef",
"DestinationRef",
"VehicleRef",
"OriginAimedDepartureTime",
"SiriRecords"
],
"definitions": {
"GeoPoint": {
"title": "GeoPoint",
"type": "object",
"properties": {
"Longitude": {
"title": "Longitude",
"description": "Latitude from equator",
"type": "number"
},
"Latitude": {
"title": "Latitude",
"description": "Latitude from equator",
"type": "number"
}
},
"required": [
"Longitude",
"Latitude"
]
},
"SiriRecord": {
"title": "SiriRecord",
"type": "object",
"properties": {
"ResponseTimestamp": {
"title": "Responsetimestamp",
"description": "The time of the Response",
"type": "string",
"format": "date-time"
},
"RecordedAtTime": {
"title": "Recordedattime",
"description": "Time at which data was recorded at the Vehicle",
"type": "string",
"format": "date-time"
},
"VehicleLocation": {
"title": "Vehiclelocation",
"description": "Vehicle Location",
"allOf": [
{
"$ref": "#/definitions/GeoPoint"
}
]
},
"Bearing": {
"title": "Bearing",
"description": "Vehicle bearing with respect to the North",
"minimum": 0,
"maximum": 360,
"type": "integer"
},
"Velocity": {
"title": "Velocity",
"description": "Vehicle speed at Km/h.",
"minimum": 0,
"type": "integer"
},
"StopPointRef": {
"title": "Stoppointref",
"description": "The stop code of the stop that the Vehicle is stopping at now, or recently visited",
"type": "integer"
},
"Order": {
"title": "Order",
"description": "The stop order of the stop that the Vehicle is stopping at now, or recently visited",
"type": "integer"
},
"DistanceFromStop": {
"title": "Distancefromstop",
"description": "The distance that the Vehicle travelled from the start of the journey. in meters",
"type": "integer"
}
},
"required": [
"ResponseTimestamp",
"RecordedAtTime",
"VehicleLocation",
"Bearing",
"Velocity",
"StopPointRef",
"Order",
"DistanceFromStop"
]
}
}
}
Following our last discussions and the restarting of SiriRide entity task ,creating this issue for listing planned SiriRide calculated attributes (v1).
I have separated them into different classes according to their complexity:
It's a very initial list. Please edit it with your own insights.