Before working on this assignment please read these instructions fully. In the submission area, you will notice that you can click the link to Preview the Grading for each step of the assignment. This is the criteria that will be used for peer grading. Please familiarize yourself with the criteria before beginning the assignment.
This assignment requires that you to find at least two datasets on the web which are related, and that you visualize these datasets to answer a question with the broad topic of religious events or traditions (see below) for the region of West Milford, New Jersey, United States, or United States more broadly.
You can merge these datasets with data from different regions if you like! For instance, you might want to compare West Milford, New Jersey, United States to Ann Arbor, USA. In that case at least one source file must be about West Milford, New Jersey, United States.
You are welcome to choose datasets at your discretion, but keep in mind they will be shared with your peers, so choose appropriate datasets. Sensitive, confidential, illicit, and proprietary materials are not good choices for datasets for this assignment. You are welcome to upload datasets of your own as well, and link to them using a third party repository such as github, bitbucket, pastebin, etc. Please be aware of the Coursera terms of service with respect to intellectual property.
Also, you are welcome to preserve data in its original language, but for the purposes of grading you should provide english translations. You are welcome to provide multiple visuals in different languages if you would like!
As this assignment is for the whole course, you must incorporate principles discussed in the first week, such as having as high data-ink ratio (Tufte) and aligning with Cairo’s principles of truth, beauty, function, and insight.
Here are the assignment instructions:
What do we mean by religious events or traditions? For this category you might consider calendar events, demographic data about religion in the region and neighboring regions, participation in religious events, or how religious events relate to political events, social movements, or historical events.
Looking for an example? Here's what our course assistant put together for the Ann Arbor, MI, USA area using sports and athletics as the topic. Example Solution File
In [14]:
#https://en.wikipedia.org/wiki/History_of_religion_in_the_United_States
#https://nces.ed.gov/programs/digest/d16/tables/dt16_302.60.asp
import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
columns = ['Year','Total','2-Year','4-Year']
religous_data = pd.read_excel(r"religous_data_united_states.xlsx")
education_data= (pd.read_excel(r"tabn302.60.xls",
skiprows=5,parse_cols="A,B,D,F",
names=columns)
.dropna(thresh=len(columns)))
education_data['Year'].replace("\.+",'',regex=True,inplace=True)
education_data['Year'].replace("\\\\.+\\\\","",regex=True,inplace=True)
education_data['Year'] = education_data['Year'].str.strip()
education_data['Year'] = education_data['Year'].astype(int)
education_data['4-Year'].replace("---",np.NaN,regex=True,inplace=True)
education_data.set_index('Year',inplace=True)
religous_data.set_index("Religion",inplace=True)
religous_data = religous_data.T
religous_data['total'] = religous_data.T.drop('None').T.apply(np.sum,axis='columns')
religous_data = religous_data.T
fig,ax = plt.subplots()
ax.plot(religous_data.loc['None']*100,'-o',c='r',label="Non Believers")
ax2 = ax.twinx()
ax2.plot(education_data['Total'],'-o',label='Total Students')
plt.title("Increase in Percentage of College Enrollment and\n "
"People Without Religious Affiliation in United States")
ax.set_ylabel("% Population without Religious Beliefs")
ax2.set_ylabel("% 18 to 24 Year-olds Enrolled in College")
ax.set_xlabel("Year")
handles1,labels1 = ax.get_legend_handles_labels()
handles2,labels2 = ax2.get_legend_handles_labels()
plt.legend(handles1 + handles2,labels1 + labels2)
plt.xlim([1970,2015])
plt.show()
In [ ]:
In [ ]: