Begin Main Content Area

Road Condition Reporting System (RCRS) Event Data Service API

  1. Introduction
  2. Audience
  3. What Is Web API?
  4. Requesting Access
  5. Usage Limits
  6. RCRS_Event_Data Service
    1. liveEvents Method
    2. plannedEvent Method
    3. winterConditions Method
    4. Code Tables

Introduction

This document summarizes the RCRS_Event_Data external web service of the PennDOT Road Condition Reporting System (RCRS). This service provides Statewide event and winter road condition information to outside agencies and vendors.

Audience

This document is intended for agency or vendor developers who want to obtain RCRS event information for use in external systems. It provides an introduction to using the RCRS_Event_Data service and reference material on the available parameters.

What Is Web API?

From Wikipedia.org:

A web API is an application programming interface (API) for either a web server or a web browser. It is a web development concept, usually limited to a web application's client-side (including any web frameworks being used), and thus usually does not include web server or browser implementation details such as SAPIs or web browser engine APIs unless publicly accessible by a remote web application.

Endpoints

Endpoints are important aspects of interacting with server-side web APIs, as they specify where resources lie that can be accessed by third party software. Usually the access is via a URI to which HTTP requests are posed, and from which the response is thus expected. Endpoints need to be static, otherwise the correct functioning of software that interacts with it cannot be guaranteed. If the location of a resource changes (and with it the endpoint) then previously written software will break, as the required resource can no longer be found at the same place. As API providers still want to update their web APIs, many have introduced a versioning system in the URI that points to an endpoint, for example the Clarifai API: The endpoint for the tagging functionality within the web API has the following URI: "https://api.clarifai.com/v1/tag/". The "/v1/" part of the URI specifies access to the first version of the web API. If clarifai decides to update to version two, they can do this while still maintaining support for third party software that uses the first version.

Resource vs. service

Although "web API" is sometimes considered a synonym for web service, Web 2.0 web applications have moved away from SOAP-based web services towards more cohesive collections of RESTful web resources.[5] These RESTful web APIs are accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobile devices. They have advantages over web services in that they tend to be less difficult to develop and less resource intensive (and thus usually run faster) since they do not need to perform as many data conversions as required by a SOAP-based service APIs.

Requesting Access

Gaining access to the service is a two step process. The first step is to create a user account in PDAuth. The process for creating a user account in PDAuth is different for external users than internal users. Internal users are users who have a CWOPA account. Directions for creating a user account in PDAuth for internal and external users are listed below.

Step 1 - Create PDAuth Account
Internal Users
Internal users that already have a CWOPA account must login to PDAuth using their CWOPA credentials. After logging into PDAuth for the first time, their user account will be automatically created using their CWOPA credentials.

External Users
External users must first create a user account in PDAuth by selecting 'Create Account' from the Log in window.


Enter the account information and click 'Sign Up'.


A verification email will be sent to the email address that was used to create the user account and will contain an activation link. The user account can not be used until the account is activated using the activation link. The activation link will direct users to a Password Reset window that allows them to create their password. Strong password requirements are enforced during the password creation process.



Step 2 - Request Access
Once the PDAuth account has been created in step 1, access to the RCRS_Event_Data service must be requested. To request access, send an email to penndotdata@pa.gov with your PDAuth username and a brief description of your reason for access. After access has been granted, you will receive a notification email from PDAuth that your request has been approved. The PDAuth credentials can now be used to acess the RCRS_Event_Data service.

Service Limitations

Currently there are no request limitations for this service. Any limitations added in the future will be included in this section.

RCRS_Event_Data Service

The RCRS_Event_Data service is a Web API service that can be accessed from any client that can make an HTTP request and process a JSON response. Each method listed below can be accessed using a standard HTTP GET request. The format of the web service requests and responses will be described in this document.

This service uses HTTP Basic Authentication for credential authentication and authorization. User credentials must be encoded in base 64 and set in the authorization header of the service request. An example for setting the authorization header is shown below.

Secure Socket Layer (SSL) must be enabled by prepending "https://" to each service request.

Methods

MethodDescription
liveEventsProvides Pennsylvania road events which are active in RCRS at the time of the request.
plannedEventsProvides Pennsylvania road events which are planned in RCRS at the time of the request.
winterConditionsProvides Pennsylvania roadway winter conditions which are active in RCRS at the time of the request.

liveEvents Method

The liveEvents method of the RCRS_Event_Data service returns Pennsylvania road events that are active in RCRS at the time of the request.

Properties

