Giter Club home page Giter Club logo

python_data_viz's Introduction

Data Visualization in Python

This repository hosts scripts related to data visualization in Python.


Line Plots

Code: line_plot.py

Data: data/city_weather_2019.csv

Modules: pandas, matplotlib

Description: This script generates a line plot of weather across days of the year for two separate cities. The script also provides good examples of pandas functionality, particularly string manipulation (for dates). In the second plot below, I used df.rolling(5).mean() to apply a 5-step moving average to both curves.

Video Tutorial: https://youtu.be/cWXnPYJGe4g


Scatter Plots

Code: scatter_plot.py

Data: mtcars.csv (loaded from https://gist.github.com/ZeccaLehn/4e06d2575eb9589dbe8c365d61cb056c)

Modules: pandas, numpy, matplotlib

Description: This script generates a scatter plot of MPG vs HP from the mtcars dataset. The script also provides good examples of text manipulation on the plot (e.g., font style, weight, color, and padding). The script also provides a numpy template for adding a line of best fit (1st order ploynomial) to the scatter data.

Video Tutorial: https://youtu.be/6V23myHGdng


Bar Plots

Code: bar_plot.py

Data: mtcars.csv (loaded from https://gist.github.com/ZeccaLehn/4e06d2575eb9589dbe8c365d61cb056c)

Modules: pandas, numpy, matplotlib

Description: This script generates two bar plots - one of MPG vs cylinder count and one of multiple variables grouped by cyclinder count. All data comes from the mtcars dataset. The script also provides good examples of common pandas functionality (e.g., .mean(), .std(), and .groupby()).

Video Tutorials:


Box Plots

Code: box_plot.py

Data: mtcars.csv (loaded from https://gist.github.com/ZeccaLehn/4e06d2575eb9589dbe8c365d61cb056c) and iris (loaded from Seaborn)

Modules: pandas, matplotlib, seaborn

Description: This script generates two box plots - one of MPG vs cylinder count (from the mtcars data set) and one of sepal width as a function of plant species and sepal length (from the iris data set). The script incoporates functions from the seaborn module.


Heat Mapped Correlation Matrix

Code: cormat_plot.py

Data: mtcars.csv (loaded from https://gist.github.com/ZeccaLehn/4e06d2575eb9589dbe8c365d61cb056c)

Modules: pandas, numpy, matplotlib, seaborn

Description: This script generates a heat mapped correlation matrix from the mtcars data set.


Histograms

Code: histogram_plot.py

Data: mtcars.csv (loaded from https://gist.github.com/ZeccaLehn/4e06d2575eb9589dbe8c365d61cb056c)

Modules: pandas, matplotlib, seaborn

Description: This script generates example histograms using the mtcars data set.


Joint Plots

Code: joint_plot.py

Data: iris (loaded from Seaborn)

Modules: matplotlib, seaborn

Description: This script generates examples of joint plots, which have a main, center panel and marginal panels.

python_data_viz's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.