Skip to content

Instantly share code, notes, and snippets.

@jacqui
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacqui/5c3cb20c6a95b0ef48e7 to your computer and use it in GitHub Desktop.
Save jacqui/5c3cb20c6a95b0ef48e7 to your computer and use it in GitHub Desktop.
streamtools pattern for the UK Live Traffic - Unplanned Events (accidents) data at http://hatrafficinfo.dft.gov.uk/feeds/datex/England/UnplannedEvent/content.xml
{
"Blocks": [
{
"Id": "1",
"Type": "bang",
"Rule": null,
"Position": {
"X": 219,
"Y": 30
}
},
{
"Id": "3",
"Type": "unpack",
"Rule": {
"Path": ".d2LogicalModel.payloadPublication.situation"
},
"Position": {
"X": 311,
"Y": 326
}
},
{
"Id": "4",
"Type": "parsexml",
"Rule": {
"Path": ".body"
},
"Position": {
"X": 269,
"Y": 238
}
},
{
"Id": "18",
"Type": "histogram",
"Rule": {
"Path": ".situationRecord.type",
"Window": "10m0s"
},
"Position": {
"X": 382,
"Y": 437
}
},
{
"Id": "2",
"Type": "webRequest",
"Rule": {
"BodyPath": ".",
"Headers": {},
"Method": "GET",
"Url": "http://data.gov.uk/data/resource_cache/7e/7ee4997c-cbc2-4d6a-a441-c12d1e824378/content.xml",
"UrlPath": ""
},
"Position": {
"X": 244,
"Y": 137
}
},
{
"Id": "5",
"Type": "tolog",
"Rule": null,
"Position": {
"X": 158,
"Y": 488
}
},
{
"Id": "10",
"Type": "count",
"Rule": {
"Window": "10m0s"
},
"Position": {
"X": 294,
"Y": 566
}
},
{
"Id": "20",
"Type": "histogram",
"Rule": {
"Path": ".situationRecord.accidentType",
"Window": "10m0s"
},
"Position": {
"X": 508,
"Y": 448
}
},
{
"Id": "22",
"Type": "histogram",
"Rule": {
"Path": ".situationRecord.impact.impactOnTraffic",
"Window": "10m0s"
},
"Position": {
"X": 499,
"Y": 369
}
}
],
"Connections": [
{
"Id": "9",
"FromId": "4",
"ToId": "5",
"ToRoute": "in"
},
{
"Id": "7",
"FromId": "1",
"ToId": "2",
"ToRoute": "in"
},
{
"Id": "8",
"FromId": "2",
"ToId": "4",
"ToRoute": "in"
},
{
"Id": "11",
"FromId": "3",
"ToId": "10",
"ToRoute": "in"
},
{
"Id": "19",
"FromId": "3",
"ToId": "18",
"ToRoute": "in"
},
{
"Id": "21",
"FromId": "3",
"ToId": "20",
"ToRoute": "in"
},
{
"Id": "17",
"FromId": "4",
"ToId": "3",
"ToRoute": "in"
},
{
"Id": "23",
"FromId": "3",
"ToId": "22",
"ToRoute": "in"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment