Code Challenge 28 - Integrate a Bokeh Chart Into Flask

Posted by Michael on Tue 18 July 2017 in Challenges • 2 min read

A smooth sea never made a skilled sailor. - Franklin D. Roosevelt

Hi Pythonistas, a new week, a new 'bite' of Python coding! We are delighted to have Michael Herman (Real Python) deliver this week's challenge. Prepare to learn some useful new skills and above all have fun!

Enter Michael.

The challenge

Create a Flask app that displays a basic data visualization with Bokeh.

If you're feeling up to it, deploy the app to Heroku as well.

Need some data to work with?

But you can use any data set. The goal is to use Bokeh inside Flask.

Suggested workflow

This challenge includes a number of moving pieces, so make sure to break it down into smaller steps.

For example:

  1. Create a basic Flask app
  2. Manually test the app locally
  3. Create a data visualization with Bokeh
  4. Integrate the Bokeh chart with the Flask app
  5. Manually test the app again locally

If you want more practice, burn it all down and start over again. Continue doing this until you feel comfortable with the workflow.

Bonus

Share your awesome visualization with the world:

  1. Set up Heroku and deploy
  2. Manually test the app on Heroku

Resources

Getting ready

See this INSTALL doc how to fork PyBites' challenges repo to get cracking.

This doc also provides you with instructions how you can submit your code to PyBites' community branch via Pull Request. PR submissions will be featured in next week's challenge review (previous editions).


Keep Calm and Code in Python!

-- Michael

>>> next(PyBites)

Get our 'Become a Better Python Developer' cheat sheet sent straight to your inbox by signing up for our Newsletter: