0
0
SCADA systemsdevops~30 mins

Querying historical data in SCADA systems - Mini Project: Build & Apply

Choose your learning style9 modes available
Querying Historical Data
📖 Scenario: You work with a SCADA system that collects sensor data over time. You want to query the historical data to find specific readings.
🎯 Goal: Build a simple query to extract temperature readings from the historical data for analysis.
📋 What You'll Learn
Create a dictionary called historical_data with exact timestamp keys and temperature values
Add a variable called threshold to filter temperatures above a certain value
Use a dictionary comprehension called filtered_data to select entries with temperature above threshold
Print the filtered_data dictionary
💡 Why This Matters
🌍 Real World
SCADA systems collect sensor data over time. Querying historical data helps operators analyze trends and detect issues.
💼 Career
Knowing how to filter and query historical sensor data is important for roles in industrial automation, monitoring, and data analysis.
Progress0 / 4 steps
1
Create historical data dictionary
Create a dictionary called historical_data with these exact entries: '2024-06-01 08:00': 22.5, '2024-06-01 09:00': 23.0, '2024-06-01 10:00': 24.1, '2024-06-01 11:00': 25.3, '2024-06-01 12:00': 26.7
SCADA systems
Need a hint?

Use curly braces to create a dictionary with string keys and float values.

2
Add temperature threshold
Add a variable called threshold and set it to 24.0 to filter temperatures above this value.
SCADA systems
Need a hint?

Just assign the number 24.0 to the variable named threshold.

3
Filter data above threshold
Use a dictionary comprehension called filtered_data to select entries from historical_data where the temperature is greater than threshold.
SCADA systems
Need a hint?

Use dictionary comprehension syntax: {key: value for key, value in dict.items() if condition}.

4
Print filtered data
Print the filtered_data dictionary to display the filtered temperature readings.
SCADA systems
Need a hint?

Use print(filtered_data) to show the filtered dictionary.