0
0
SCADA systemsdevops~30 mins

Data quality flags in SCADA systems - Mini Project: Build & Apply

Choose your learning style9 modes available
Data Quality Flags in SCADA Systems
📖 Scenario: You work with a SCADA system that collects sensor readings from a factory. Each reading has a value and a quality flag that tells if the data is good or has issues.Quality flags help operators know if sensor data is reliable or needs attention.
🎯 Goal: Create a program that stores sensor readings with their quality flags, sets a threshold for acceptable quality, filters out bad data, and shows only good readings.
📋 What You'll Learn
Create a dictionary called sensor_readings with exact keys and values
Add a variable called quality_threshold with the exact value 2
Use a dictionary comprehension to create good_readings with readings having quality flags less than quality_threshold
Print the good_readings dictionary
💡 Why This Matters
🌍 Real World
SCADA systems monitor industrial sensors and use quality flags to ensure operators trust the data before making decisions.
💼 Career
Understanding how to handle data quality flags is important for roles in industrial automation, process control, and data engineering.
Progress0 / 4 steps
1
Create sensor readings dictionary
Create a dictionary called sensor_readings with these exact entries: 'temp_sensor': (22.5, 1), 'pressure_sensor': (101.3, 3), 'humidity_sensor': (45.0, 2), 'flow_sensor': (5.5, 1)
SCADA systems
Need a hint?

Use curly braces {} to create a dictionary. Each key is a sensor name string, and each value is a tuple with a float and an integer.

2
Set quality threshold
Add a variable called quality_threshold and set it to the integer 2
SCADA systems
Need a hint?

Just assign the number 2 to the variable quality_threshold.

3
Filter good quality readings
Use a dictionary comprehension to create a dictionary called good_readings that includes only entries from sensor_readings where the quality flag (second item in the tuple) is less than quality_threshold
SCADA systems
Need a hint?

Use {key: value for key, value in dict.items() if condition} syntax. Check if the second item in the tuple is less than quality_threshold.

4
Display good readings
Write a print statement to display the good_readings dictionary
SCADA systems
Need a hint?

Use print(good_readings) to show the filtered dictionary.