PropertiesTypeDescription
ActualDateTimeOpenedDate/TimeThe date and time that the roadway was re-opened and the event was removed from the system in the format: YYYY-MM-DD HH:MM:SS. Once the roadway has been re-opened the event record will remain in the feed for 30 minutes with the ActualDateTimeOpened listed.
DateTimeVerifiedDate/TimeThe date and time that the event was verified in the format: YYYY-MM-DD HH:MM.
IsHazmatBooleanEvent involves a hazmat material: T = True, F = False.
HazmatPlacardIDTextList of Hazmat Placard identifiers involved in the event.
HazmatMaterialNameTextList of hazmat material involved in the event. Multiple materials may be listed and when present are generally delimited with commas.
IsFatalityBooleanEvent involves one or more fatalities: T = True, F = False.
IsSchoolBusBooleanEvent involves a school bus: T = True, F = False.
IsCommercialVehicleRolloverBooleanEvent involves a commercial vehicle rollover: T = True, F = False.
IsCrashInConstructionZoneBooleanEvent involves a crash in a construction zone: T = True, F = False.
IsPennDOTPropertyAndOrEmployeeInvolvedBooleanEvent involves a PennDOT employee or occurs on PennDOT property: T = True, F = False.
IsAutonomousVehicleBooleanEvent involves an autonomous vehicle: T = True, F = False.
IsTransitOrTourBusBooleanEvent involves a transit or tour bus: T = True, F = False.
IsFirstResponderWithMajorInjuryOrFatalityBooleanEvent involves a first responder with either a major injury or fatality: T = True, F = False.
IsTrainBooleanEvent involves a train: T = True, F = False.
IsAmishConveyanceBooleanEvent involves an amish conveyance: T = True, F = False.
IsAircraftBooleanEvent involves an aircraft: T = True, F = False.
IsBridgeStrikeBooleanEvent involves a bridge strike: T = True, F = False.
RestrictedSpeedValueNumberSpeed restriction for event in Miles Per Hour.
VehicleRestrictTextTextVehicle restrictions for event. Multiple vehicle restrictions may be returned in this element in a comma delimited list of values.

Please see the Code Table section of this document for the full list of VehicleRestrictText values.
VehicleRestrictTierTextVehicle restriction tier for event. Multiple vehicle restrictions belong to one tier.

Please see the Code Table section of this document for the full list of VehicleRestrictTier values.
EventIDNumberThe unique ID for the event in RCRS.
EventClassNumber
EventTypeTextText value indicating the cause of the event.

Please see the Code Tables section of this document for a full list of EventType values.
ReportOrgIDNumberThe PennDOT district associated with the event.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
DirectionTextRoadway direction affected by the event.

Please see the Code Tables section of this document for a full list of Direction values.
FromLocTextText description of the starting location of the event. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for Events.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
FromLocMileageNumberMileage to FromLoc.
FromLocDirectionTextOrdinal direction to FromLoc.
ToLocTextText description of the ending location of the event.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocMileageNumberMilage to ToLoc.
ToLocDirectionTextOrdinal direction to ToLoc.
IncidentLocTextText description of the incident location.
IncidentLocLatLongTextThe Latitude and Longitude of the incident location in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
IncidentLocMileageNumberMilage to IncidentLoc.
IncidentLocDirectionTextOrdinal direction to IncidentLoc.
DateTimeEventOccursDate/TimeIf the event originated as a planned event, then this is the date and time that the event began in the format: YYYY-MM-DD HH:MM.
CreateTimeDate/TimeThe date and time that the event was created in RCRS in the format: YYYY-MM-DD HH:MM:SS
LastUpdateDate/TimeThe last date and time this event was updated in RCRS in the format: YYYY-MM-DD HH:MM:SS.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
CountyNumberThe county number associated with this event. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this event.
LaneStatusTextThe current status of the event.

Please see the Code Table section of this document for the full list of LaneStatus values.
AffectedLanesTextThe Lanes or Shoulders that are affected by the event.

Please see the Code Table section of this document for the full list of AffectedLanes values.
DetourInEffectBooleanDetour is in effect: T=True, F=False.
IsInterstateBooleanEvent occurs on an interstate: T=True, F=False.
DescriptionTextText description of the overall event.
DateTimeNotifiedDate/TimeThe date and time that the event was reported in the format: YYYY-MM-DD HH:MM.
IncidentMuniNameTextName of township or borough in which the incident occurred.
PoliceJurisTextTextThe police jurisdiction for the event.

