Clearing the Air with Airly's Data-Driven City Solutions

Summary

Airly, a smart city solutions provider, partnered with Momentum to address urban air quality challenges. Together, we created a unified platform that transforms vast amounts of sensor data into actionable insights. This innovative system empowers governments to make informed decisions for cleaner, healthier cities by efficiently monitoring, analyzing, and visualizing air quality data in real-time.

Technology stack:
 
Introduction
Introduction

Breathing Life into Global Air Quality Monitoring

Imagine a world where every breath of air is monitored, analyzed, and improved. This was the vision of Airly, a company dedicated to delivering air quality information not just in Poland and Europe, but across the globe. Their mission? To arm local communities with the knowledge they need to fight for better air quality. But Airly faced a monumental challenge: how to make sense of the vast amount of data collected by their advanced sensors and transform it into a powerful tool for change.

 
Challenge
Challenge

Navigating the Data Tsunami

As we dove into the project, the enormity of the task before us became clear. We weren't just dealing with a complex technical problem; we were facing a challenge that could impact the health and well-being of millions. Airly wasn't just dealing with a trickle of information, they were facing a tsunami of data from various sources, each speaking its own language. It was like trying to conduct a global conversation where every participant spoke a different dialect.

Here's what we were up against:

 
 

Data deluge

Imagine trying to drink from a fire hose. That's what processing the massive volume of air quality data felt like.

 
 

Tower of Babel

Each vendor's data came in a different format, like puzzle pieces from different boxes that we somehow had to fit together.

 
 

Time travel troubles

Retrieving historical data was like trying to archive the internet - we needed to make about 100,000 API requests just to gather past records.

 
 

The need for speed

The system had to analyze incoming data in real-time, without breaking a sweat.

 
 

Truth in numbers

Ensuring data accuracy was paramount - after all, we were dealing with information that could shape environmental policies.

 
 

Growing pains

The system needed to be ready for growth, able to handle more data and new sources as Airly expanded.

 
 

User-friendly complexity

How do you present complex data sets in a way that's easy for policymakers and researchers to understand at a glance?

 
 

Performance under pressure

With so much data being processed, maintaining quick response times was like trying to keep a Formula 1 car running smoothly in rush hour traffic.

 
Goals
Goals

5 Milestones for Cleaner Urban Air

With a clear understanding of the challenges that lay before us, we set out to chart a course towards cleaner air and smarter cities. Our goals weren't just about building a platform, they were about creating a tool that could change the way we interact with our environment.

Here's what we aimed to achieve:

01

Build a unified platform that could make sense of air quality data from multiple sources, turning chaos into clarity.

02

Create a system robust enough to handle vast volumes of data efficiently, like a digital air purifier for information.

03

Design an interface so intuitive that even complex data sets become as easy to read as a weather forecast.

04

Enable real-time monitoring of air quality parameters across various locations, giving cities a live pulse of their environmental health.

05

Provide tools for historical data analysis, allowing policymakers to spot trends and make informed decisions about the future of their cities.

 
Our Approach
Our Approach

Building a Smarter Future, Step by Step

Tackling a project of this magnitude required more than just technical skills; it demanded a flexible, iterative approach that could adapt to the ever-changing landscape of data and environmental needs. We chose to use Agile methodology, not just as a development framework, but as a philosophy that would allow us to breathe and evolve with the project.

Here's how we broke it down:

01

Data detective work

We started by diving deep into the various data sources and formats. This investigative work laid the foundation for designing a flexible data architecture that could handle diverse inputs.

02

Building block by block

Using sprints, we developed the platform piece by piece. We focused on getting the core functionalities right first, then gradually added more complex features. This approach allowed us to deliver value early and often.

03

Constant fine-tuning

Given the sheer volume of data we were dealing with, optimizing performance was an ongoing process. We continuously refined our data retrieval and processing algorithms, always looking for ways to make the system faster and more efficient.

04

Making data speak

We collaborated closely with UX designers to ensure that the data visualization tools weren't just functional, but intuitive. Our goal was to create a system where complex data sets could tell their story at a glance, empowering users to make quick, informed decisions.

 
Technology Stack
Technology Stack

Powerful Tools for Complex Environmental Data Management

In the world of air quality monitoring, choosing the right tools isn't just about technical specifications; it's about finding the perfect balance between power, flexibility, and efficiency. Our technology stack wasn't just a list of programming languages and databases; it was the backbone of a system designed to make our cities smarter and our air cleaner.

Here's what we used and why:

 
 

Ruby on Rails

We chose this robust framework for its ability to handle complex web applications efficiently. Rails' "convention over configuration" philosophy allowed us to develop the backend systems rapidly, giving us more time to focus on solving the unique challenges of the project.

 
 

PostgreSQL

