introduce

What is Superset?

Apache Superset is an open source, modern, enterprise-level business intelligence Web application. Is a data visualization and data exploration platform.

Apache Superset is designed as a standard cloud-native application that works well with Kubernetes. (The next Superset article in this series will discuss this in less detail.)

Superset offer:

  • An intuitive interface to explore and visualize data sets and create interactive dashboards.
  • Lots of beautiful visual components to present your data. (Actually not so pretty 😂)
  • Simple, no-code user process to subdivide and slice the data that is exposed under the dashboard. Dashboards and charts are starting points for in-depth analysis.
  • The state-of-the-art SQL editor /IDE provides a rich metadata browser and a simple workflow for creating visualizations from any result set.
  • An extensible, high-grained security model that allows for complex rules about who has access to which product capabilities and data sets. Can be integrated with mainstream authentication backends (database, OpenID, LDAP, OAuth, REMOTE_USER, etc.).
  • A lightweight semantic layer that allows you to define dimensions and metrics to control how data sources are exposed to users.
  • Support out of the box for most SQL language databases
  • Deep integration with Druid allows Superset to maintain extremely fast speeds when cutting large real-time datasets
  • With a configurable cache, the dashboard can be loaded quickly

Projects and Documents

  • The official making
  • The official documentation
  • Author after Fork project

Pull a new branch from the latest release

Pull a new branch 0.37.0-echarts based on tag 0.37.0

Git branch 0.37.0-echarts 0.37.0 git checkout 0.37.0-echartsCopy the code

Modify Dockerfile

Because it is inside the city, the relevant PIP mirror source needs to be modified. Speed up the Image build.

The specific modifications are as follows:

FROM preset/superset:dev

COPY ./requirements* ./docker/requirements* /app/

USER root
RUN cd /app \
    && pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple \
    && pip install -e . \
    && pip install --no-cache -r requirements.txt -r requirements-dev.txt \
    && pip install --no-cache -r requirements-extra.txt \
    && pip install --no-cache -r requirements-local.txt || true
USER superset
Copy the code

Initialize the data with docker-compose

Mind you, there’s a hole here, at least in the city that needs to be filled.

Download sample data

Download from Github: examples-data

Start a static server

Because fewer computers are Macs. It comes with Python 2, so I can just:

cd examples-data
python -m SimpleHTTPServer
# Serving HTTP on 0.0.0.0 port 8000...
Copy the code

Static servers, you can use whatever you want locally.

Change the BASE_URL in examples

Take a look at the local IP:

ifconfig
Copy the code

Find the relevant code and change it.

The initialization command is executed

docker-compose up superset-init
Copy the code

OK, perfect for the sample data.

Developed locally using Docker-Compose

Start the Superset front-end development server

docker-compose up superset-node
Copy the code

Start the Superset Flask server

docker-compose up superset
Copy the code

Start the Superset Celery Worker server

docker-compose up superset-worker
Copy the code

After success, we went to http://localhost:8088/.

The user name and password are both admin.

After a successful login, we see a list of visual panels.

See, our current version is 0.37.0.

Let’s go to the World Bank’s Data panel.

Let’s explore the Growth Rate.

Reference & Thanks

  • The official documentation

To be continued…

🏆 technology project phase iii | data visualization of those things…