Skip to content

Latest commit

 

History

History
127 lines (105 loc) · 4.5 KB

wiki.md

File metadata and controls

127 lines (105 loc) · 4.5 KB

🎊 Welcome to the Dashmap wiki!

Overview

What is Dashmap?

DashMap is an open source web platform that gathers, analyses and visualises urban data.

What is Dashmap made of?

DashMap is an isolated Plot.ly.Dash app wrapped in a parent Flask app. This allows utilizing the highly customizable Flask app to serve the Plotly dashboards without paying a hefty fee for Dash Enterprise license. You get the best of both worlds. The ease of creating dashboards with Plotly and the rich features of Flask. Of course, there are tradeoffs but for the current scale of the application, these are insignificant.

Pros:
  • Flask and Dash apps can be modified, styled and developd separately!
  • Quick dashboards with Plotly/dash
  • All Flask features (Flask-Login, Flask-Admin, Flask-Assets).
Cons:
  • Performance
  • Python infused front end is not ideal.

Installation

With Docker Compose

Navigate to projects root directory and run:

docker-compose up

You're all set 🚀


If you like making things more difficult be my guest and go ahead with these methods:

With Docker

Navigate to projects parent directory and run:

docker build --no-cache dashmap.io -t dashmap
docker run -p  80:80  dashmap

Done!

And if you just want to have more commands to blaze away in the terminal, then I have this for you:

Old School Way

Set up a virtual environment:

python3 -m venv venv

Activate the virtual environment:

source venv/bin/activate

Install requirements.txt

pip install -r requirements.txt

Done!


File structure

dashmap.io
│   README.md
│   app.py                       # Main app
│   requirements.txt
│   LICENSE
└───tests                         # Unittests
│   │   test_basics.txt           # Basic response checks
└───website                       # Main website  folder
│   │   __init__.py               # Initialises all apps and configurations 
│   │   views.py                  # Flask app views
│   └───dashmap                   # Dash app folder (see below)
│   └───data                      #  Datasets 
│   └───static                    #  Static assets for the Flask app
│   └───templates                 #  html templates utilised by Flask 
│       │   base.html             #  base templates for all pages
│       │   home.html             #  Home page 
│       │   support.html          #  Support page

# Dash app
└───dashmap                       # Dash app folder
│    └───assets                   # Static assets for The Dash app
│    └───layouts                  # Defines the basic app layout
│    └───callbacks                # Defines the basic app callbacks
│   map.py                        # Initialises the Dash app inside flask
│   map_callbacks.py              # Initialises the callbacks for Dash app 
│   map_graphs.py                 # Initialises non-callback generated graphs for dash app
│   map_layout.pyy                # Initialises the basic app layout

Contributing to Dashmap

We would love to see your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

All Code Changes Happen Through Pull Requests

Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:

  1. Fork the repo and create your branch from main.
  2. If you've added code that should be tested, add tests.
  3. Ensure the test suite passes.
  4. Make sure your code lints.
  5. Issue that pull request!

Report bugs using Github's issues

We use GitHub issues to track public bugs. Report a bug by opening a new issue. Write bug reports with detail, background, and sample code

Great Bug Reports tend to have:

  • A quick summary and/or background
  • Steps to reproduce
    • Be specific!
    • Give a sample code if you can.
  • What you expected would happen
  • What actually happens

We love thorough bug reports.

License

By contributing, you agree that your contributions will be licensed under its MIT License. In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.