Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Instagram Youtube

Github Stackoverflow Pinterest

Create data visualizations declaratively for ML and Data Science on a Mac, powered by Python

Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Cyrillic Russian   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

Streamlit (open sourced at https://github.com/streamlit/streamlit) is by Dominik Moritz, who is a visualization god (UW PhD, CMU) at Apple, Microsoft, etc. and developed a grammar of visualizations (Draco).

Streamlit’s marketing page at streamlit.io describes itself as “the first app framework specifically for Machine Learning and Data Science teams.”

Streamlit’s documentation is at https://streamlit.io/docs/

Install locally

In a Terminal:

  1. Run Streamlit visualizations of your own within Docker locally. Start with a “hello world” by running my streamlit-docker.sh Shell file at this repo:

    https://github.com/wilsonmar/DevSecOps/tree/master/Streamlit1

    The script builds and runs the Dockerfile to display “hello-world” as described in this blog and its repo. It stops the container if it’s already running.

    The script installs what it needs (Streamlit, Docker, etc.).

    The use of Docker isolates dependencies, just as virtualenv does.

    Alternately, install Streamlit globally (at the risk of conflicts with dependencies shared by other apps):

    pip install --upgrade streamlit
    streamlit version</pip>
    
    The output should end with something like this:
    
    
    Streamlit, version 0.52.2
    ### Run it live
  2. Use your Mac’s Folder app or Terminal commands to create a containing folder and cd to it.

  3. In Termianl, see a visualization of Uber driver pickup points at each hour of the day pop-up on your default browser with one command:

    streamlit run https://raw.githubusercontent.com/streamlit/demo-uber-nyc-pickups/master/app.py

    Drag your mouse to pan across. Notice the viz at 7am shows red spikes at airports and Upper West Side.

    See https://github.com/streamlit/demo-uber-nyc-pickups

  4. Add the OpenCV image recognition library:

    pip install --upgrade opencv-python</pip>
    
    
    
  5. See how self-driving cars recognize street signs and other objects (after several minutes loading):

    streamlit run https://raw.githubusercontent.com/streamlit/demo-self-driving/master/app.py

    streamlit-uber

    The app uses YOLO (You Only Look Once) real-time object detection which recognizes dozens of objects at a time in videos. The app downloads files yolov3.cfg and yolov3.weights.

    Build your own app

  6. VIDEO: Specifications in Streamlit’s declarative language Oct 19, 2019

  7. View YouTube tutorials by Adrien Treuille, CEO of Streamlit and Jesse E.Agbe at JCharisTech & J-Secur1ty (GitHub)

  8. Join the discussion community at

    https://discuss.streamlit.io

## More about Streamlit

*http://awesome-streamlit.org

  • https://towardsdatascience.com/streamlit-101-an-in-depth-introduction-fc8aad9492f2

  • https://medium.com/@ansjin/how-to-create-and-deploy-data-exploration-web-app-easily-using-python-a03c4b8a1f3e

  • View JMeter results, by NaveenKumar Namachivayam: https://qainsights.com/apache-jmeter-with-streamlit-for-machine-learning/

Press mentions

More about Python

This is one of a series about Python:

  1. Python install on MacOS
  2. Python install on Raspberry Pi for IoT

  3. Python certifications
  4. Python tutorials
  5. Python coding notes
  6. Jupyter Notebooks provide commentary to Python

  7. Test Python using Robot testing framework

  8. Pulumi controls cloud using Python, etc.
  9. Microsoft Azure Machine Learning makes use of Python
  10. Testing AI uses Python code

  11. Python REST API programming using the Flask library
  12. Python coding for AWS Lambda Serverless programming
  13. Streamlit visualization framework powered by Python
  14. Web scraping using Scrapy, powered by Python
  15. Neo4j graph databases accessed from Python