SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Data Vis for Data Science
Usage of Python Visualisation Libraries
Amit Kapoor
@amitkaps
Data Science Pipeline
— Frame: Problem definition
— Acquire: Data ingestion
— Refine: Data wrangling
— Transform: Feature creation
— Explore: Feature selection
— Model: Model creation & assessment
— Insight: Solution communication
Role of Visualisation
— Frame: Structuring (issue tree, hypotheses)
— Acquire: Loading (progress, errors)
— Refine: Profiling (missing values, outliers)
— Transform: Univariate & Bivariate Vis (1D, 2D)
— Explore: Multi Dimensional Vis (3D ... ND)
— Model: Model Vis (predictions, errors, models)
— Insight: Vis Comm (chart, narrative, dashboard)
Understanding Visualisation
— Domain & Task Layer e.g. Tabular Data for EDA
— Data Layer e.g. Data Types, Transformation
— Visual Layer e.g. Encoding, Marks, Coordinate
— Annotation Layer e.g. Labels, Ticks, Titles
— Interaction Layer e.g. Filtering, Highlighting,
Selection
Python Visualisation Libraries
— Matplotlib
— Pandas built-in plotting
— ggpy
— Altair
— Seaborn
— Plotly
— Bokeh
— HoloViews
— VisPy
— Lightning
— pygg
Choosing a Visualisation Library
— Ease of Learning: How hard is the API?
— Coverage: How many graphic types can it cover?
— Approach: Is it Charting or Grammar based?
— Documentation: How easy is it to make basics
graphs?
— Community Support: How hard is it to make complex
graphs?
Notes in Circulation
year | type | denom | value | money | number |
------- | -------| ------ | ------ | ------- | ------ |
1977 | Notes | 0001 | 1 | 2.72 | 2.720 |
1977 | Notes | 1000 | 1000 | 0.55 | 0.001 |
1977 | Notes | 0002 | 2 | 1.48 | 0.740 |
1977 | Notes | 0050 | 50 | 9.95 | 0.199 |
... | ... | ... | ... | ... | ... |
2015 | Notes | 0500 | 500 | 7853.75 | 15.708 |
2015 | Notes | 0001 | 1 | 3.09 | 3.090 |
2015 | Notes | 0010 | 10 | 320.15 | 32.015 |
2015 | Notes | 1000 | 1000 | 6325.68 | 6.326 |
Use Pandas for Base Plotting
# Loading Data
import pandas as pd
notes = pd.read_csv('notes.csv')
# Data Transformation
notes_wide = pd.pivot_table(data = notes, index="year",
columns="denom", values="money")
# Plotting
notes_wide.plot(kind="line")
Use Matplotlib for Annotation
# Basic Styling
import matplotlib.pyplot as pet
plt.rcParams['figure.figsize'] = (9,6)
plt.style.use('ggplot')
# Plotting
notes_wide.plot(kind="line")
# Adding Annotation
plt.ylabel('Value INR Bns')
plt.title('Notes in Circulation')
Ideally use ggplot like R
from plot import *
ggplot(notes, aes(x='year',
y='money',
color='denom')) + /
geom_line()
Use Altair for Grammar Visualisation
from altair import Chart
Chart(notes).mark_line().encode(
x='year:N',
y='money',
color='denom'
)
Personal Usage
— Use Pandas for base plotting and time series
— Use Matplotlib for matrices and customisation
— Use Seaborn for 1D & 2D statistical graphs,
especially categorical variable
— Use IPython Widgets for model interaction
— Use Datashader for Big Data Visualisation
— Experimenting with Altair
What about interactivity?
— Watch out for Altair - Interaction will be build
in soon
— Use Bokeh for web-based interactive dashboard,
but require learning a different API
— Use Plotly for creating full interactive charts.
Integration with Matplotlib available.
Get in touch with me
Amit Kapoor
@amitkaps
amitkaps.com

Mais conteúdo relacionado