Please see the Code Table section of this document for the full list of PoliceJurisText values.
Is511EventBooleanIs a 511 event: T = True, F = False.
StateRouteNoNumberThe state route number associated with the event.
CountyFromNumberThe county code associated with the beginning location of the event.
CountyFromNameTextThe county name associated with the beginning location of the event.
BeginSegPointNumberEight digit number containing the beginning segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyToNumberThe county code associated with the ending location of the event.
CountyToNameTextThe county name associated with the ending location of the event.
EndSegPointNumberEight digit number containing the ending segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyIncNumberThe county code associated with the incident location of the event.
CountyIncNameTextThe county name associated with the incident location of the event.
IncSegPointNumberEight digit number containing the incident segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
HaulerRestrictionInEffectBooleanFlag indicating whether event affects haulers: T = True, F = False
IsTemporaryTrafficControlDevicesInUseBooleanFlag indicating whether a temporary traffic control device is in use: T = True, F = False
IsHaulerRestriction24x7BooleanFlag indicating whether the hauler restriction is in effect for the entire duration of a repetitve event: T = True, F = False
NoPermitTravelBooleanFlag indicating that permitted travel is prohibited. T = True, F = False.
MaxLengthRestrictionNumberThe maximum allowable vehicle length in inches.
If no value was defined then this field will default to 0.
MaxWidthRestrictionNumberThe maximum allowable vehicle width in inches.
If no value was defined then this field will default to 0.
MaxHeightRestrictionNumberThe maximum allowable vehicle height in inches.
If no value was defined then this field will default to 0.
MaxWeightRestrictionNumberThe maximum allowable vehicle weight in pounds.
If no value was defined then this field will default to 0.
[EventRepetitionDetails]
RepetitionID
TextThe ID for the Repetitive Event.
If the event is not repetitive, will reflect: "One Time Event".
[EventRepetitionDetails]
Occurs
TextThe day(s) of the week on which the event occurs.
If the event is not repetitive, will reflect "N/A".

Please see the Code Table section of this document for
the full list of Occurs values.
[EventRepetitionDetails]
SkipHolidays
TextIndicates whether the event will be scheduled for,
and can occur on, holidays: YES/NO.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
StartDate
TextThe Start Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
EndDate
TextThe End Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
DailyStartTime
TextThe Start Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
DailyEndTime
TextThe End Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
DetoursJSON A listing of all detours that are in effect for the event.
Each detour will contain a detour ID, direction, vehicle type, color ID, total distance and narrative.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://gisdata.penndot.pa.gov/RCRS_Event_Data/api/RCRS/liveEvents',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the liveEvents method.

