Git Product home page Git Product logo

aqqa's Introduction

Air Quality Knowledge Graph with CAMS Data

This project aims to create an Air Quality Knowledge Graph using data from the Copernicus Atmosphere Monitoring Service (CAMS) and to provide accessibility through natural language queries. At a high level, the project consists of three components working together to achieve this goal.

Components Overview

  1. aq_kg_creation: Data Acquisition and RDF Conversion

    • Objective: Convert CAMS Air Quality data into RDF format.
    • Description: This component handles the acquisition and conversion of CAMS data into RDF, making it suitable for integration into semantic web applications. It ensures the data is available for advanced querying and visualization.
  2. aq_kg_query: RDF Data Storage and Querying

    • Objective: Prepare the Strabon RDF store for data storage and querying.
    • Description: This component guides you through the setup of the Strabon RDF store, data storage, and querying. Strabon serves as the database for storing and retrieving RDF data efficiently.
  3. aq_kg_text_interface: Text-to-SPARQL with OPENAI API

    • Objective: Convert natural language text into SPARQL queries for data retrieval.
    • Description: This component provides the necessary code and files to leverage the OPENAI API for converting natural language text into SPARQL queries. It allows users to query the Air Quality Knowledge Graph using human-friendly language.

For detailed documentation on each component, refer to their respective folders.

Set-Up

  1. Clone repository
git clone https://github.com/terranea/AQQA.git
  1. We recommend creating a virtual environment before installing dependencies
conda create -n AQQA python=3.11
conda activate
  1. Install requirements
pip install -r requirements.txt
  1. Set STRABON_SPARQL_ENDPOINT variable in components/aq_kg_query/config.py. Point to your hosted Strabon endpoint.

  2. Adjust directories in components/aq_kg_text_interfact/config.py according to the explanations within components/aq_kg_text_interfact/README.md

  3. Enter working directory

cd AQQA

Web UI

To illustrate the process, you can utilize the Streamlit app. It facilitates the conversion of natural language into SPARQL queries for querying CAMS AQ data, sending the queries to the Strabon database, and presenting the results visually on a map or in tabular data format.

  1. To start the app run
cd components
streamlit run app.py

Then the streamlit app should be accessible on 127.0.0.1:8501

Web UI AQQA

Running AQQA with Docker

  1. Build the docker image from the Docker file
docker build -t aqqa_image .
  1. Run the docker container in interactive mode
docker run -it -p 8501:8501 aqqa_image /bin/bash
  1. Set STRABON_SPARQL_ENDPOINT variable in components/aq_kg_query/config.py. Point to your hosted Strabon endpoint.

  2. Adjust directories in components/aq_kg_text_interfact/config.py according to the explanations within components/aq_kg_text_interfact/README.md

  3. To start the app run

cd components
streamlit run app.py

aqqa's People

Contributors

davesamer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.