Building analytics capability with open source

The Data Analytics Hub operated by Cape Town's municipal government demonstrates the potential of open source tools for strengthening public service delivery and accelerating technological change. Launched in its current form during 2025 after earlier work dating back to 2017, the hub functions as an internal analytics unit tasked with solving operational challenges across city services. According to Product Manager Dr Henri Knoesen, the original goal was to "build an in-house analytics capability that could apply data to the City's own operational and service delivery problems", with open source embedded in that vision from the start.

Principal Data Engineer Muhammed Ockards explains the strategic advantage: "adopting open-source tools and dashboards built on them removes dependency on proprietary software licenses, ensuring that critical dashboards and data remain accessible, shareable, and functional over the long term. Safeguarding institutional knowledge and public accountability even as vendors, contracts, or software versions change". The hub's entire technical infrastructure now runs on open source components, and Cape Town regularly releases its own software under open source licences via its GitHub repository.

How the hub operates

Positioned within the Policy and Strategy Department, the hub functions as a strategic decision-making resource rather than a back-office technology unit, according to Dr Knoesen. The organisation pursues four primary objectives:

  1. Develop and maintain the data pipelines that extract data out of the City's transactional systems to be used for analytics.
  2. Develop and execute data products including APIs, predictive and early warning models, and AI interfaces for the city administration.
  3. Provide analytical support for decision making across the city administration.
  4. Contribute to the publication of data through the Cape Town Open Data Portal.

Open source tools underpin each of these functions. Ockards describes the technical architecture: data pipelines use open source schedulers for orchestration, with information stored in open source object storage and queried through an open source engine. Visualisations emerge from an open source business intelligence platform, while everything runs containerised on Linux. A research data catalogue, also built on open source, enables controlled sharing with academic researchers.

When the hub releases software, it defaults to the MIT licence with rare exceptions. The Cape Town GitHub page shows only selected projects; most internal code remains on an internally hosted Git server.

Public-facing tools and outcomes

The Service Alerts API exemplifies the hub's output. Released under an MIT licence, this publicly available interface aggregates planned and unplanned service interruptions in machine-readable form. Information originates from technical operations centres managing essential services and flows to both internal customer relations teams and external applications that notify residents of disruptions. The API documentation states its purpose as "providing as much information as possible" to reduce outage impacts.

Ockards notes that the API draws from "the same pipeline that feeds a set of open source notification bots". The repository includes an OpenAPI specification, enabling developers to automatically generate client code in their preferred programming language.

Other published projects include a geospatial utility created jointly with the Western Cape Provincial Government and a tool bridging proprietary business intelligence platforms to open source engines. During the pandemic, the team constructed the city's Covid-19 dashboard, which Ockards says "stood up in a timeframe that would not have been possible through procurement".

Strategic alignment and future direction

Dr Knoesen observes that the hub's open source commitment has been "reinforced in practice and policy", developing organically within the team's culture. In 2024, Cape Town became the first African city to adopt a comprehensive data strategy. According to Dr Knoesen, the hub and its open source approach "sits comfortably alongside" this strategy, which emphasises "greater data openness".