{
    "Values": [
        {
            "ActualDateTimeOpened": "",
            "DateTimeVerified": "2019-08-27 14:31",
            "IsHazmat": "F",
            "HazmatPlacardID": "",
            "HazmatMaterialName": "",
            "IsFatality": "F",
            "IsSchoolBus": "F",
            "IsCommercialVehicleRollover": "F",
            "IsCrashInConstructionZone": "F",
            "IsPennDOTPropertyAndOrEmployeeInvolved": "F",
            "IsAutonomousVehicle": "F",
            "IsTransitOrTourBus": "F",
            "IsFirstResponderWithMajorInjuryOrFatality": "F",
            "IsTrain": "F",
            "IsAmishConveyance": "F",
            "IsAircraft": "F",
            "IsBridgeStrike": "F",
            "RestrictedSpeedValue": "",
            "VehicleRestrictText": "",
            "EventID": 581,
            "EventClass": "3",
            "EventType": "roadwork",
            "ReportOrgID": "11",
            "Facility": "HITE RD / TAWNEY RUN RD",
            "Direction": "eastbound",
            "FromLoc": "Intersection of PITTSBURGH MILLS BL in FRAZER  [2TWP]",
            "FromLocLatLong": "40.5662781980593,-79.7956370235785",
            "FromLocMileage": "",
            "FromLocDirection": "",
            "ToLoc": "Intersection of MURRAY HILL RD / + BUTLER LOGAN RD in FRAZER  [2TWP]",
            "ToLocLatLong": "40.5705014313923,-79.7906322059793",
            "ToLocMileage": "",
            "ToLocDirection": "",
            "IncidentLoc": "",
            "IncidentLocLatLong": "",
            "IncidentLocMileage": "",
            "IncidentLocDirection": "",
            "DateTimeEventOccurs": "2019-08-27 14:30",
            "CreateTime": "2019-08-27 14:31:55",
            "LastUpdate": "2019-08-27 14:31:55",
            "State": "PA",
            "County": "02",
            "CountyName": "ALLEGHENY",
            "LaneStatus": "lane restriction",
            "AffectedLanes": "",
            "VehicleRestrictTier": "",
            "DetourInEffect": "F",
            "IsInterstate": "F",
            "Description": "Roadwork on HITE RD / TAWNEY RUN RD eastbound between PITTSBURGH MILLS BL and MURRAY HILL RD / + BUTLER LOGAN RD.  There is a lane restriction.",
            "DateTimeNotified": "2019-08-27 14:31",
            "IncidentMuniName": "FRAZER  [2TWP]",
            "PoliceJurisText": "",
            "Is511Event": "F",
            "StateRouteNo": "1014",
            "CountyFrom": "02",
            "CountyFromName": "ALLEGHENY",
            "BeginSegPoint": "00540627",
            "CountyTo": "02",
            "CountyToName": "ALLEGHENY",
            "EndSegPoint": "00602118",
            "CountyInc": "",
            "CountyIncName": "",
            "IncSegPoint": "",
            "IsTemporaryTrafficControlDevicesInUse": "F",
            "HaulerRestrictionInEffect": "F",
            "IsHaulerRestriction24x7": "F",
            "NoPermitTravel": "F",
            "MaxLengthRestriction": 0,
            "MaxWidthRestriction": 0,
            "MaxHeightRestriction": 0,
            "MaxWeightRestriction": 0,
            "EventRepetitionDetails": {
                "RepetitionID": "One Time Event",
                "Occurs": "N/A",
                "SkipHolidays": "N/A",
                "StartDate": "N/A",
                "EndDate": "N/A",
                "DailyStartTime": "N/A",
                "DailyEndTime": "N/A"
            },
            "Detours": [
                {
                    "DetourID": 6982,
                    "Direction": "E",
                    "VehicleType": "B",
                    "ColorID": "4",
                    "TotalLength": 5.144,
                    "Narrative": ""
                }
            ]
        }
    ]
}

plannedEvents Method

The plannedEvents method of the RCRS_Event_Data service returns Pennsylvania road events that are planned in RCRS at the time of the request.

Properties

PropertiesTypeDescription
EventIDNumberThe unique ID for the event in RCRS.
EventClassNumber
EventTypeTextText value indicating the cause of the event.

Please see the Code Tables section of this document for a full list of EventType values.
ReportOrgIDNumberThe PennDOT district associated with the event.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
DirectionTextRoadway direction affected by the event.

Please see the Code Tables section of this document for a full list of Direction values.
FromLocTextText description of the starting location of the event. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for Events.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
FromLocMileageNumberMileage to FromLoc.
FromLocDirectionTextOrdinal direction to FromLoc.
ToLocTextText description of the ending location of the event.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocMileageNumberMilage to ToLoc.
ToLocDirectionTextOrdinal direction to ToLoc.
IncidentLocTextText description of the incident location.
IncidentLocLatLongTextThe Latitude and Longitude of the incident location in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
IncidentLocMileageNumberMilage to IncidentLoc.
IncidentLocDirectionTextOrdinal direction to IncidentLoc.
DateTimeEventOccursDate/TimeThe date and time that the event is scheduled to begin in the format: YYYY-MM-DD HH:MM.
CreateTimeDate/TimeThe date and time that the event was created in RCRS in the format: YYYY-MM-DD HH:MM:SS
LastUpdateDate/TimeThe last date and time this event was updated in RCRS in the format: YYYY-MM-DD HH:MM:SS.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
CountyNumberThe county number associated with this event. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this event.
LaneStatusTextThe current status of the event.

Please see the Code Table section of this document for the full list of LaneStatus values.
AffectedLanesTextThe Lanes or Shoulders that are affected by the event.

Please see the Code Table section of this document for the full list of AffectedLanes values.
RestrictedSpeedValueNumberSpeed restriction for event in Miles Per Hour.
VehicleRestrictTextTextVehicle restrictions for event. Multiple vehicle restrictions may be returned in this element in a comma delimited list of values.

Please see the Code Table section of this document for the full list of VehicleRestrictText values.
VehicleRestrictTierTextVehicle restriction tier for event. Multiple vehicle restrictions belong to one tier.

Please see the Code Table section of this document for the full list of VehicleRestrictTier values.
DetourInEffectBooleanDetour is in effect: T=True, F=False.
IsInterstateBooleanEvent occurs on an interstate: T = True, F = False.
DescriptionTextText description of the overall event.
DateTimeNotifiedDate/TimeThe date and time that the event was reported in the format: YYYY-MM-DD HH:MM.
IncidentMuniNameTextName of township or borough in which the incident occurred.
PoliceJurisTextTextThe police jurisdiction for the event.

