Wednesday, March 8, 2017

How to use python to analyze and visualize data

Hi everyone,

My name is Xintong Zheng and I will show class how to use Python to analyze and visualize data. Moreover, I will show how to code the café wall illusion.  I attached the sample results of those codes below.

During the presentation, I will show my code and tell you how to import, analyze and visualize data using Python. The function of my code is to read the name rank data file, searching for that name and the first letter of the gender (case insensitively). If the name and gender combination are found in the file, the program should print a line of statistics about that name's popularity in each decade, the name’s meaning and display information about the name graphically with a histogram.
Steps of the program:
-I will download data from http://www.ssa.gov/OACT/babynames/
-Import file to python
§  file = Open(file name)
§  file.readlines()

-Analyze data using:
  §  for loop
      §  while
      §  if…elif…else

-Visualize data
§  from drawingpanel import *
-More useful tutorial



A histogram of the popularity of the female name Michelle from 1890 to 2010.  


A café wall illusion 


2 comments:

  1. I want to learn Python but I don't want myself confuse with Java. My goal is learn Python in the summer when I have more time. Thank you for sharing.

    ReplyDelete
  2. Thanks. I know students who learned Python from online MOOCs. There is talk about teaching it, but we want students to learn Java. CS offers courses on Python.

    ReplyDelete