Semelhante a Python Visualisation for Data Science

MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra QUONTRASOLUTIONS
 
IaaS, PaaS, and DevOps for Data Scientist
IaaS, PaaS, and DevOps for Data ScientistIaaS, PaaS, and DevOps for Data Scientist
IaaS, PaaS, and DevOps for Data ScientistDmitry Petukhov
 
Machine Learning with Python
Machine Learning with PythonMachine Learning with Python
Machine Learning with PythonAnkit Rathi
 
Data Observability Best Pracices
Data Observability Best PracicesData Observability Best Pracices
Data Observability Best PracicesAndy Petrella
 
Introduction to Data Analtics with Pandas [PyCon Cz]
Introduction to Data Analtics with Pandas [PyCon Cz]Introduction to Data Analtics with Pandas [PyCon Cz]
Introduction to Data Analtics with Pandas [PyCon Cz]Alexander Hendorf
 
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYAPYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYAMaulik Borsaniya
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixDatabricks
 
Machine Learning with Azure
Machine Learning with AzureMachine Learning with Azure
Machine Learning with AzureBarbara Fusinska
 
Cssu dw dm
Cssu dw dmCssu dw dm
Cssu dw dmsumit621
 
Machine learning 101
Machine learning 101Machine learning 101
Machine learning 101AmmarChalifah
 
Scala meetup Kyiv slides 20171215
Scala meetup Kyiv slides 20171215Scala meetup Kyiv slides 20171215
Scala meetup Kyiv slides 20171215Evaldas Miliauskas
 
How to Ensure your Microsoft BI Project is a Success!
How to Ensure your Microsoft BI Project is a Success! How to Ensure your Microsoft BI Project is a Success!
How to Ensure your Microsoft BI Project is a Success! Ed Senez
 
QWC 2014 - A picture worth 1000 words
QWC 2014 - A picture worth 1000 wordsQWC 2014 - A picture worth 1000 words
QWC 2014 - A picture worth 1000 wordsJohn Park
 
“Semantic PDF Processing & Document Representation”
“Semantic PDF Processing & Document Representation”“Semantic PDF Processing & Document Representation”
“Semantic PDF Processing & Document Representation”diannepatricia
 

Semelhante a Python Visualisation for Data Science (20)

MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra
 
IaaS, PaaS, and DevOps for Data Scientist
IaaS, PaaS, and DevOps for Data ScientistIaaS, PaaS, and DevOps for Data Scientist
IaaS, PaaS, and DevOps for Data Scientist
 
Msbi online training
Msbi online trainingMsbi online training
Msbi online training
 
Machine Learning with Python
Machine Learning with PythonMachine Learning with Python
Machine Learning with Python
 
Data Product Architectures
Data Product ArchitecturesData Product Architectures
Data Product Architectures
 
Data Observability Best Pracices
Data Observability Best PracicesData Observability Best Pracices
Data Observability Best Pracices
 
Introduction to Data Analtics with Pandas [PyCon Cz]
Introduction to Data Analtics with Pandas [PyCon Cz]Introduction to Data Analtics with Pandas [PyCon Cz]
Introduction to Data Analtics with Pandas [PyCon Cz]
 
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYAPYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Using the LEADing Data Reference Content
Using the LEADing Data Reference ContentUsing the LEADing Data Reference Content
Using the LEADing Data Reference Content
 
Machine Learning with Azure
Machine Learning with AzureMachine Learning with Azure
Machine Learning with Azure
 
Cssu dw dm
Cssu dw dmCssu dw dm
Cssu dw dm
 
Machine learning 101
Machine learning 101Machine learning 101
Machine learning 101
 
Scala meetup Kyiv slides 20171215
Scala meetup Kyiv slides 20171215Scala meetup Kyiv slides 20171215
Scala meetup Kyiv slides 20171215
 
