
[Apache Superset](https://superset.apache.org/) is an open-source data exploration and visualization tool that helps you query data stored in YugabyteDB and visualize it using basic line charts to highly detailed geospatial charts.

You can use Superset to quickly explore and visualize data stored in databases and data warehouses. You can explore data without writing complex SQL queries, create rich reports and custom dashboards to visualize this data, and get insights quickly.

![Superset Dashboard](/images/develop/tools/superset/dashboard.png)

## Before you begin

Your YugabyteDB cluster should be up and running. Refer to [YugabyteDB prerequisites](../#yugabytedb-prerequisites).

Load some data to explore and visualize. For a local installation, you can load the Northwind sample database using the `./bin/yugabyted demo connect` command from your shell, or follow the [instructions](../../../sample-data/northwind/).

### Install Superset

You can install Superset from scratch using [PyPI](https://superset.apache.org/docs/installation/pypi) (recommended) or [Docker Compose](https://superset.apache.org/docs/installation/docker-compose).

### Install the driver

After installing Superset, install the YugabyteDB psycopg2 smart driver. If the PostgreSQL psycopg2 driver is installed, you must remove it first.

To check if the PostgreSQL psycopg2 driver is installed, enter the following command:

```sh
pip show psycopg2
```

If present, uninstall the driver as follows:

```sh
pip uninstall psycopg2
```

To install the YugabyteDB psycopg2 smart driver, enter the following:

```sh
pip install psycopg2-yugabytedb
```

## Connect Superset to YugabyteDB

[Launch Superset](https://superset.apache.org/docs/installation/pypi/#installing-and-initializing-superset) in your browser at `http://<hostname-or-IP-address>:8088`. If you've installed on your local computer, navigate to `localhost:8088` or `127.0.0.1:8088`. YugabyteDB v2.19 and later can also be used as a [Superset metastore](https://superset.apache.org/docs/installation/configuring-superset#using-a-production-metastore).

To connect Apache Superset to YugabyteDB:

1. Navigate to Data > Databases > + Databases, and choose **PostgreSQL** from the **Connect a database** menu.

    ![Connect Database](/images/develop/tools/superset/connect-database.png)

1. Enter your YugabyteDB tablet server's hostname or IP address with standard credentials and click **Finish**.

    ![Database Connection Credentials](/images/develop/tools/superset/connect-ybdb.png)

    {{< note title="Note" >}}
As of Docker version 18.03, the `host.docker.internal` hostname connects to your Docker host from inside a Docker container.
    {{< /note >}}

1. Verify that you can access the available databases and schemas under "Data". Navigate to Data > Datasets, and click "+Datasets".

    The dropdown list should show the databases and schemas available to explore and visualize.

    ![Loading Datasets](/images/develop/tools/superset/load-dataset.png)

You've successfully created a connection to your YugabyteDB database, and you can now start exploring and visualizing your databases using Apache Superset.

## What's next

Refer to the Apache [Superset documentation](https://superset.apache.org/docs/creating-charts-dashboards/exploring-data#exploring-data-in-superset) to learn more about Superset's data exploration capabilities. If you're creating your first dashboard using Superset, check out the [data analysis and exploration workflow](https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard/).
