Giter VIP home page Giter VIP logo

awesome-analytics-apps's Introduction

Awesome Analytics Apps

A repository for sharing knowledge and resources on awesome analytics apps in Python.

I've started this project because there are a lot of emerging frameworks for creating awesome analytics apps in Python. These are

And I wan't to share knowledge and the why, what, when and how of each because they are so awesome but different.

Getting Started with this Repository

Prerequisites

  • An Operating System like Windows, OsX or Linux
  • A working Python installation.
    • We recommend using 64bit Python 3.7.4.
  • a Shell
    • We recommend Git Bash for Windows 8.1
    • We recommend wsl for For Windows 10
  • an Editor
  • The Git cli

Installation

Clone the repo

git clone https://github.com/MarcSkovMadsen/awesome-analytics-apps.git

cd into the project root folder

cd awesome-analytics-apps

Then you should create a virtual environment named .venv

python -m venv .venv

and activate the environment.

On Linux, OsX or in a Windows Git Bash terminal it's

source .venv/Scripts/activate

or alternatively

source .venv/bin/activate

In a Windows terminal it's

.venv/Scripts/activate.bat

Then you should install the local requirements

pip install -r requirements_local.txt

and enable the qgrid extension for Jupyter Notebooks

jupyter nbextension enable --py --sys-prefix qgrid

Build and run the Applications Locally

Streamlit

streamlit run apps/streamlit_apps/app.py

Streamlit App

Voila

voila apps/voila_apps/app.py

Voila App

and the associated Jupyter Notebook

jupyter notebook apps/voila_apps/app.py

Jupyter Notebook

Run all tests

invoke test.all

If all tests pass successfully you will see

All Tests Passed Successfully
=============================

Command Line Interface

We use Invoke to build our command line interface. You can see the list of available commands using

$ invoke --list
Available tasks:

  docker.build                            Build Docker image
  docker.push                             Push the Docker container
  docker.remove-unused                    Removes all unused containers to free up space
  docker.run                              Run the Docker container bash terminal interactively.
  docker.run-server                       Run the Docker image with the Streamlit server.
  docker.run-server-with-ping             Run the docker image with Streamlit server and
  docker.system-prune                     The docker system prune command will free up space
  sphinx.build                            Build local version of site and open in a browser
  sphinx.copy-from-project-root           We need to copy files like README.md into docs/_copy_of_project_root
  sphinx.livereload                       Start autobild documentation server and open in browser.
  sphinx.test                             Checks for broken internal and external links and
  package.build                           Builds the awesome-streamlit package)
  test.all (test.pre-commit, test.test)   Runs isort, autoflake, black, pylint, mypy and pytest
  test.autoflake                          Runs autoflake to remove unused imports on all .py files recursively
  test.bandit                             Runs Bandit the security linter from PyCQA.
  test.black                              Runs black (autoformatter) on all .py files recursively
  test.isort                              Runs isort (import sorter) on all .py files recursively
  test.mypy                               Runs mypy (static type checker) on all .py files recursively
  test.pylint                             Runs pylint (linter) on all .py files recursively to identify coding errors
  test.pytest                             Runs pytest to identify failing tests

and help on a specific command using

$ invoke test.pytest --help
Usage: inv[oke] [--core-opts] test.pytest [--options] [other tasks here ...]

Docstring:
  Runs pytest to identify failing tests

  Arguments:
      command {[type]} -- Invoke command object

  Keyword Arguments:
      root_dir {str} -- The directory from which to run the tests
      test_files {str} -- A space separated list of folders and files to test. (default: {'tests})
      integrationtest {bool} -- If True tests marked integrationtest or
          functionaltest will be run. Otherwise not. (default: {False})
          These tests requires the test backend server running.
      test_results {string} -- If not None test reports will be generated in the
          test_results folder

  # Print running pytest

Options:
  -e STRING, --test-results=STRING
  -t STRING, --test-files=STRING

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.