This is a learning and demo project. It was created for the joy of learning and experimenting with real-time data processing, emotion recognition, and dashboarding.
There is no claim to correctness or completeness, and no liability is accepted for any damage that may occur from using this code.
This project was born out of the motivation to present a live Power BI / Fabric dashboard filled with real-time data during the data:unplugged event.
🎥 You can watch the original presentation on YouTube: https://youtu.be/kKY_eJJMldo
As passionate fans of both Power BI / Microsoft Fabric and gaming, we initially considered capturing gameplay data via camera or HDMI capture and analyzing it using OCR – a kind of digital retrofit approach.
However, during a session at the TDWI Barcamp, someone pointed out:
“These values are already visible in-game – there's little added value.”
💡 This shifted our perspective: Instead of focusing on game data, why not analyze the players themselves?
Inspired by platforms like Twitch, where viewers enjoy watching others play – especially reacting emotionally – we had a new idea:
👉 Let’s analyze the facial emotions of the players in real time and integrate this into a live dashboard.
A large part of the inspiration and input for this idea came during discussions at the TDWI Barcamp with Dr. Kerem Ciftci.
We are very grateful for his valuable insights and suggestions!
🔗 Connect with Dr. Kerem Ciftci on LinkedIn
The following diagram summarizes the data flow from gameplay to dashboard visualization:
-
Configuration Externalization:
The Azure Event Hub connection string is now loaded from an externalconfig.jsonfile instead of being hardcoded. -
Timezone-Aware UTC Timestamps:
Event timestamps are now generated timezone-aware (datetime.now(timezone.utc).isoformat()), improving compatibility with real-time systems. -
Additional Player Data:
Besides detecting the dominant emotion, the system now also captures age and gender (with a confidence score) per player. -
Enhanced Visualization:
The live camera feed now displays the player's dominant emotion, age, and gender next to their face. -
Detailed Console Output:
Instead of a generic "JSON sent" message, the console now prints detailed player information. -
Stricter Face Detection:
Theenforce_detection=Truesetting ensures that only valid faces are analyzed. -
New Dashboard by Artur:
Thanks to Artur (LinkedIn Profile), the new StreamingOfFun.pbit dashboard template was added. It visualizes the player data captured in the Kusto table!
Thanks to powerful Python modules and a helpful push from ChatGPT, this idea quickly became a working prototype.
Python 3DeepFacefor facial emotion analysisOpenCVfor webcam inputAzure Event Hubto stream real-time dataPower BI / Microsoft Fabricfor dashboarding
⚠️ I’m not (yet) a Python expert – but here’s how I got it running:
You can install Python directly from the Microsoft Store.

I recommend using Visual Studio Code with the official Python extension.

Use separate environments for each Python project. The VS Code extension helps you create one easily:




Not all modules were installed from requirements.txt, so I activated the venv and manually installed the missing ones:
.venv\Scripts\activate
pip install deepface
pip install azure-eventhub
pip install tf-kerasTo stream the analyzed emotions into Microsoft Fabric, you need a connection string from an Azure Event Hub.
You can configure it as a custom endpoint in an eventstream.
➡️ Microsoft Learn: Add custom endpoint or app source to Eventstream
Thanks to Artur, a Power BI Template File (StreamingOfFun.pbit) is provided to visualize the player data from a Kusto table.
To configure the dashboard, you need to set the following parameters:
Kusto ClusterKusto DatabaseKusto TableTimezone(used to convert the UTC timestamp into your local time)
Example of the parameter settings:

This project was inspired by a mix of:
- A spontaneous idea at a community event
- The creative feedback from the TDWI Barcamp
- The valuable insights from Dr. Kerem Ciftci
- The amazing work done by the Python open-source community
- The fantastic dashboard contribution by Artur
- The magic of experimenting with new tech just for fun
This is just the beginning! You’re welcome to:
- Fork, modify, and extend this project
- Connect it with your own dashboards
- Combine it with game mechanics or streaming platforms
Have fun exploring and experimenting!
Feel free to reach out on LinkedIn or GitHub if you want to exchange ideas or contribute.
Happy learning! 🚀
