/kuwala

Kuwala is a tool for integrating third-party data into models and products

Primary LanguagePythonApache License 2.0Apache-2.0

Logo Banner

License Slack

The Vision of a Global Liquid Data Economy

With Kuwala, we want to enable the global liquid data economy. You probably also envision a future of smart cities, autonomously driving cars, and sustainable living. For all of that, we need to leverage the power of data. Unfortunately, many promising data projects fail, however. That's because too many resources are necessary for gathering and cleaning data. Kuwala supports you as a data engineer, data scientist, or business analyst to create a holistic view of your ecosystem by integrating third-party data seamlessly.

How Kuwala works

Kuwala explicitly focuses on integrating third-party data, so data that is not under your company's influence, e.g., weather or population information. To easily combine several domains, we further narrow it down to data with a geo-component which still includes many sources. For matching data on different aggregation levels, such as POIs to a moving thunderstorm, we leverage Uber's H3 spatial indexing.

H3 Overview

Pipelines wrap individual data sources. Within the pipeline, raw data is cleaned and preprocessed. Then, the preprocessed data is loaded into a graph to establish connections between the different data points. Based on the graph, Kuwala will create a data lake from which you can load the data to a data warehouse, for example. Alternatively, it will also be possible to query the graph through a GraphQL endpoint.


Quickstart with Docker

Prerequisites

Installed version of Docker and docker-compose (Go here for instructions)

Process data

  1. Change directory to kuwala
cd kuwala
  1. Build images
docker-compose build osm-poi population-density google-poi-api google-poi-pipeline neo4j neo4j-importer
  1. Start databases
chmod +x ./scripts/init.sh
./scripts/init.sh
  1. Run pipelines to download and process data (in a new terminal window)
# Process population data
docker-compose run  population-density
# Process OSM POI data
docker-compose run  --service-ports osm-poi start-processing:local
  1. Load data into the graph
# Load data into graph database
docker-compose run  --service-ports neo4j-importer

For a more detailed explanation follow the README under ./kuwala.

Query data

You can either query the graph database directly using Cypher, or you run individual REST APIs for the pipelines.

  1. Cypher to query Neo4j
  2. REST APIs on top of pipelines
    # Run REST-API to query OSM POI data
    docker-compose run  --service-ports osm-poi start-api:local

We are working on building out the core to load the combined data to a data lake directly and additionally have a single GraphQL endpoint.


How you can contribute

Be part of our community

The best first step to get involved is to join the Kuwala Community on Slack. There we discuss everything related to data integration and new pipelines. Every pipeline will be open-source. We entirely decide, based on you, our community, which sources to integrate. You can reach out to us on Slack or email to request a new pipeline or contribute yourself.

Contribute to the project

If you want to contribute yourself, you can use your choice's programming language and database technology. We have the only requirement that it is possible to run the pipeline locally and use Uber's H3 functionality to handle geographical transformations. We will then take the responsibility to maintain your pipeline.

Note: To submit a pull request, please fork the project and then submit a PR to the base repo.

Liberating the work with data

By working together as a community of data enthusiasts, we can create a network of seamlessly integratable pipelines. It is now causing headaches to integrate third-party data into applications. But together, we will make it straightforward to combine, merge and enrich data sources for powerful models.

What's coming next for the pipelines?

Based on the use-cases we have discussed in the community and potential users, we have identified a variety of data sources to connect with next:

Semi-structured data

Already structured data but not adapted to the Kuwala framework:

Unstructured data

Unstructured data becomes structured data:

  • Building Footprints from satellite images

Wishlist

Data we would like to integrate, but a scalable approach is still missing:

  • Small scale events (e.g., a festival, movie premiere, nightclub events)

Using existing pipelines

To use our published pipelines clone this repository and navigate to ./kuwala/pipelines. There is a separate README for each pipeline on how to get started with it.

We currently have the following pipelines published:

  • osm-poi: Global collection of point of interests (POIs)
  • population-density: Detailed population and demographic data
  • google-poi: Scraping API to retrieve POI information from Google (incl. popularity score)