DEV Community

Cover image for 🏖️ Smart city social content automation w/ custom AI reporter 📸
adriens
adriens

Posted on

🏖️ Smart city social content automation w/ custom AI reporter 📸

💭 Food for thought

As a water-sport (open water swimming, Windsurf, monofin, Stand Up Paddle, prone paddleboard,...) aficionado, my outdoors activities are strongly driven by various environmental KPIs like:

  • 🌬️ Wind (speed, direction)
  • 🛰️ Weather (temperature, sunny, rainy, cloud coverage,...)
  • 🌡️ Water temperature
  • 🌞 How clear is the sky
  • 🧫 Water Quality (safe for swim)
  • 🌇 Time for sunrise/sunset
  • ☀️ UV index
  • 🐠 Water Turbidity
  • 🌊 Tidal index

Then I started to dream about a brand new Smart Citizen Experience, and challenged my self with the following question :

"How could I put all these KPIs within a single highly interoperable yet shareable smart content ?"

💡 Find the right media

When looking around me and trying to find the easiest way to streamline information accross social networks, I finally came to the evidence that the right media was the image, and even better:

  • 🤗 Highly optimized image for social networks (for easy sharing)
  • 📊 Smart (ie. embed data)

🗣️ Elevator pitch

"I create an autonomous AI driven BOT that goes to the beach, get the water status, weather related KPIs and posts smart contextual photos on social medias so community can reuse them very easily."

🦜🔗 Disclaimer (about LLM, agents & more)

This creation will NOT (at least for now 😅) rely on:

🧬 The workflow

The highly flexible pipeline I imagined is as follows :

  1. 📥 Web scrap (no API available) water quality metrics (safe for swim or not)
  2. 🔮 Get contextual weather (aka. nowcast) data with API call to OpenWeather API
  3. 📜 Create a contextual PROMPT that describes the current status
  4. 🎨 Call OPENAI's beta Image generation API to create an image
  5. 📤 Upload image to imagekit.io (and add tags on it)
  6. 🗄️ Archive photos collection as an album
  7. 📢 Streamline optimized contents on social medias (for web performance and SEO) and rely on cdn

🍿 Demo

Let's jump'in the Notebook:

🧰 Stack

Below a little focus on the services & tools I used to create this Smart Citizen experience.

🛰️ OpenWeather ("Weather forecasts, nowcasts and history in a fast and elegant way")

Image description

📸 Imagekit.io ("Streamline how you work with images and videos" )

Image description

More about Imagekit.io experience and optimization:

Image description

🤖 Open AI (beta) Image generation API

Image description

📢 Ask ChatGPT to tease about my BOT

Teaser 1

Image description

🎉🤖✨ Et voilà ! Notre BOT est prêt à faire des vagues sur les réseaux sociaux ! 🌊📸💥 Prêt à partager les plus belles images de la plage, avec les infos météo en prime ! 🌞🏖️🌈 C'est parti pour un été inoubliable ! 🎉🙌😎 #PlageIntelligente #BOTBaignade #CélébrationEnImages

Teaser 2

Image description

"🌊🤖 Notre nouveau compagnon de plage est prêt à vous surprendre ! 🏖️📲 Découvrez bientôt notre BOT autonome qui vous donnera toutes les infos sur la qualité de l'eau, le temps et bien plus encore ! 🌞🌊 Restez connectés pour profiter de la plage en toute sécurité et partager ces moments mémorables avec vos amis ! 😎📸 #TechForGood #PlageIntelligente #StayTuned"

Tweet

Image description

"🏙️ Bienvenue dans la #SmartCity du futur! 🌟 Les 🌍 technologies modernes 💡 améliorent notre vie quotidienne! 📱💚 Des capteurs intelligents 🎯 optimisent les transports 🚗, économisent l'énergie ⚡️ et rendent la ville plus durable 🌿🏢. Une ville connectée pour un avenir meilleur! 🌐😃 #Technologie #QualitéDeVie"

Def. Smart City

Image description

Une smart city, ou ville intelligente, est une ville qui utilise les technologies de l'information et de la communication (TIC) pour améliorer la qualité de vie de ses habitants, optimiser ses opérations et gérer efficacement ses ressources. L'objectif d'une smart city est de créer un environnement urbain durable, résilient, inclusif et efficace grâce à l'utilisation de diverses solutions technologiques.

Top comments (3)

Collapse
 
adriens profile image
adriens
Collapse
 
adriens profile image
adriens
Collapse
 
adriens profile image
adriens