datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm
Loading...

Query the Data Delivery Network

Query the DDN

The easiest way to query any data on Splitgraph is via the "Data Delivery Network" (DDN). The DDN is a single endpoint that speaks the PostgreSQL wire protocol. Any Splitgraph user can connect to it at data.splitgraph.com:5432 and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.

For example, you can query the tampa_cv_pilot_basic_safety_message_bsm_sample table in this repository, by referencing it like:

"datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest"."tampa_cv_pilot_basic_safety_message_bsm_sample"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "coredata_angle", -- The angle of the driver's steering wheel, in 1.5 degrees. A value of +126 is used for +189 degrees and beyond. A value of +127 is used for unavailable. This field is based on the J2735 Standard.
    "part2_vse_events", -- BSM Part Two Vehicle Safety Extension Vehicle event flags - the sender's state with regard to a set of events, in bit string. For each event, the sender has the option to set the flag to 1 if the stated criteria are met, but it is not required to do so. The order in the bit string is: eventHazardLights, eventStopLineViolation, eventABSactivated, eventTractionControlLoss, eventStabilityControlactivated, eventHazardousMaterials, eventReserved1, eventHardBraking, eventLightsChanged, eventWipersChanged, eventFlatTire, eventDisabledVehicle, eventAirBagDeployment. The field is based on the J2735 Standard.
    "part2_vse_ph_crumbdata", -- BSM Part Two Vehicle Safety Extension - Path History point list in stringified json format. The Path History defines a geometric path reflecting time-tagged vehicle movement over some period of time and/or distance. A sequence of Path History Points is used along with an initial position (and the GNSS status at that time) to create a set of straight line segments representing the path. For each Path History point, the lat-long offset units support units of 1/10th micro degrees of lat and long. The elevation offset units are in 10cm units. The time is expressed in units of 10 milliseconds. The PositionalAccuracy entry uses 3 elements to relate the pseudorange noise measured in the system. The heading and speed are not offset values, and follow the units defined in the ASN comments. All of these items are defined further in the relevant data entries. This field is a stringified array of json objects and is based on the J2735 Standard.
    "part2_suve_classification", -- BSM Part Two Supplemental Vehicle Extension basic vehicle class - common classification system to categorize DSRC- equipped devices for various cross-cutting uses. Use "transit-LocalBus" for HART buses, use "transit-FixedGuideway" for TECO streetcars. This field is based on the J2735 Standard.
    "metadata_logfilename", -- Name of the original file that deposited the message.
    "metadata_rsuid", -- Identifier of road side unit.
    "part2_vse_pp_confidence", -- BSM Part Two Vehicle Safety Extension - Path Prediction confidence, in units of 0.5 percent. This field is based on the J2735 Standard.
    "part2_vse_pp_radiusofcurve", -- BSM Part Two Vehicle Safety Extension - Path Prediction radius of curve, in units of 10cm. An estimate of the current trajectory of the sender. The value is represented as a first order of curvature approximation, as a circle with a radius R and an origin located at (0,R), where the x-axis is bore sight from the transmitting vehicle's perspective and normal to the vehicle's vertical axis. The vehicle's (x,y,z) coordinate frame follows the SAE convention. Radius R will be positive for curvatures to the right when observed from the transmitting vehicle's perspective. Radii shall be capped at a maximum value supported by the Path Prediction radius data type. Overflow of this data type shall be interpreted by the receiving vehicle as "a straight path" prediction. The radius can be derived from a number of sources including, but not limited to, map databases, rate sensors, vision systems, and global positioning. Straight path will use value of 32767. This field is based on the J2735 Standard.
    "coredata_msgcnt", -- Message count data - used to provide a sequence number within a stream of messages with the same DSRCmsgID and from the same sender. A sender may initialize this element to any value in the range 0-127 when sending the first message with a given DSRCmsgID, or if the sender has changed identity (e.g. by changing its TemporaryID) since sending the most recent message with that DSRCmsgID. Depending on the application the sequence number may change with every message or may remain fixed during a stream of messages when the content within each message has not changed from the prior message sent. For this element, the value after 127 is zero. The receipt of a non-sequential MsgCount value (from the same sending device and message type) implies that one or more messages from that sending device may have been lost, unless MsgCount has been re-initialized due to an identity change. This field is based on the J2735 Standard
    "coredata_id", -- A 4 octet random device identifier, called the TemporaryID. When used for a mobile OBU device, this value will change periodically to ensure the overall anonymity of the vehicle, unlike a typical wireless or wired 802 device ID. Because this value is used as a means to identify the local vehicles that are interacting during an encounter, it is used in the message set. Other devices, such as infrastructure (RSUs), may have a fixed value for the temporary ID value. See also DE_StationID which is used in other deployment regions. This field is based on the J2735 Standard.
    "coredata_secmark", -- Second Mark of the BSM - representing the milliseconds within a minute in units of milliseconds. The value of 65535 shall represent an unavailable value in the range of the minute. The values from 61000 to 65534 are reserved. This field is based on the J2735 Standard.
    "coredata_position_long", -- Geographic longitude of the vehicle, expressed in units of 1/10th microdegrees and with reference to the horizontal datum then in use. The value 1800000001 shall be used when unavailable. This field is based on the J2735 Standard.
    "coredata_elevation", -- The geographic position above or below the reference ellipsoid (typically WGS-84), in 10cm steps. The number represents an asymmetric range of positive and negative values. Any elevation higher than +6143.9 meters is represented as +61439. Any elevation lower than -409.5 meters is represented as -4095. If the sending device does not know its elevation, it shall encode the Elevation data element with -4096. This field is based on the J2735 Standard.
    "coredata_accelset_accelyaw", -- Yaw rotation rate of the vehicle about its vertical axis, in 0.01 degrees per second. Positive yaw is to the right (clockwise). This field is based on the J2735 Standard.
    "coredata_accelset_lat", -- Acceleration along the vehicle's lateral axis, in 0.01 m/s^2. Positive lateral axis is to the right side of the vehicle (facing forward). A value of 2000 is used for values greater than 2000, and a value of -2000 is used for values less than -2000. A value of 2001 is used for Unavailable. This field is based on the J2735 Standard.
    "coredata_accelset_vert", -- Acceleration value along the vehicle's vertical axis, in 0.02 G (0.02 G = 0.1962 m/s^2). Positive vertical "z" axis is downward with zero point at the bottom of the vehicle's tires. A value of +127 is used for ranges >= 2.54 G, and a value of -126 is used for ranges <= 2.52 G. A value of -127 is used for Unavailable. This field is based on the J2735 Standard.
    "coredata_position", -- Geographic point of the vehicle, composed of (coreData_position_long, coreData_position_lat) in degrees. This field is created for use within Socrata and is not present in the data Sandbox.
    "coredata_speed", -- Vehicle speed, expressed in unsigned units of 0.02 meters per second. A value of 8191 shall be used when the speed is unavailable. This field is based on the J2735 Standard.
    "coredata_accuracy_semiminor", -- Positional accuracy of semi-minor axis, in 5 cm. This is used to express the radius of the semi-minor axis of an ellipsoid representing the accuracy which can be expected from a GNSS system in 5cm steps, typically at a one sigma level of confidence. A value 254 is used for any value equal or greater than 12.70 m. A value of 255 is used for semi-minor axis unavailable. This field is based on the J2735 Standard.
    "coredata_accuracy_semimajor", -- Positional accuracy of the semi-major axis, in 5 cm. This is used to express the radius (length) of the semi-major axis of an ellipsoid representing the accuracy which can be expected from a GNSS system in 5cm steps, typically at a one sigma level of confidence. A value 254 is used for any value equal or greater than 12.70 m. A value of 255 is used for semi-major axis unavailable. This field is based on the J2735 Standard.
    "coredata_accuracy_orientation", -- Positional accuracy of the semi major axis orientation, in 360/65535 degree (0.0054932479 degree). This is used to orient the angle of the semi-major axis of an ellipsoid representing the accuracy which can be expected from a GNSS system with respect to the coordinate system. A value of 65535 is used for orientation unavailable. This field is based on the J2735 Standard.
    "part2_suve_cd_role", -- BSM Part Two Supplemental Vehicle Extension basic vehicle role - provides a means to indicate the current role that a DSRC device is playing. This is most commonly employed when a vehicle needs to take on another role in order to send certain DSRC message types. As an example, when a public safety vehicle such as a police car wishes to send a signal request message (SRM) to an intersection to request a preemption service, the vehicle takes on the role "police" from the below list in both the SRM message itself and also in the type of security CERT which is sent (the SSP in the CERT it used to identify the requester as being of type "police" and that they are allowed to send this message in this way). The BasicVehicleRole entry is often used and combined with other information about the requester as well, such as details of why the request is being made. Use role "transit"for both HART buses and for TECO streetcars. This field is based on the J2735 Standard.
    "coredata_brakes_wheelbrakes", -- Wheel break applied status for left front wheel, indicating whether braking is currently active in that wheel. The indicated status of a wheel is set to 1 if brakes are active on that wheel, or to 0 if brakes are inactive on that wheel. On a vehicle with only one front wheel, the brake-applied status is represented by the Left Front wheel indicator and the Right Front indicator is always set to zero. Similarly, on a vehicle with only one rear wheel the brake-applied status is represented by the Left Rear wheel indicator and the Right Rear indicator is always set to zero. If a vehicle has more than two front wheels (respectively more than two rear wheels) with independent braking, the collective brake-applied status of these wheels is mapped to the Left Front and Right Front (respectively Left Rear and Right Rear) indicators in a locally defined manner. Brake Applied Status could be used by a traffic management center to determine that an incident has occurred or congestion may be present. It is possible for some vehicles to provide an indication of how hard the braking action is, this is handled in another data element (DE_BrakeAppliedPressure). This field is based on the J2735 Standard.
    "coredata_heading", -- Heading of the sending device, expressed in unsigned units of 0.0125 degrees from North such that 28799 such degrees represent 359.9875 degrees. North shall be defined as the axis prescribed by the WGS-84 coordinate system and its reference ellipsoid. Headings "to the east" are defined as the positive direction. A value of 28800 shall be used when unavailable. This element indicates the direction of motion of the device. When the sending device is stopped and the trajectory (path) over which it traveled to reach that location is well known, the past heading may be used. This field is based on the J2735 Standard.
    "coredata_brakes_wheelbrakes_3", -- Wheel break applied status for right rear wheel, indicating whether braking is currently active in that wheel. The indicated status of a wheel is set to 1 if brakes are active on that wheel, or to 0 if brakes are inactive on that wheel. On a vehicle with only one front wheel, the brake-applied status is represented by the Left Front wheel indicator and the Right Front indicator is always set to zero. Similarly, on a vehicle with only one rear wheel the brake-applied status is represented by the Left Rear wheel indicator and the Right Rear indicator is always set to zero. If a vehicle has more than two front wheels (respectively more than two rear wheels) with independent braking, the collective brake-applied status of these wheels is mapped to the Left Front and Right Front (respectively Left Rear and Right Rear) indicators in a locally defined manner. Brake Applied Status could be used by a traffic management center to determine that an incident has occurred or congestion may be present. It is possible for some vehicles to provide an indication of how hard the braking action is‚ this is handled in another data element (DE_BrakeAppliedPressure). This field is based on the J2735 Standard.
    "part2_suve_vd_height", -- BSM Part Two Supplemental Vehicle Extension vehicle data vehicle height - The height of the vehicle, measured from the ground to the highest surface, excluding any antenna(s), and expressed in units of 5 cm. In cases of vehicles with adjustable ride heights, camper shells, and other devices which may cause the overall height to vary, the largest possible height will be used. This field is based on the J2735 Standard.
    "coredata_size", -- Vehicle size, representing the vehicle length and vehicle width in cm. This field is a stringified json object and is based on the J2735 Standard.
    "part2_suve_vd_bumpers_rear", -- BSM Part Two Supplemental Vehicle Extension vehicle data rear bumper height - the height of the rear bumper of the vehicle or object (can also be used with trailers), in units of 0.01 meters from ground surface. This field is based on the J2735 Standard.
    ":@computed_region_28hd_vqqn",
    "randomnum", -- Random decimal number, to be used for random sampling of data within Socrata. This field is created for use within Socrata and is not present in the data Sandbox.
    "metadata_psid", -- Provider Service Identifier. A number that identifies a service provided by an application. PSID is defined in IEEE Std 1609.12.
    "coredata_brakes_auxbrakes", -- Auxiliary brake status - reflects the status of the auxiliary brakes (sometimes referred to as the parking brake) of the vehicle. The element can inform others that the vehicle is not equipped with auxiliary brakes or, if equipped, if the auxiliary brakes status is unavailable. If the vehicle is equipped with auxiliary brakes and the status is available, the element reports whether the auxiliary brakes are in a fully released (Off) state or in an engaged or in the process of being engaged (On) state. This field is based on the J2735 Standard.
    "metadata_bsmsource", -- Source of the BSM. Host vehicle = EV, Remote vehicle = RV.
    "metadata_generatedat", -- Closest time to which the record was created, either signed or received by the generatedBy source in UTC format. This information is taken from the communication header.
    "coredata_brakes_brakeboost", -- Auxiliary brake status - reflects the status of the auxiliary brakes (sometimes referred to as the parking brake) of the vehicle. The element can inform others that the vehicle is not equipped with auxiliary brakes or, if equipped, if the auxiliary brakes status is unavailable. If the vehicle is equipped with auxiliary brakes and the status is available, the element reports whether the auxiliary brakes are in a fully released (Off) state or in an engaged or in the process of being engaged (On) state. This field is based on the J2735 Standard.
    "part2_suve_cd_hpmstype", -- BSM Part Two Supplemental Vehicle Extension vehicle type - a type list (i.e., a classification list) of the vehicle in terms of overall size. The data element entries follow the definitions defined in the US DOT Highway Performance Monitoring System (HPMS). Many infrastructure roadway operators collect and classify data according to this list for regulatory reporting needs. Within the ITS industry and within the DSRC message set standards work, there are many similar lists of types for overlapping needs and uses. This field is based on the J2735 Standard. Use HPMS classes: "car" for light vehicles, "bus" for HART buses, "unknown" for TECO streetcars.
    "part2_vse_lights", -- BSM Part Two Vehicle Safety Extension Exterior Lights. The status of various exterior lights (when such data is available) encoded in a bit string which can be used to relate the current vehicle settings. The order in the bit string is: lowBeamHeadlightsOn, highBeamHeadlightsOn, leftTurnSignalOn, rightTurnSignalOn, hazardSignalOn, automaticLightControlOn, daytimeRunningLightsOn, fogLightOn, parkingLightsOn. This field is based on the J2735 Standard.
    "datatype", -- The data type.
    "part2_suve_vd_bumpers_front", -- BSM Part Two Supplemental Vehicle Extension vehicle data front bumper height - the height of the front bumper of the vehicle or object (can also be used with trailers), in units of 0.01 meters from ground surface. This field is based on the J2735 Standard.
    "metadata_kind", -- Metadata kind.
    "coredata_brakes_traction", -- Traction control status - reflects the status of the vehicle traction control system. The element can inform others that the vehicle is not equipped with traction control or, if equipped, if the traction control status is unavailable. If the vehicle is equipped with traction control and the status is available, the element reports whether the system is in an Off, On or Engaged state. This field is based on the J2735 Standard.
    "coredata_brakes_abs", -- Anti-lock brake status - reflects the status of the vehicle ABS and can inform others that the vehicle is not equipped with ABS or, if equipped, if the ABS status is unavailable (0). If the vehicle is equipped with ABS and the status is available, the element reports whether the system is in an Off (1), On (2) or Engaged (3) state. This field is based on the J2735 Standard.
    "metadata_externalid", -- External ID.
    "metadata_schemaversion", -- Version of the metadata schema. 
    "part2_suve_vd_mass", -- BSM Part Two Supplemental Vehicle Extension vehicle data vehicle mass - estimated weight of the vehicle over a span of stepwise linear values. Values 000 to 080 are in steps of 50kg. Values 081 to 200 are in steps of 500kg. Values 201 to 253 are in steps of 2000kg. This provides a value range from zero to in excess of 170000 kg. The weight should reflect the current gross mass of vehicle and contents if known. The value 254 is used for weights above 170000 kg. The value 255 is used when the value is unknown or unavailable. This field is based on the J2735 Standard.
    "metadata_generatedat_timeofday", -- Time of day when the record was created, in unit of hour, based on the "metadata_generatedAt" field. This field is created for use within Socrata and is not present in the data Sandbox.
    "coredata_brakes_wheelbrakes_4", -- Wheel break applied status. When set, the brake applied status is unavailable. This field is based on the J2735 Standard.
    "metadata_generatedby", -- Source of the record, whether [OBU, RSU, TMC].
    "coredata_position_lat", -- Geographic latitude of the vehicle, expressed in units of 1/10th microdegrees and with reference to the horizontal datum then in use. The value 900000001 shall be used when unavailable. This field is based on the J2735 Standard.
    "coredata_accelset_long", -- Acceleration value along the vehicle's longitudinal axis, in 0.01 m/s^2. Positive longitudinal axis is to the front of the vehicle. A value of 2000 is used for values greater than 2000, and a value of -2000 is used for values less than -2000. A value of 2001 is used for Unavailable. This field is based on the J2735 Standard.
    "coredata_transmission", -- Transmission state - current state of the vehicle transmission (neutral, park, forwardGears, reverseGears, reserved1, reserved2, reserved3, unavailable). This field is based on the J2735 Standard.
    "coredata_brakes_wheelbrakes_2", -- Wheel break applied status for right front wheel, indicating whether braking is currently active in that wheel. The indicated status of a wheel is set to 1 if brakes are active on that wheel, or to 0 if brakes are inactive on that wheel. On a vehicle with only one front wheel, the brake-applied status is represented by the Left Front wheel indicator and the Right Front indicator is always set to zero. Similarly, on a vehicle with only one rear wheel the brake-applied status is represented by the Left Rear wheel indicator and the Right Rear indicator is always set to zero. If a vehicle has more than two front wheels (respectively more than two rear wheels) with independent braking, the collective brake-applied status of these wheels is mapped to the Left Front and Right Front (respectively Left Rear and Right Rear) indicators in a locally defined manner. Brake Applied Status could be used by a traffic management center to determine that an incident has occurred or congestion may be present. It is possible for some vehicles to provide an indication of how hard the braking action is‚ this is handled in another data element (DE_BrakeAppliedPressure). This field is based on the J2735 Standard.
    "coredata_brakes_wheelbrakes_1", -- Wheel break applied status for left rear wheel, indicating whether braking is currently active in that wheel. The indicated status of a wheel is set to 1 if brakes are active on that wheel, or to 0 if brakes are inactive on that wheel. On a vehicle with only one front wheel, the brake-applied status is represented by the Left Front wheel indicator and the Right Front indicator is always set to zero. Similarly, on a vehicle with only one rear wheel the brake-applied status is represented by the Left Rear wheel indicator and the Right Rear indicator is always set to zero. If a vehicle has more than two front wheels (respectively more than two rear wheels) with independent braking, the collective brake-applied status of these wheels is mapped to the Left Front and Right Front (respectively Left Rear and Right Rear) indicators in a locally defined manner. Brake Applied Status could be used by a traffic management center to determine that an incident has occurred or congestion may be present. It is possible for some vehicles to provide an indication of how hard the braking action is, this is handled in another data element (DE_BrakeAppliedPressure). This field is based on the J2735 Standard.
    "coredata_brakes_scs" -- Stability control status - reflects the current state of the stability control system. The element can inform others that the vehicle is not equipped with stability control or, if equipped, if the stability control status is unavailable. If the vehicle is equipped with stability control and the status is available, the element reports whether the system is in an Off, On or Engaged state. This field is based on the J2735 Standard.
