Computer Science (3)


Writing Web Scraped HTML to a File

I was working on a project for a client where I needed to scrape data from a Web page. I wanted to save the page to a file so that I wouldn’t be making requests to the server hosting the page each time I wanted to test my code. I was using Python3 and the Requests library. When attempting to perform the write to a file, I ran into encoding issues. This task was not as straightforward as I first imagined.




Introduction to NumPy

Lately, I’ve been studying statistics and data analysis. I have beforehand knowledge of the Python programming language, so when looking at the two most widely used programming tools applied in this domain, Pandas and R, I chose Pandas – a software library for Python. Pandas uses another library in the construction of it’s data structures (Series and DataFrames), called NumPy. This post goes over some of what can be done with NumPy.




Absence of Religiosity and Negative Outcomes

Coursera Data Analysis and Visualization Week 1

According the Gallop Organization religious devotion and practice is in decline in America. It is my assumption that adults who are not religious will not transmit religiosity to their children. If this is the case, it could have an effect on the positive and negative factors associated with religion.

Using the National Longitudinal Study of Adolescent Health (Add Health) survey results – a representative sample of adolescents in grades 7-12 in the United States –  I seek to answer the question of whether or not religiosity is associated with negative outcomes (defined later). If religion is negatively associated with negative outcomes, we can then expect this trend in religiosity to be beneficial for individuals.

However, if the opposite is true (i.e. religion is positively associated with negative outcomes – i.e. protective against negative outcomes), this research could start a discussion concerning this trend in the American population regarding religiousness.