How to Ensure your Microsoft BI Project is a Success!
How to Ensure your Microsoft BI Project is a Success! How to Ensure your Microsoft BI Project is a Success!
How to Ensure your Microsoft BI Project is a Success!
 
Msbi course content
Msbi course contentMsbi course content
Msbi course content
 
QWC 2014 - A picture worth 1000 words
QWC 2014 - A picture worth 1000 wordsQWC 2014 - A picture worth 1000 words
QWC 2014 - A picture worth 1000 words
 
“Semantic PDF Processing & Document Representation”
“Semantic PDF Processing & Document Representation”“Semantic PDF Processing & Document Representation”
“Semantic PDF Processing & Document Representation”
 
Sap business objects bobi training
Sap business objects bobi trainingSap business objects bobi training
Sap business objects bobi training
 
DA_01_Intro.pptx
DA_01_Intro.pptxDA_01_Intro.pptx
DA_01_Intro.pptx
 

Mais de Amit Kapoor

Deep Learning for NLP
Deep Learning for NLPDeep Learning for NLP
Deep Learning for NLPAmit Kapoor
 
The Power of Ensembles in Machine Learning
The Power of Ensembles in Machine LearningThe Power of Ensembles in Machine Learning
The Power of Ensembles in Machine LearningAmit Kapoor
 
Storytelling with Data - Approach | Skills
Storytelling with Data - Approach | SkillsStorytelling with Data - Approach | Skills
Storytelling with Data - Approach | SkillsAmit Kapoor
 
Visualising Big Data
Visualising Big DataVisualising Big Data
Visualising Big DataAmit Kapoor
 
Learning the Craft of Data Visualisation
Learning the Craft of Data VisualisationLearning the Craft of Data Visualisation
Learning the Craft of Data VisualisationAmit Kapoor
 
Visualising Multi Dimensional Data
Visualising Multi Dimensional DataVisualising Multi Dimensional Data
Visualising Multi Dimensional DataAmit Kapoor
 
Tools & Resources for Data Visualisation
Tools & Resources for Data VisualisationTools & Resources for Data Visualisation
Tools & Resources for Data VisualisationAmit Kapoor
 
Fifth Elephant 2014 talk - Crafting Visual Stories with Data
Fifth Elephant 2014 talk - Crafting Visual Stories with DataFifth Elephant 2014 talk - Crafting Visual Stories with Data
Fifth Elephant 2014 talk - Crafting Visual Stories with DataAmit Kapoor
 
Storytelling with Data - See | Show | Tell | Engage
Storytelling with Data - See | Show | Tell | EngageStorytelling with Data - See | Show | Tell | Engage
Storytelling with Data - See | Show | Tell | EngageAmit Kapoor
 
Crafting Visual Stories with Data
Crafting Visual Stories with DataCrafting Visual Stories with Data
Crafting Visual Stories with DataAmit Kapoor
 
Business Process Improvement - A Strategic and Supply Chain Perspective
Business Process Improvement - A Strategic and Supply Chain Perspective Business Process Improvement - A Strategic and Supply Chain Perspective
Business Process Improvement - A Strategic and Supply Chain Perspective Amit Kapoor
 
What makes a data-story work?
What makes a data-story work?What makes a data-story work?
What makes a data-story work?Amit Kapoor
 
What is Strategy - Thinking like a Strategist
What is Strategy - Thinking like a StrategistWhat is Strategy - Thinking like a Strategist
What is Strategy - Thinking like a StrategistAmit Kapoor
 
Telling Stories with Data - Using Story Spine
Telling Stories with Data - Using Story SpineTelling Stories with Data - Using Story Spine
Telling Stories with Data - Using Story SpineAmit Kapoor
 
Story Structure and Modern Storytelling
Story Structure and Modern StorytellingStory Structure and Modern Storytelling
Story Structure and Modern StorytellingAmit Kapoor
 
