Skip to content

Curio: A Dataflow-Based Framework for Collaborative Urban Visual Analytics

License

Notifications You must be signed in to change notification settings

urban-toolkit/curio

Repository files navigation

Curio

Curio Logo

Curio is a framework for collaborative urban visual analytics that uses a dataflow model with multiple abstraction levels (code, grammar, GUI elements) to facilitate collaboration across the design and implementation of visual analytics components. The framework allows experts to intertwine preprocessing, managing, and visualization stages while tracking provenance of code and visualizations.

Curio: A Dataflow-Based Framework for Collaborative Urban Visual Analytics
Gustavo Moreira, Maryam Hosseini, Carolina Veiga, Lucas Alexandre, Nico Colaninno, Daniel de Oliveira, Nivan Ferreira, Marcos Lage, Fabio Miranda

Video:

curio_compressed_720.mp4

Curio Use Cases

Table of contents

  1. Features
  2. Installation and quick start
    1. Curio Backend
    2. Python sandbox
    3. UTK workflow
    4. Curio frontend
    5. Ray tracing
  3. First dataflow
  4. Team

Features

  • Provenance-aware dataflow
  • Modularized and collaborative visual analytics
  • Support for 2D and 3D maps
  • Linked data-driven interactions
  • Integration with UTK and Vega-Lite

Installation and quick start

Because Curio is integrated with UTK it is necessary to add it as a submodule.

git clone git@github.com:urban-toolkit/curio.git  
git submodule init
git submodule update --remote --merge

Curio is divided into three components: backend (provenance and database management), python sandbox (to run python code), and the front-end. All component need to be running.

Curio was tested on Windows 11 and MacOS Sonoma 14.5.

Python >= 3.9 & < 3.12 is needed.

Curio Backend

The backend source code is available on the backend folder. It is recommended to install its requirements on a virtual environment such as Anaconda. Inside the backend folder:

pip install -r requirements.txt

Once requirements are installed we have to create a SQLite database for provenance.

python create_provenance_db.py

Now the backend server can be started.

python server.py

The backend is also responsible for user authentication. In order to use Curio's functionalities, you will need authentication. To do so, upgrade the database:

Apply migrations

You need to run this command before start using Curio:

# run this to apply any migration that hasn't run yet
FLASK_APP=server.py flask db upgrade

If the environment variable FLASK_APP does not work on the command above, set the environnment variable in your terminal.

Create migration

# after updating any model, run this to generate a new migration
FLASK_APP=server.py flask db migrate -m "Migration Name"

Python sandbox

Since modules on Curio can run Python code. It is necessary to run a Python sandbox. On sandbox folder.

To run without Docker (Anaconda environment recommended):

pip install -r requirements.txt

Installing UTK's backend module to have access inside the sandbox:

pip install utk-0.8.9.tar.gz

Run the server:

python server.py

If you prefer to use Docker (can't use GPU for Ray Tracing):

docker-compose up

UTK workflow

Because Curio also uses UTK's frontend it is necessary to compile the UTK submodule. On utk-workflow folder:

cd src/utk-ts

NodeJS is needed to build the frontend. Anaconda is recommended:

npm install
npm run build 

Curio frontend

To start Curio's frontend. Simply go urban-workflows and run:

npm install
npm run build
npm run start

Ray tracing

To use Ray Tracing from UTK's python module please consult UTK's requirements.

First dataflow

For a simple introductory example check this tutorial.

Tutorial

Team

Gustavo Moreira (UIC)
Maryam Hosseini (MIT)
Carolina Veiga (UIUC)
Lucas Alexandre (UFF)
Nico Colaninno (Polimi)
Daniel de Oliveira (UFF)
Nivan Ferreira (UFPE)
Marcos Lage (UFF)
Fabio Miranda (UIC)