Python for Data Science, Essential Training Part 1


Course sections: Filter-Group-Sort | Data Visualization | Math Statistics | Web Scraping


3. Data Visualization 101


I. The three types of data visualization 7m 40s
  1. Data storytelling - presentations to org decision makers. Make it easy to get the point. Clutter-free, organized. Non-technical. Show findings. Dashboard.

  2. Data showcasing - presentations to scientists. Highly contextual, let audience draw own conclusions. Static images, interactive dashboards. Good for exploratory analysis.

  3. Data art - presentations to activitists, public. Make a statement. Attention getting and controversial. Educate, inform public. Static images ususally.


II. Selecting optimal data graphics 6m 17s
  1. Storytelling - Pie charts, Bar Charts, Line Charts
  • Cloropleth - map that shows area boundaries; states in U.S.

  • Point map - cities in US.

  1. Showcasing - More options, scatter plots, scatter plot matricies, raster maps, histograms, area charts.
  • Raster maps - radar for weather, xy grid filled in with values; colored by count.
  1. Data art - Line charts, Cloropleths, graph networks, weird, artsy.

    Four steps to chosing graphics

  1. List of questions to answer

  2. Which of 3 types? Audience.

  3. What type preferable for audience.

  4. Test out


III. Communicating with color and context 4m 38s

    Color formulas: monochromatic, analogous, and complimentary.

    AI driven tool called Colormind helps identify formula.

    Annotations as context

  • Use color to draw attention to what matters most in this piece, and then using muted shades in order to basically underline and support their data visualization for completeness.

  • The red and orange really draw attention to the points that they’re trying to make with the data visualization. The gray areas are there for completeness and support.


4. Practical Data Visualization


I. Creating standard data graphics 8m 42s

    Two methods for plot building

  • Functional - Call plot function on a set of variables.

  • Object oriented - Blank object, then populate w elements.


II.Defining elements of a plot 9m 6s

    Object oriented - Generate blank object, then populate.

  1. Create blank figure object

  2. Add axes to figure

  3. Generate plot w/in figure

  4. Specify plotting and layout parameters for plots w/in figure


III. Plot formatting 12m 8s

IV. Creating labels and annotations 14m 30s
  • Add a legend - .legend(label, loc)

  • Label features

  • Annotate a plot - .annotate(xy, xytext, arrowprop)

  • Functional and Object Oriented methods


V. Visualizing time series 6m 33s

    Time series - measure of unit change over time for any variable.

  • datetime - built-in python module supplies classes.

  • Constant time series - no change in var over time.

  • Trended time series - see trend over time.

  • Untrended/Seasonal time series - increase or decrease by seasons only. No net change in average over time.

  • Trended and seasonal time series - varies both by season and time.


VI. Creating statistical data graphics 9m 59s

    Identify outliers, visualize distributions, deduce variable types, and discover relationships between variables.

  • Histograms show variable distribution

  • Scatterplots show relationships between variables

  • Scatterplot matrices show matrix of plots displaying correlation between variables

  • Boxplots show variable spread and outliers