Targeting the Moment of Truth - Using Big Data in Retail
Targeting the Moment of Truth - Using Big Data in RetailTargeting the Moment of Truth - Using Big Data in Retail
Targeting the Moment of Truth - Using Big Data in RetailAmit Kapoor
 
Storytelling - Gutenberg
Storytelling - GutenbergStorytelling - Gutenberg
Storytelling - GutenbergAmit Kapoor
 
Analytics in Consulting
Analytics in ConsultingAnalytics in Consulting
Analytics in ConsultingAmit Kapoor
 
Retail Pricing Perspective
Retail Pricing PerspectiveRetail Pricing Perspective
Retail Pricing PerspectiveAmit Kapoor
 

Mais de Amit Kapoor (19)

Deep Learning for NLP
Deep Learning for NLPDeep Learning for NLP
Deep Learning for NLP
 
The Power of Ensembles in Machine Learning
The Power of Ensembles in Machine LearningThe Power of Ensembles in Machine Learning
The Power of Ensembles in Machine Learning
 
Storytelling with Data - Approach | Skills
Storytelling with Data - Approach | SkillsStorytelling with Data - Approach | Skills
Storytelling with Data - Approach | Skills
 
Visualising Big Data
Visualising Big DataVisualising Big Data
Visualising Big Data
 
Learning the Craft of Data Visualisation
Learning the Craft of Data VisualisationLearning the Craft of Data Visualisation
Learning the Craft of Data Visualisation
 
Visualising Multi Dimensional Data
Visualising Multi Dimensional DataVisualising Multi Dimensional Data
Visualising Multi Dimensional Data
 
Tools & Resources for Data Visualisation
Tools & Resources for Data VisualisationTools & Resources for Data Visualisation
Tools & Resources for Data Visualisation
 
Fifth Elephant 2014 talk - Crafting Visual Stories with Data
Fifth Elephant 2014 talk - Crafting Visual Stories with DataFifth Elephant 2014 talk - Crafting Visual Stories with Data
Fifth Elephant 2014 talk - Crafting Visual Stories with Data
 
Storytelling with Data - See | Show | Tell | Engage
Storytelling with Data - See | Show | Tell | EngageStorytelling with Data - See | Show | Tell | Engage
Storytelling with Data - See | Show | Tell | Engage
 
Crafting Visual Stories with Data
Crafting Visual Stories with DataCrafting Visual Stories with Data
Crafting Visual Stories with Data
 
Business Process Improvement - A Strategic and Supply Chain Perspective
Business Process Improvement - A Strategic and Supply Chain Perspective Business Process Improvement - A Strategic and Supply Chain Perspective
Business Process Improvement - A Strategic and Supply Chain Perspective
 
What makes a data-story work?
What makes a data-story work?What makes a data-story work?
What makes a data-story work?
 
What is Strategy - Thinking like a Strategist
What is Strategy - Thinking like a StrategistWhat is Strategy - Thinking like a Strategist
What is Strategy - Thinking like a Strategist
 
Telling Stories with Data - Using Story Spine
Telling Stories with Data - Using Story SpineTelling Stories with Data - Using Story Spine
Telling Stories with Data - Using Story Spine
 
Story Structure and Modern Storytelling
Story Structure and Modern StorytellingStory Structure and Modern Storytelling
Story Structure and Modern Storytelling
 
Targeting the Moment of Truth - Using Big Data in Retail
Targeting the Moment of Truth - Using Big Data in RetailTargeting the Moment of Truth - Using Big Data in Retail
Targeting the Moment of Truth - Using Big Data in Retail
 
Storytelling - Gutenberg
Storytelling - GutenbergStorytelling - Gutenberg
Storytelling - Gutenberg
 
Analytics in Consulting
Analytics in ConsultingAnalytics in Consulting
Analytics in Consulting
 
Retail Pricing Perspective
Retail Pricing PerspectiveRetail Pricing Perspective
Retail Pricing Perspective
 

Último

Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...HyderabadDolls
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowgargpaaro
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 

Último (20)

Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 

