1. Learn
  2. /
  3. Courses
  4. /
  5. Building Dashboards with Dash and Plotly

Connected

Exercise

Analyzing top customer locations

Based on your good work with the e-commerce company, you have been asked to help them expand an existing report on their sales by country.

The sales manager is interested in understanding where their top customers are located. They don't currently have a clear idea of what 'top' means. Ideally, they can easily try various cut-off values to consider someone a top customer and see how the graph changes with different cut-off values.

Your task is to help the sales manager by using a range input to facilitate a live-update app that filters sales by a minimum OrderValue amount.

Instructions

100 XP
  • Add a range input component called dcc.Input with identifier min_order_val below line 34 that lets users select a value from 50 to 550.
  • In the callback below line 53, check for input_val and filter the sales DataFrame with OrderValue greater than the selected value.