FROM
    "datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest"."tampa_cv_pilot_basic_safety_message_bsm_sample"
LIMIT 100;

Connecting to the DDN is easy. All you need is an existing SQL client that can connect to Postgres. As long as you have a SQL client ready, you'll be able to query datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm with SQL in under 60 seconds.

Query Your Local Engine

Install Splitgraph Locally
bash -c "$(curl -sL https://github.com/splitgraph/splitgraph/releases/latest/download/install.sh)"
 

Read the installation docs.

Splitgraph Cloud is built around Splitgraph Core (GitHub), which includes a local Splitgraph Engine packaged as a Docker image. Splitgraph Cloud is basically a scaled-up version of that local Engine. When you query the Data Delivery Network or the REST API, we mount the relevant datasets in an Engine on our servers and execute your query on it.

It's possible to run this engine locally. You'll need a Mac, Windows or Linux system to install sgr, and a Docker installation to run the engine. You don't need to know how to actually use Docker; sgrcan manage the image, container and volume for you.

There are a few ways to ingest data into the local engine.

For external repositories, the Splitgraph Engine can "mount" upstream data sources by using sgr mount. This feature is built around Postgres Foreign Data Wrappers (FDW). You can write custom "mount handlers" for any upstream data source. For an example, we blogged about making a custom mount handler for HackerNews stories.