Python Visualisation for Data Science

  • 1. Data Vis for Data Science Usage of Python Visualisation Libraries Amit Kapoor @amitkaps
  • 2. Data Science Pipeline — Frame: Problem definition — Acquire: Data ingestion — Refine: Data wrangling — Transform: Feature creation — Explore: Feature selection — Model: Model creation & assessment — Insight: Solution communication
  • 3. Role of Visualisation — Frame: Structuring (issue tree, hypotheses) — Acquire: Loading (progress, errors) — Refine: Profiling (missing values, outliers) — Transform: Univariate & Bivariate Vis (1D, 2D) — Explore: Multi Dimensional Vis (3D ... ND) — Model: Model Vis (predictions, errors, models) — Insight: Vis Comm (chart, narrative, dashboard)
  • 4. Understanding Visualisation — Domain & Task Layer e.g. Tabular Data for EDA — Data Layer e.g. Data Types, Transformation — Visual Layer e.g. Encoding, Marks, Coordinate — Annotation Layer e.g. Labels, Ticks, Titles — Interaction Layer e.g. Filtering, Highlighting, Selection
  • 5. Python Visualisation Libraries — Matplotlib — Pandas built-in plotting — ggpy — Altair — Seaborn — Plotly — Bokeh — HoloViews — VisPy — Lightning — pygg
  • 6. Choosing a Visualisation Library — Ease of Learning: How hard is the API? — Coverage: How many graphic types can it cover? — Approach: Is it Charting or Grammar based? — Documentation: How easy is it to make basics graphs? — Community Support: How hard is it to make complex graphs?
  • 7. Notes in Circulation year | type | denom | value | money | number | ------- | -------| ------ | ------ | ------- | ------ | 1977 | Notes | 0001 | 1 | 2.72 | 2.720 | 1977 | Notes | 1000 | 1000 | 0.55 | 0.001 | 1977 | Notes | 0002 | 2 | 1.48 | 0.740 | 1977 | Notes | 0050 | 50 | 9.95 | 0.199 | ... | ... | ... | ... | ... | ... | 2015 | Notes | 0500 | 500 | 7853.75 | 15.708 | 2015 | Notes | 0001 | 1 | 3.09 | 3.090 | 2015 | Notes | 0010 | 10 | 320.15 | 32.015 | 2015 | Notes | 1000 | 1000 | 6325.68 | 6.326 |
  • 8. Use Pandas for Base Plotting # Loading Data import pandas as pd notes = pd.read_csv('notes.csv') # Data Transformation notes_wide = pd.pivot_table(data = notes, index="year", columns="denom", values="money") # Plotting notes_wide.plot(kind="line")
  • 9.
  • 10. Use Matplotlib for Annotation # Basic Styling import matplotlib.pyplot as pet plt.rcParams['figure.figsize'] = (9,6) plt.style.use('ggplot') # Plotting notes_wide.plot(kind="line") # Adding Annotation plt.ylabel('Value INR Bns') plt.title('Notes in Circulation')
  • 11.
  • 12. Ideally use ggplot like R from plot import * ggplot(notes, aes(x='year', y='money', color='denom')) + / geom_line()
  • 13. Use Altair for Grammar Visualisation from altair import Chart Chart(notes).mark_line().encode( x='year:N', y='money', color='denom' )
  • 14.
  • 15. Personal Usage — Use Pandas for base plotting and time series — Use Matplotlib for matrices and customisation — Use Seaborn for 1D & 2D statistical graphs, especially categorical variable — Use IPython Widgets for model interaction — Use Datashader for Big Data Visualisation — Experimenting with Altair
  • 16. What about interactivity? — Watch out for Altair - Interaction will be build in soon — Use Bokeh for web-based interactive dashboard, but require learning a different API — Use Plotly for creating full interactive charts. Integration with Matplotlib available.
  • 17. Get in touch with me Amit Kapoor @amitkaps amitkaps.com