CLIMA: Client-Linked Integration of Meteorological Activity

Real-time weather data captured via Arduino sensors tailors store offers, enhancing customer engagement and boosting sales efficiency via Twilio Segment, Databricks, AWS & Edge Impulse.

Included in DataPalooza Hackathlon's Project Gallery »
The unpredictability and profound impact of climate on every facet of life, including business and consumer behavior, is a matter of increasing urgency and importance. Far from a novelty, understanding and integrating climate data into business strategies is becoming a necessity for resilience and adaptability in a rapidly changing world.

The implications of climate are vast, affecting supply chains, determining market availability, influencing consumer needs and behaviors, and even dictating the economic viability of certain business models. Some interesting facts, & newly developed services supporting this theses:
  • Weather significantly affects consumer behavior, influencing mood, purchase decisions, and spending levels. It is the second largest influence on consumer behavior after economic conditions​​. [WeatherAds]
  • Empirical evidence from a study in China shows that sunny and rainy weather positively impacts daily sales compared to cloudy weather. This suggests that certain weather conditions can boost consumer spending​​. [ScienceDirect]
  • Research from the San Francisco Federal Reserve indicates that weather effects on store sales are persistent and not merely due to shifts in timing or location of purchases by consumers​​. [San Francisco Fed]
  • Studies have shown that various weather elements like temperature, humidity, snowfall, and especially sunlight, can impact retail sales. Sunlight has been found to particularly affect mood, which in turn influences consumer spending habits​​. [ScienceDirect]
  • The impact of weather can vary greatly, affecting daily sales by as much as 23.1% based on the store location and up to 40.7% depending on the sales theme, highlighting the significant influence of both extreme and favorable weather conditions​​. [Journal of Retail and Consumer Services]
  • Weather Unlocked reports that weather conditions can predict consumer demand with high accuracy, such as a 1-degree rise in temperature can increase the demand for certain products like fizzy drinks by 22%, while decreasing demand for others such as porridge by 60%​​. [WeatherUnlocked]
Using real-time weather data as exemplified in the CLIMA project isn't just about tapping into a trend; it's about harnessing crucial environmental intelligence to make more informed, proactive marketing decisions. It's a step towards sustainability and climate-conscious operations, aligning business practices with the larger global shift towards acknowledging and addressing the challenges posed by climate change.

The CLIMA project is not just about the technical marvel of integrating data across platforms -as facilitated by Twilio Segment, AWS, Databricks, Edge Impulse and Arduino; it's about the foresight and responsibility of incorporating environmental factors into the core business strategy of any business. This approach can lead to brands being seen as leaders in climate adaptation, potentially influencing industry standards and consumer expectations. The project intends to be part of a larger movement that prioritizes not only economic efficiency but also environmental awareness and sustainable practices.


Overall, this project intends to empower business to react in real-time to changing weather conditions at the granular retail-point level, being able to trigger engagements with customers within the vicinity of each individual retail point in their distribution network:

  • Send offers for items regularly consumed in certain weather conditions (cold soft drinks in hot conditions, coffee/ tea beverages in cold conditions).
  • Send offers for items regularly required to attend certain conditions (rain protection gear when its pouring).
  • Provide suggestions to make better use of items/ services already purchased / contracted (off the counter medication usage to prevent health problems under certain conditions, or geared to enhance comfort usage: bought a blanket? now is the time to show us how you are enjoy it with this chilled up weather).
  • Promote behavioral change in consumer behavior to make the most out of certain weather conditions (energy efficiency tips for high electricity consumption appliances when the days are longer or shorter during summer and winter correspondingly).
  • Prevent damage / hazard from lack or over use of products under certain climate conditions (sunblock!).

Marketing-wise, the logic behind this may not ring new. What is definitively new though is the ability to respond in real-time to the impredictable shifting conditions of weather to enhance the individual customers experience with your brand! By blending weather conditions data with additional demographic, behavioral and transactional data points made available through Twilio Segment, businesses are now able to build further TIMELINESS strength into their marketing strategy.

A. The DHT11 Temperature & Humidity Sensor:
Measures the Temperature and Humidity of the surrounding air. The DHT11 is a low-cost digital sensor that uses Digital Signal Acquisition to convert the temperature and humidity into a digital reading. The DHT11 has four pins, one of which is used for serial data communication. The DHT11 can measure:
  1. Temperature: 0°C to 50°C, with a maximum accuracy of ±2°C.
  2. Humidity: 20% to 90% relative humidity; which is the amount of water vapor in the air compared to the saturation point of water vapor in the air.

B. The Rain Sensor: AKA Raindrop Detector
Detects water that completes the circuits on its sensor boards' printed leads. The sensor board acts as a variable resistor that changes from 100k ohms when wet to 2M ohms when dry. The wetter the board, the more current that will be conducted. Considers a Potentiometer for sensitivity adjustment of the Analog Output (DO).

C. Light Sensor:
A Photoresistor light sensor in Arduino measures the amount of light in an environment. It's also known as a photocell or light dependent resistor. Photoresistors are analog sensors that change resistance based on the amount of light that hits them. When it's dark, the resistor has a high resistance of up to 10 megohms. When it's light, it has a few hundred ohms of resistance. In digital reads though, the measure has two values: 1 light, 0 dark, the set threshold in this case is 600 Ohms which is the point when sunset begins to happen based on initial analog measurements made.
I was aware of the loss of granular data from using the Analog pin for the light sensor, but provided we only have one single Analog pin on the NodeMCU, then i gave priority to the rain reading in that case. RAIN is a more unpredictable factor, rather than LIGHT which is a bit more predictable at least to be able to set the threshold. With the threshold defined, if it gets dark earlier or later in the day due to seasonal stationality then we don't loose much insightful data to act upon after all... it is all about when it gets darker and not about degrees of darkness (like in the case of rain where both: “When” and “How Much” do matter).

  • Baud(115,200)
  • WiFi 2.4Ghz

Made on