Assignment Week 2

Continuing with Outlook on Life Surveys 2012 dataset I’ve been working with, in this assignment, I run my first program in Python that showing frequency distributions for my chosen variables and columns, possibly rows, etc. I uploaded the code (.py file) in my Github account on this following link: assignment2.py. The code executes like a charm and produces result as can be seen in text file here.

These are the outputs displays three of variables as frequency tables. I renamed the original label with its description label to be more interpretable, for example I renamed the categorical values, such as: 1, 2, 3 with ‘Strongly Agree’, ‘Somewhat Agree’, ‘Disagree’, etc.

w1_m1_frequency_result

As we can see from the results, Baptist any denomination, Catholic, None, Other Christian and Protestant have count of value more than average of the distribution.

w1_m2_frequency_result

Black and White people attend place of worship higher than average of the distribution.

w1_m3_frequency_result

In the case of political involvement in churches/place of worship, answers of  ‘Somewhat Agree’, ‘Somewhat Disagree’, and ‘Strongly Disagree’ are higher than average of the distribution.

name

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s