Please see the Code Table section of this document for the full list of PoliceJurisText values.
Is511EventBooleanIs a 511 event: T = True, F = False
StateRouteNoNumberThe state route number associated with the event.
CountyFromNumberThe county code associated with the beginning location of the event.
CountyFromNameTextThe county name associated with the beginning location of the event.
BeginSegPointNumberEight digit number containing the beginning segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyToNumberThe county code associated with the ending location of the event.
CountyToNameTextThe county name associated with the ending location of the event.
EndSegPointNumberEight digit number containing the ending segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyIncNumberThe county code associated with the incident location of the event.
CountyIncNameTextThe county name associated with the incident location of the event.
IncSegPointNumberEight digit number containing the incident segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
HaulerRestrictionInEffectBooleanFlag indicating whether event affects haulers: T = True, F = False
IsTemporaryTrafficControlDevicesInUseBooleanFlag indicating whether a temporary traffic control device is in use: T = True, F = False
IsHaulerRestriction24x7BooleanFlag indicating whether the hauler restriction is in effect for the entire duration of the event: T = True, F = False
NoPermitTravelBooleanFlag indicating that permitted travel is prohibited. T = True, F = False.
MaxLengthRestrictionNumberThe maximum allowable vehicle length in inches.
If no value was defined then this field will default to 0.
MaxWidthRestrictionNumberThe maximum allowable vehicle width in inches.
If no value was defined then this field will default to 0.
MaxHeightRestrictionNumberThe maximum allowable vehicle height in inches.
If no value was defined then this field will default to 0.
MaxWeightRestrictionNumberThe maximum allowable vehicle weight in pounds.
If no value was defined then this field will default to 0.
[EventRepetitionDetails]
RepetitionID
TextThe ID for the Repetitive Event.
If the event is not repetitive, will reflect: "One Time Event".
[EventRepetitionDetails]
Occurs
TextThe day(s) of the week on which the event occurs.
If the event is not repetitive, will reflect "N/A".

Please see the Code Table section of this document for
the full list of Occurs values.
[EventRepetitionDetails]
SkipHolidays
TextIndicates whether the event will be scheduled for,
and can occur on, holidays: YES/NO.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
StartDate
TextThe Start Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
EndDate
TextThe End Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
DailyStartTime
TextThe Start Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails]
DailyEndTime
TextThe End Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
DetoursJSON A listing of all detours that are in effect for the event.
Each detour will contain a detour ID, direction, vehicle type, color ID, total distance and narrative.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://gisdata.penndot.pa.gov/RCRS_Event_Data/api/RCRS/plannedEvents',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the plannedEvents method.

{
    "Values": [
        {
            "EventID": 276684,
            "EventClass": "14",
            "EventType": "special event",
            "ReportOrgID": "04",
            "Facility": "PA - 093",
            "Direction": "both directions",
            "FromLoc": "Intersection of DEWEY ST in NESCOPECK  [BORO]",
            "FromLocLatLong": "41.0523311193851,-76.215080887329",
            "FromLocMileage": "",
            "FromLocDirection": "",
            "ToLoc": "Intersection of MONTGOMERY ST in NESCOPECK  [BORO]",
            "ToLocLatLong": "41.0521299646895,-76.224771669308",
            "ToLocMileage": "",
            "ToLocDirection": "",
            "IncidentLoc": "",
            "IncidentLocLatLong": "",
            "IncidentLocMileage": "",
            "IncidentLocDirection": "",
            "DateTimeEventOccurs": "2016-08-20 15:00",            
            "CreateTime": "2016-07-28 08:02:33",
            "LastUpdate": "2016-07-28 08:02:33",
            "State": "PA",
            "County": "40",
            "CountyName": "LUZERNE",
            "LaneStatus": "closed",
            "AffectedLanes": "Left Lane, Center",
            "VehicleRestrictText": "",
            "VehicleRestrictTier": "",
            "DetourInEffect": "F",
            "IsInterstate": "F",
            "Description": "Special event on PA 93 both directions between DEWEY ST and MONTGOMERY ST.  All lanes closed.",
            "DateTimeNotified": "2016-07-28 07:54",            
            "DetourDescription": "",
            "IncidentMuniName": "NESCOPECK  [BORO]",
            "PoliceJurisText": "",
            "Is511Event": "F",
            "StateRouteNo": "0093",
            "CountyFrom": "40",
            "CountyFromName": "LUZERNE",
            "BeginSegPoint": "03900496",
            "CountyTo": "40",
            "CountyToName": "LUZERNE",
            "EndSegPoint": "04000000",
            "CountyInc": "",
            "CountyIncName": "",
            "IncSegPoint": "",
   "IsTemporaryTrafficControlDevicesInUse": "F",
            "HaulerRestrictionInEffect": "F",
            "IsHaulerRestriction24x7": "F",
            "NoPermitTravel": "F",
            "MaxLengthRestriction": 0,
            "MaxWidthRestriction": 0,
            "MaxHeightRestriction": 0,
            "MaxWeightRestriction": 0,
            "EventRepetitionDetails": {
                "RepetitionID": "276684",
                "Occurs": "Weekdays",
                "SkipHolidays": "NO",
                "StartDate": "2016-08-25",
                "EndDate": "2016-09-04",
                "DailyStartTime": "08:00",
                "DailyEndTime": "16:00"
            },
            "Detours": [
                {
                    "DetourID": 6982,
                    "Direction": "E",
                    "VehicleType": "B",
                    "ColorID": "4",
                    "TotalLength": 5.144,
                    "Narrative": ""
                }
            ]
        }
    ]
}