For hosted datasets (like this repository), where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Cloning Data

Because datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest is a Splitgraph Image, you can clone the data from Spltgraph Cloud to your local engine, where you can query it like any other Postgres database, using any of your existing tools.

First, install Splitgraph if you haven't already.

Clone the metadata with sgr clone

This will be quick, and does not download the actual data.

sgr clone datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm

Checkout the data

Once you've cloned the data, you need to "checkout" the tag that you want. For example, to checkout the latest tag:

sgr checkout datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest

This will download all the objects for the latest tag of datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm and load them into the Splitgraph Engine. Depending on your connection speed and the size of the data, you will need to wait for the checkout to complete. Once it's complete, you will be able to query the data like you would any other Postgres database.

Alternatively, use "layered checkout" to avoid downloading all the data

The data in datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest is 0 bytes. If this is too big to download all at once, or perhaps you only need to query a subset of it, you can use a layered checkout.:

sgr checkout --layered datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm:latest

This will not download all the data, but it will create a schema comprised of foreign tables, that you can query as you would any other data. Splitgraph will lazily download the required objects as you query the data. In some cases, this might be faster or more efficient than a regular checkout.

Read the layered querying documentation to learn about when and why you might want to use layered queries.

Query the data with your existing tools

Once you've loaded the data into your local Splitgraph Engine, you can query it with any of your existing tools. As far as they're concerned, datahub-transportation-gov/tampa-cv-pilot-basic-safety-message-bsm-sample-nm7w-nvbm is just another Postgres schema.

Related Documentation:

Loading...