This powerful database was our go-to for managing large datasets. Its advanced querying capabilities and support for JSON data types were invaluable in handling the diverse data formats we encountered.

 
 

Redis

To keep things running smoothly, we implemented Redis as a caching layer. Its in-memory data structure store allowed for lightning-fast data retrieval, significantly reducing load times for users.

 
 

Sidekiq

For handling the heavy lifting of background job processing, we turned to Sidekiq. This tool was crucial in enabling asynchronous data downloads and processing, allowing us to manage the large volume of historical data without impacting the application's responsiveness.

 
Implementation
Implementation

From Concept to Reality

Our journey from concept to reality was more than just a development process; it was an expedition into uncharted territory of data processing and environmental monitoring. Each milestone we reached and each challenge we overcame brought us closer to our goal of creating a platform that could truly make a difference in urban air quality.

Here's how we brought our vision to life:

 
 

Data unification system

We developed a sophisticated ETL (Extract, Transform, Load) process that could take data from various sources and standardize it into a unified format. This was like creating a universal translator for air quality data.

 
 

Asynchronous data retrieval

We redesigned the data downloading process to work asynchronously, breaking one month of data into 45-second intervals processed in batches. This clever approach dramatically reduced the time required to populate the system with historical data.

 
 

Real-time monitoring dashboard

We created a visual panel that serves as the command center for the system, providing real-time status updates of Airly sensors and summarizing system efficiency at a glance.

 
 

Advanced analytics tools

We implemented powerful data analysis features, including aggregation, filtration, and the ability to identify maximum values within specified time periods. These tools transformed raw data into actionable insights.

 
Challenges Overcome
Challenges Overcome

Conquering Data Complexity

Along the way, we encountered and overcame several challenges. These weren't just technical hurdles; they were the dragons we had to slay to reach our goal of cleaner air and smarter cities. Each challenge pushed us to innovate, forging new paths in environmental data processing.

Here's how we turned potential roadblocks into stepping stones:

 
 

Data volume

We tackled the challenge of processing enormous amounts of data by implementing efficient database indexing and query optimization in PostgreSQL. This was like creating fast lanes in a data highway.

 
 

API limitations

To address the issue of API request limits, we developed a smart queuing system using Sidekiq. This ensured that our data retrieval process didn't overwhelm external APIs, maintaining a steady flow of information.

 
 

Data standardization

We created a flexible data mapping system capable of adapting to various input formats. This ensured that all data could be standardized regardless of its source, creating a common language for air quality information.

 
Results
Results

Transformative Outcomes in Urban Air Quality Management

Our collaboration with Airly wasn't just about delivering a product; it was about creating a tool that could transform how we understand and manage urban air quality. The results of our efforts weren't just measured in lines of code or data points processed, but in the potential for real, tangible impact on the environment and public health.

Here's what we achieved:

 
 

Data Processing Infrastructure

We successfully developed a panel that processes measurement data from Airly sensors and other data providers. This system now efficiently handles parameters such as air temperature, atmospheric pressure, relative air humidity, dust concentration (PM2.5, PM1, PM10), and nitrogen dioxide & ozone concentration.

 
 

Configurable Data Management

The panel we created enables configuring frequencies of data downloads, ensuring timely updates of air quality information.

 
 

Unified Data Architecture

We implemented a system that saves data in PostgreSQL in a unified standard, creating a consistent and easily accessible database of air quality information.

 
 

Advanced Analytics Engine

Our solution provides powerful data analysis capabilities, including aggregation of data from given time periods, data filtration, and the ability to find maximum values among other data points in the same period.

 
 

Historical Data Management

We ensured access to historical data, allowing for trend analysis and long-term air quality assessments.

 
 

Performance Monitoring Dashboard

The system includes a visual panel summarizing the efficiency of the whole system, providing at-a-glance insights into its performance.

 
 

IoT Device Status Tracking

Users can now view the status of Airly sensors through the platform, ensuring transparency and reliability of data sources.

 
 

Environmental Impact

Perhaps most importantly, our system contributes to improving the quality of the environment. It enables faster identification of new pollution sources and quicker responses to air quality issues.

 
Future Direction
Future Direction

Expanding Horizons

As we stand on the precipice of a new era in environmental monitoring, we can't help but look to the horizon with excitement and anticipation. The Airly platform isn't just a finished product; it's a living, breathing system with the potential to grow and evolve alongside the cities it serves. As we look ahead, our focus is on enhancing and expanding the capabilities of the Airly platform:

 
 

We're exploring ways to further optimize our data processing algorithms, aiming to handle even larger volumes of data as Airly expands its sensor network.

 
 

There's potential to integrate additional environmental parameters into our monitoring system, providing a more comprehensive view of urban air quality.

 
 

We're considering developing more advanced visualization tools to make complex air quality data even more accessible to policymakers and the public.

Build impactful products that revolutionize healthcare

See all Case Studies