---
format:
    revealjs:
        theme: simple
        chalkboard: true
        auto-stretch: false
---

## Example

Keith VanderLinden<br>
Calvin University

::: {.notes}
- We start with an example, which we will revisit throughout the course.
:::

## The SLO System Dashboard

![<small>SLO snapshot for the Adani Group</small>](https://raw.githubusercontent.com/CalvinData/data562-slo/main/images/slo_prototype-adani.png)

::: {.notes}
- This is the dashboard for the [SLO system](https://github.com/CalvinData/data562-slo), developed at CSIRO.
    - SLO - Social License to Operate (SLO)
    - Here we see the SLO system dashboard for the Adani Group.
    - The system was designed to monitor social media to assess the public opinion for targeted organizations and/or topics. When spikes in public opinion were detected, the organization could use more traditional (and expensive) surveys to better understand the public's concerns.
    - It was deployed from 2016--2020 to monitor mining companies operating in Australia.
- Consider what it would take to drive the elements of this dashboard.
    - *Feed*: Relevant tweets (for/against/neutral) are collected in real-time.
    - *Overview*: Weekly stance is summarized using exponentially-weighted moving average (EWMA).
    - *Trend*: The EWMA for the target company is plotted over time with respect to the industry average.
- Note how the Adani Group (and Santos) didn't do as well as BHP, Rio Tinto, Woodside.
:::

## The SLO System Dashboard

![<small>SIRTA snapshot for Rio Tinto</small>](https://raw.githubusercontent.com/CalvinData/data562-slo/main/images/slo_prototype-riotinto.png)

::: {.notes}
- Here's a similar dashboard for Rio Tinto, which tends slightly better than average.
- The sampled (negative) tweets in mid-2019 match up with Rio Tinto's:
    - Low weekly overview value.
    - EWMA drop on the time-series plot.
:::

## The SLO System Architecture

![<small>Reference: <https://aclanthology.org/2020.coling-industry.14><br>Source: <https://github.com/CalvinData/data562-slo></small>](https://raw.githubusercontent.com/CalvinData/data562-slo/main/images/slo_architecture.png)

::: {.notes}
- There was a lot going on behind the scenes for this system.
    1. The data came from the (now defunct) Twitter feed.
    2. There was rather extensive preprocessing of the (dirty) tweet texts.
    3. There were three pipelined ML models.
    4. The time series data were stored and used to drive the dashboard.
- Implementation:
    - The wrangling was done in Python.
    - The models were built using Keras.
    - The pipeline was built using:
        - [Apache Kafka](https://en.wikipedia.org/wiki/Apache_Kafka) for real-time data streaming
        - ELK stack for Elastic search (search), Logstash (logging), and Kibana (visualization)
:::
