Smart Traffic Light Sensor Data
This dataset contains detailed, time-stamped sensor readings from urban traffic light systems, including vehicle and pedestrian counts, signal phases, queue lengths, and environmental conditions. It enables comprehensive analysis of traffic flow, signal optimization, and supports sustainability initiatives for smart city deployments. The dataset is ideal for real-time monitoring, predictive modeling, and urban planning applications.
Sample rows
preview · 8 of 120 rows · all 15 columns| sensor_idstring | signal_phasestring | signal_durationfloat | emergency_vehicle_detectedboolean | countrystring | intersection_idstring | timestampdatetime | vehicle_countinteger | pedestrian_countinteger | average_vehicle_speedfloat | queue_lengthfloat | weather_conditionstring | latitudefloat | longitudefloat | citystring |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TLX_2041A | red | 92 | false | USA | INT_1001 | 2024-06-03T07:15:32Z | 35 | 14 | 17.2 | 34.8 | clear | 40.7128 | -74.006 | New York |
| SEN-8352X | green | 62.4 | false | UK | INT_2047 | 2024-06-03T07:17:00Z | 20 | 6 | 32.5 | 8.3 | rain | 51.5074 | -0.1278 | London |
| TL_0019Z | yellow | 4.7 | false | Japan | INT_3012 | 2024-06-03T07:18:45Z | 3 | 21 | 9.1 | 2.2 | cloudy | 35.6895 | 139.6917 | Tokyo |
| TLX-9923B | red | 104.9 | false | France | TWN_1123 | 2024-06-03T07:19:00Z | 56 | 18 | 14.8 | 41 | cloudy | 48.8566 | 2.3522 | Paris |
| SEN_4895T | green | 50.6 | false | Germany | INT_9021 | 2024-06-03T07:20:21Z | 28 | 8 | 41.3 | 12.5 | clear | 52.52 | 13.405 | Berlin |
| TL-3455A | yellow | 3.8 | false | Australia | TWN_6532 | 2024-06-03T07:21:13Z | 2 | 13 | 8 | 1.9 | rain | -33.8688 | 151.2093 | Sydney |
| TL_8765M | red | 134 | false | India | INT_8372 | 2024-06-03T07:22:55Z | 76 | 3 | 12.3 | 48.4 | fog | 19.076 | 72.8777 | Mumbai |
| SEN-2018K | green | 75 | true | Brazil | INT_4056 | 2024-06-03T07:23:49Z | 44 | 17 | 37.9 | 21.3 | clear | -23.5505 | -46.6333 | São Paulo |
| TLX_4738G | yellow | 5.8 | false | Italy | TWN_2126 | 2024-06-03T07:25:02Z | 6 | 19 | 7.4 | 4.6 | cloudy | 41.9028 | 12.4964 | Rome |
| SEN_2048U | red | 127.8 | false | USA | INT_5602 | 2024-06-03T07:26:33Z | 93 | 28 | 10.9 | 62.7 | fog | 37.7749 | -122.4194 | San Francisco |
| TLX-7893C | green | 42.2 | false | Russia | TWN_6583 | 2024-06-03T07:28:05Z | 19 | 7 | 45 | 9.8 | clear | 55.7558 | 37.6173 | Moscow |
| TL-3021R | yellow | 2.7 | false | Sweden | INT_1034 | 2024-06-03T07:29:40Z | 1 | 11 | 4.6 | 2 | fog | 59.3293 | 18.0686 | Stockholm |
| SEN-4208Y | red | 117.3 | false | Italy | INT_7600 | 2024-06-03T07:31:20Z | 47 | 34 | 13.7 | 39.1 | snow | 45.4642 | 9.19 | Milan |
| TL_4209V | green | 64.1 | false | Argentina | TWN_8724 | 2024-06-03T07:32:55Z | 34 | 10 | 38.2 | 18.7 | clear | -34.6037 | -58.3816 | Buenos Aires |
| TLX-9031Q | red | 150.3 | true | Japan | INT_2080 | 2024-06-03T07:34:27Z | 68 | 4 | 8.5 | 53.2 | other | 35.6762 | 139.6503 | Tokyo |
| SEN_5007W | green | 51 | false | USA | TWN_3125 | 2024-06-03T07:36:13Z | 29 | 12 | 29.8 | 16.2 | clear | 34.0522 | -118.2437 | Los Angeles |
| TL_2034E | yellow | 6.4 | false | Germany | INT_3045 | 2024-06-03T07:37:52Z | 5 | 25 | 5.7 | 3.3 | cloudy | 50.1109 | 8.6821 | Frankfurt |
| TLX_9001N | red | 112.7 | false | China | TWN_6541 | 2024-06-03T07:39:16Z | 80 | 20 | 10.1 | 60.2 | rain | 39.9042 | 116.4074 | Beijing |
| SEN-9002L | green | 70.2 | false | Canada | INT_2098 | 2024-06-03T07:41:03Z | 40 | 15 | 27.3 | 20 | clear | 43.6532 | -79.3832 | Toronto |
| TL_3090Y | yellow | 7.1 | false | China | TWN_8207 | 2024-06-03T07:42:14Z | 7 | 21 | 6.2 | 5.7 | cloudy | 31.2304 | 121.4737 | Shanghai |
What the 120 rows show
from the 120-row sampleYellow (signal phase) stands out: mean signal_
- 13%emergency_
vehicle_ detected = true - 59.0median signal_
duration - 6weather conditions
- 22median vehicle_
count - 12median pedestrian_
count - 16.2median average_
vehicle_ speed
Median 59.0, from 2.0 to 180.0.
- string 6
- integer 2
- float 5
- datetime 1
- boolean 1
Columns
15 columns in four groups| column | type | description | example |
|---|---|---|---|
| Text 6 columns | |||
sensor_id | string | Unique identifier for the traffic light sensor device | TLX_2041A |
intersection_id | string | Unique identifier for the intersection where the sensor is located | INT_1001 |
signal_phase | string | Current phase of the traffic signal (e.g., red, yellow, green)red · yellow · green | red |
weather_condition | string | Weather condition at the time of the sensor reading6 values · optional | clear |
city | string | City where the intersection is located | New York |
country | string | Country where the intersection is located | USA |
| Numbers 7 columns | |||
vehicle_count | integer | Number of vehicles detected in the intersection during the signal phase0 or more | 35 |
pedestrian_count | integer | Number of pedestrians detected in the intersection during the signal phase0 or more · optional | 14 |
average_vehicle_speed | float | Average speed of vehicles detected (in km/h) during the signal phase0 or more · optional | 17.2 |
queue_length | float | Estimated length of vehicle queue (in meters) at the intersection0 or more · optional | 34.8 |
signal_duration | float | Duration of the current signal phase (in seconds)0 or more | 92 |
latitude | float | Latitude coordinate of the intersection-90 to 90 | 40.7128 |
longitude | float | Longitude coordinate of the intersection-180 to 180 | -74.006 |
| Dates and times 1 column | |||
timestamp | datetime | Date and time when the sensor reading was recorded (UTC) | 2024-06-03T07:15:32Z |
| True or false 1 column | |||
emergency_vehicle_detected | boolean | Indicates if an emergency vehicle was detected during the signal phaseoptional | false |
15 SQL practice questions for the Smart Traffic Light Sensor Data
Written for this data and checked against it: 12 SQL and 3 Power BI exercises from beginner to advanced. Try the first three free; the practice kit has all 15, a starter .sql file and an answer key with every expected result.
Red-phase readings with long queues
Return sensor_id, city and queue_length for all readings where signal_phase is 'red' and queue_length is greater than 100. Sort by queue_length from highest to lowest, then by sensor_id in ascending order.
Tables: smart_traffic_light_sensor_data · your result: 3 columns, 3 rowsDistinct countries
Return each distinct country once, in a single column named country, sorted alphabetically from A to Z.
Tables: smart_traffic_light_sensor_data · your result: 1 columns, 35 rowsReadings per signal phase
Return signal_phase and the number of readings in each phase as reading_count. Sort by reading_count from highest to lowest, then by signal_phase in ascending order.
Tables: smart_traffic_light_sensor_data · your result: 2 columns, 3 rows
- 04Average speed by weatherBeginner
- 05Total vehicles by country bar chartPower BI
- 06Cities with heavy average pedestriansIntermediate
- 07Traffic volume bucketsIntermediate
- 08Readings slower than overall averageIntermediate
- 09Readings per month with emergenciesIntermediate
- 10Countries above average queue lengthPower BI
- 11Top vehicle reading per countryAdvanced
- 12Change from previous readingAdvanced
- 13Running total of pedestriansAdvanced
- 14Share of vehicles by countryAdvanced
- 15Speed anomalies versus weather averagePower BI
Get the practice kit: the full dataset, all 15 exercises, a starter .sql and the answer key. One-time $3.99.
Get the practice kit · $3.99Use it for
A transportation dashboard
The emergency_
vehicle_ detected rate, signal_ duration by signal_ phase and a breakdown of country. Excel, Power BI or Tableau. Why do the 34 yellow rows have a mean signal_
duration of 4.9? A root-cause class exercise
Hand out the rows and one question. The answer is in the data, not in the brief.
- Sensors120TLX_2041A92redSEN-2018K75greenTLX-9031Q150.3red
A software demo
Believable sensors with intersection_
id, timestamp and signal_ phase to fill a screen in front of a buyer.
blueprint · smart-traffic-light-sensor-data
Behind this dataset
Same schema. As many rows as you need.
These 120 rows came out of a blueprint — 15 columns with generation rules behind each one. Open it in Data Factory to retune a column, add your own, wire in foreign keys, and run it at the size you actually need.
- Each record captures timestamp, intersection ID, vehicle count, pedestrian count, air quality index, and emergency override status.
- Vehicle and pedestrian counts vary by time of day and simulated event (e.g., rush hour, public event).
- Air quality index influenced by traffic volume and weather conditions.
- Emergency override flag activated only during simulated incidents.
- Intersection IDs must remain unique per row.
1 credit per row. Preview 20 rows free. Buy rows for the full run.
- Exports
- CSV, JSON, JSONL, Parquet, SQL, Excel, TSV, XML
- Licence
- yours to use, including commercially
- API slug
- smart-traffic-light-sensor-data