winterConditions Method

The winterConditions method of the RCRS_Event_Data service returns Pennsylvania roadway winter condition information active in RCRS at the time of the request.

Properties

PropertiesTypeDescription
RoadSectionIDNumberThe unique ID for the road section.
CountyNumberThe county number associated with this road condition. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this road condition.
ReportOrgIDNumberThe PennDOT district associated with the road condition.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
FromLocTextText description of the starting location of the road condition. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for road conditions.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the road condition in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocTextText description of the ending location of the road condition.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the road condition in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ConditionIDNumberNumeric value that indicates the condition of the roadway.

Please see the Code Table section of this document for the full list of ConditionID values.
ConditionTextShort text description value that indicates the condition of the roadway.

Please see the Code Table section of this document for the full list of Condition text values.
LastUpdateDate/TimeThe last date and time this road condition was updated in RCRS in the format: YYYY-MM-DD HH:MM.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://gisdata.penndot.pa.gov/RCRS_Event_Data/api/RCRS/winterConditions',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the winterConditions method.

{
    "Values": [
        {
            "RoadSectionID": 233,
            "County": "09",
            "CountyName": "BUCKS",
            "ReportOrgID": "06",
            "Facility": "0001  (US - 001)",
            "State": "PA",
            "FromLoc": "Intersection of LC TO OLD LINCOLN HW in BENSALEM  [2TWP]",
            "FromLocLatLong": "40.121135439041,-74.9779317190033",
            "ToLoc": "New Jersey State Line",
            "ToLocLatLong": "40.2060970735319,-74.7740916763213",
            "ConditionID": 1,
            "Condition": "Clear",
            "LastUpdate": "04/10/2016 08:21 AM"
        }
    ]
}

Code Tables

ConditionID

ConditionIDConditionDescription
1ClearNo snow or ice is bonded or accumulated on the road surface. Bare pavement surface is maintained at all times.
2Wet with Freezing ConditionsBare/wet pavement surface is the general condition. There are occasional areas having snow or ice accumulations resulting from drifting, sheltering, cold spots, frozen melt-water, etc.
3Snow and/or Slush CoveredAccumulations of loose snow or slush ranging up to (2 in.) are found on the pavement surface. Packed and bonded snow and ice are not present.
4Snow Packed/Significant Snow CoverThe pavement surface has continuous stretches of packed snow with or without loose snow on top of the packed snow or ice.
5IcyThe pavement surface is completely covered with packed snow and/or ice. There may be loose snow on top of the icy or packed snow surface.
6ImpassableThe road is temporarily impassable. This may be the result of severe weather (low visibility, etc.) or road conditions (drifting, excessive unplowed snow, avalanche potential or actuality, glare ice, accidents, vehicles stuck on the road, etc.).

County

CodeDescription
1ADAMS
2ALLEGHENY
3ARMSTRONG
4BEAVER
5BEDFORD
6BERKS
7BLAIR
8BRADFORD
9BUCKS
10BUTLER
11CAMBRIA
12CAMERON
13CARBON
14CENTRE
15CHESTER
16CLARION
17CLEARFIELD
18CLINTON
19COLUMBIA
20CRAWFORD
21CUMBERLAND
22DAUPHIN
23DELAWARE
24ELK
25ERIE
26FAYETTE
27FOREST
28FRANKLIN
29FULTON
30GREENE
31HUNTINGDON
32INDIANA
33JEFFERSON
34JUNIATA
35LACKAWANNA
36LANCASTER
37LAWRENCE
38LEBANON
39LEHIGH
40LUZERNE
41LYCOMING
42MCKEAN
43MERCER
44MIFFLIN
45MONROE
46MONTGOMERY
47MONTOUR
48NORTHAMPTON
49NORTHUMBERLAND
50PERRY
51PIKE
52POTTER
53SCHUYLKILL
54SNYDER
55SOMERSET
56SULLIVAN
57SUSQUEHANNA
58TIOGA
59UNION
60VENANGO
61WARREN
62WASHINGTON
63WAYNE
64WESTMORELAND
65WYOMING
66YORK
67PHILADELPHIA

Direction

CodeDescription
northboundEvent affected north bound lane(s).
southboundEvent affected south bound lane(s).
eastboundEvent affected east bound lane(s).
westboundEvent affected west bound lane(s).
both directionsEvent affected lanes in both directions of the roadway.
all directionsEvent affected all directions or direction is not applicable for event.

EventType

CodeDescription
crashCRASH (Event Class: 1)
debris on roadwayDEBRIS ON ROADWAY (Event Class: 1)
winter weatherWINTER WEATHER (Event Class: 1)
special eventSPECIAL EVENT (Event Class: 14)
other incidentOTHER (Event Class: 1)
roadworkROADWORK (Event Class: 3)
floodingFLOODING (Event Class: 1)
bridge outageBRIDGE OUTAGE (Event Class: 1)
downed utilityDOWNED UTILITY (Event Class: 1)
downed treeDOWNED TREE (Event Class: 1)
bridge precautionBRIDGE PRECAUTION (Event Class: 1)
multi vehicle crashCRASH (Multi-vehicle) (Event Class: 1)
disabled vehicleDISABLED VEHICLE (Event Class: 1)
slow vehicleSLOW VEHICLE (Event Class: 1)
vehicle fireVEHICLE FIRE (Event Class: 1)
police department activityPOLICE ACTIVITY (Event Class: 1)
incident clearedINCIDENT CLEARED (Event Class: 1)
bridge outageBRIDGE FLOOD WASHOUT/DAMAGE (Event Class: 1)
downed tree in wiresDOWNED TREE IN WIRES (Event Class: 1)
fire department activityFIRE DEPARTMENT ACTIVITY (Event Class: 1)
moving roadworkMOVING ROADWORK (Event Class: 3)
utility workUTILITY WORK (Event Class: 3)
damaged roadwayDAMAGED ROADWAY (Event Class: 3)
rubberneckingRUBBERNECKING (Event Class: 1)
vehicle recovery/follow upVEHICLE RECOVERY/FOLLOW UP (Event Class: 1)

LaneStatus

CodeDescription
openAll lanes are open and event is cleared from system and roadway.
closedAll lanes of traffic are closed.
lane restrictionOne or more lanes of a roadway are closed, but at least one is still open to traffic.
shoulder closedAn incident is on the side of road, not blocking any lanes of traffic.
traffic disruptionAll other incidents and issues that do no closed or restrict part of the roadway.
ramp closureIndicates a ramp as closed, but it is depicted on the road exiting from, not the ramp itself.
ramp restrictionIndicates a ramp as restricted but open to traffic, but it is depicted on the road exiting from, not the ramp itself.
speed restrictionIndicates a restriction in the speed limit on a roadway.
vehicle restrictionIndicates a restriction for the types of vehicles on a roadway.
no entry accessIndicates a roadway`s vehicle entry points are closed, leaving the roadway open to traffic currently on it.

PoliceJurisText

CodeDescription
PSPPennsylvania State Police
LOCALLocal Police

ReportOrgID

CodeDescription
01District 01: Erie,Crawford,Forest,Mercer,Venango,Warren
02District 02: Cameron,Centre,Clearfield,Clinton,Elk,Juniata,McKean,Mifflin,Potter
03District 03: Bradford,Columbia,Lycoming,Montour,Northumberland,Snyder,Sullivan,Tioga,Union
04District 04: Lackawanna,Luzerne,Pike,Susquehanna,Wayne,Wyoming
05District 05: Berks,Carbon,Lehigh,Monroe,Northampton,Schuylkill
06District 06: Bucks,Chester,Delaware,Montgomery,City and County of Philadelphia
07NOT USED
08District 08: Adams,Cumberland,Dauphin,Franklin,Lancaster,Lebanon,Perry,York
09District 09: Bedford,Blair,Cambria,Fulton,Huntingdon,Somerset
10District 10: Armstrong,Butler,Clarion,Indiana,Jefferson
11District 11: Allegheny,Beaver,Lawrence
12District 12: Greene,Fayette,Washington,Westmoreland

VehicleRestrictText

CodeDescription
ALL COMMERCIAL VEHICLES WITHOUT CHAINS OR ATD ONBOARDRestriction applies to all commercial vehicles without chains or atd onboard.
ALL COMMERCIAL VEHICLES WITH CHAINS OR ATD ONBOARD Restriction applies to all commercial vehicles with chains or atd onboard.
EMPTY TANDEM TRAILERSRestriction applies to empty tandem trailers.
EMPTY BOX TRUCKSRestriction applies to empty box trucks.
SCHOOL BUSES, COMMERCIAL BUSES AND MOTOR COACHES WITHOUT CHAINS OR ATD ONBOARDRestriction applies to school buses, commercial buses, and motor coaches without chains or atd on board.
TRACTORS WITHOUT TRAILERSRestriction applies to tractors without trailers.
VEHICLES WITH TOW BEHIND TRAILERSRestriction applies to vehicles with tow behind trailers.
MOTORCYCLESRestriction applies to motorcycles.
PERMITTED LOADSRestriction applies to permitted loads.
RV/CAMPERSRestriction applies to recreation or camper vehicles.
EMPTY STRAIGHT TRAILERSRestriction applies to empty straight trailers.
LOADED TANDEM TRAILERS WITHOUT CHAINS OR ATD ONBOARDRestriction applies to loaded tandem trailers without chains or atd on board.
SCHOOL BUSES, COMMERCIAL BUSES AND MOTOR COACHES WITH CHAINS OR ATD ONBOARDRestriction applies to school buses, commercial buses, and motor coaches with chains or atd on board.
LOADED STRAIGHT TRAILERS WITHOUT CHAINS OR ATD ONBOARDRestriction applies to loaded straight trailers without chains or atd on board.
LOADED TANDEM TRAILERS WITH CHAINS OR ATD ONBOARDRestriction applies to loaded tandem trailers with chains or atd on board.
LOADED BOX TRUCKSRestriction applies to loaded box trucks.
LOADED STRAIGHT TRAILERS WITH CHAINS OR ATD ONBOARDRestriction applies to loaded straight trailers with chains or atd on board.

VehicleRestrictTier

TierVehicles
TIER 1EMPTY TANDEM TRAILERS, EMPTY BOX TRUCKS, SCHOOL BUSES, COMMERCIAL BUSES AND MOTOR COACHES WITHOUT CHAINS OR ATD ON BOARD, TRACTORS WITHOUT TRAILERS, VEHICLES WITH TOW BEHIND TRAILERS, RV/CAMPERS, PERMITTED LOADS, MOTORCYCLES, EMPTY STRAIGHT TRAILERS
TIER 2LOADED TANDEM TRAILERS WITHOUT CHAINS OR ATD ONBOARD, SCHOOL BUSES, COMMERCIAL BUSES AND MOTOR COACHES WITH CHAINS OR ATD ON BOARD
TIER 3LOADED STRAIGHT TRAILERS WITHOUT CHAINS OR ATD ON BOARD, LOADED TANDEM TRAILERS WITH CHAINS OR ATD ONBOARD
TIER 4LOADED BOX TRUCKS, LOADED STRAIGHT TRAILERS WITH CHAINS OR ATD ON BOARD

AffectedLanes

CodeDescription
Left ShoulderLeft Shoulder is closed/restricted.
Left LaneLeft Lane is closed/restricted.
Left CenterLeft Shoulder is closed/restricted.
CenterCenter is closed/restricted.
Right CenterRight Center is closed/restricted.
Right LaneRight Lane is closed/restricted.
Right ShoulderRight Shoulder is closed/restricted.
NoneNo lane/shoulder is closed/restricted.

Occurs

CodeDescription
DailyRepetitive Event will occur every day of the week.
WeekdaysRepetitive Event will occur on weekdays, Monday through Friday.
WeekendsRepetitive Event will occur on weekends, Saturday and Sunday.
[Other]The day of the week, or a list of days, that the Repetitive Event will occur
(e.g., "Monday, Wednesday and Friday" or "Tuesday and Thursday").

Last updated September 26, 2023