0% found this document useful (0 votes)
9 views

5.2 Data Visualization II

Uploaded by

lo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

5.2 Data Visualization II

Uploaded by

lo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Data Visualization II

MSBA7001 Business Intelligence and Analytics


HKU Business School
The University of Hong Kong

Instructor: Dr. DING Chao


Agenda
• Treemap
• Maps
• Dashboard & Story
• Flow Maps
• Spider Maps
• Customized Maps
Treemaps
Source: https://finviz.com/map.ashx
Treemaps
• A tree map is a visualization that nests rectangles in
hierarchies so you can compare different dimension
combinations across one or two measures (one for size; one
for color) and quickly interpret their respective
contributions to the whole.
Demo II
Show sales by category and sub-category in a treemap.
Maps
Working with Maps
• Maps are one of the most effective chart types in Tableau
and are also among the easiest chart types to create.
• They are effective because they help us decode latitude and
longitude combinations almost instantly, allowing us to see
patterns between geographic locations that may otherwise
be challenging to discover.
• Tableau comes prepackaged with thousands of geographic
coordinates all over the world.
Demo II
Show sales by country on a map. Filter by country/region
Map Options
• When working with maps, there are map-specific formatting
options available.
• Map drop-down, then select Map Layers.
• This pane opens over the data pane just like the formatting
pane.
• Here, we can change our map style – Dark, Light, or Normal
• Control the washout
• And control map layers, such as borders and names.
• Some options, such as streets and highways, can be turned
on only when the map is sufficiently zoomed in
Dual Axis Maps
• Dual axis maps allow you to overlay one map on top of
another.
• So you can view two dimensions on the same map.
Demo II
Show total sales and sales by segment by country on a map. Filter
by country/region
Dashboard & Story
Dashboard
• A dashboard is a collection of several views, letting you
compare a variety of data simultaneously.
• For example, if you have a set of views that you review
every day, you can create a dashboard that displays all the
views at once, rather than navigate to separate worksheets.
• A well-designed dashboard can align your organization's
efforts, help uncover key insights, and speed up decision-
making.
• Think dashboard as a combination of multiple related
visualizations. It shows some insights.
Story
• A story is a sequence of visualizations that work together to
convey information. You can create stories to tell a data
narrative, provide context, demonstrate how decisions
relate to outcomes, or to simply make a compelling case.
• A story is a sheet, so the methods you use to create, name,
and manage worksheets and dashboards also apply to
stories.
• At the same time, a story is also a collection of sheets,
arranged in a sequence. Each individual sheet in a story is
called a story point.
• Think of it as presentation slides.
Demo - Earthquake
Flow Maps & Spider Maps
Flow Maps
• We can create maps that show a path over time
• These types of maps are called flow maps, or path maps
• Flow maps are great for when you want to show where
something went over time
• For example
Path of a storm
Flow of traffic
Migration of people
Demo - Storm Path
Spider Maps
• We can create maps that show paths between origins and
destinations
• These types of maps are called spider maps, or origin-
destination maps.
• Spider maps are great for when you’re working with hubs
that connect to many surrounding points.
• For example:
Flight route
Travel route
Jogging path
Shipment path
Demo - Paris Metro
Customized Maps
Customized Maps
• When objects move on a small scale territory, such as
playground, shopping malls, parks, we need to customize
the coordinates of the territorial “map” and mark the
movements on the map.
• First, import the territorial map as background.
• Then, set origins on the background.
• Lastly, match the movements of objects.
Demo – Shooting efficiency of NBA players
Exercise
• Connect to fitness.csv. Create a Dashboard to show the
following:
a. A map of all 34 walking tracks
b. A color legend for track length
c. A region filter without option “all”
d. Text showing the number of tracks in the selected
region
e. Text showing the minimum and maximum calories
consumption in the selected region
d. Text showing the number of
tracks in the selected region

c. A region filter e. Text showing the minimum and


without option “all” maximum calories consumption
in the selected region

a. A map of all 34
walking tracks

b. A color legend
for track length
Summary
• How to make a treemap
• How to create a map in Tableau
• How to make dashboard and story
• Flow maps & spider maps
• Customized maps
Summary
Text, CSV, JSON

Regular Expression
Managing NumPy
Data
Pandas

StatsModels

Web Beautiful Soup


Scraping

Tableau
Data
Visualization Matplotlib
More Powerful Libraries
• SciKit-Learn: a Python library for machine learning based on
NumPy, SciPy, and matplotlib.
http://scikit-learn.org
• Seaborn: a Python library for making statistical graphics, it is
based on matplotlib, works great with pandas’ data
structures.
https://seaborn.pydata.org/
• Natural Language Toolkit (NLTK): a Python library to process
natural language. Good for sentiment analysis.
https://www.nltk.org/
Field of application Library Name (ranked by Github) Type
Mathematics & Engineering 1. NumPy Data wrangling
Mathematics & Engineering 2. SciPy Data wrangling
Data Manipulation & Analysis 3. pandas Data wrangling
Mathematics & Engineering 4. StatsModels Statistics
Visualization 5. matplotlib Visualization
Visualization 6. seaborn Visualization
Visualization 7. plotly Visualization
Visualization 8. bokeh Visualization
Visualization 9. pydot Visualization
Machine Learning 10. scikit-learn Machine learning
Machine Learning 11. XGBoost / LightGBM / CatBoost Machine learning
Machine Learning 12. eli5 Machine learning
Machine Learning 13. TensorFlow Deep learning
Machine Learning 14. PyTorch Deep learning
Machine Learning 15. Keras Deep learning
Machine Learning 16. dist-keras / elephas / spark-deep-learning Distributed deep learning
Mathematics & Engineering 17. NLTK NLP
Mathematics & Engineering 18. gensim NLP
Mathematics & Engineering 19. spaCy NLP
Data Manipulation & Analysis 20. scrapy Data scraping
The end.

You might also like