Case for Optimism

Frederick Cheung
Posted on Nov 6, 2016

I was eating a Chipotle burrito the other day and I came across a short but poignant essay on the bag of my food as I was mindlessly munching away.

Optimism, a numbers game

The essay was from a writer by the name of Steven Pinker and the essay was entitled "A Two-Minute Case for Optimism" and in it he posits that although many believe the world is becoming a worse place, it is in fact becoming a better place; we know this because we can count. We can count the number of problems in our world and compare those numbers to earlier times, and the numbers show that the world is getting better.

Let's talk about the data set.

I obtained my data set from the World Bank under their metrics known as the World Development Indicators. Because it was such a large data set, I tried to subset the data by choosing only the variables associated with health. I encountered problems while attempting to turn these data into an interactive chart using R Shiny so I subsetted my data further into two simple variables: a subset of Life Expectancy in the US for males, and a subset for females.

Here is an output of the resulting R Shiny app.


Let's talk about packages.

Prior to doing any work on the actual R Shiny app, I tried to get my data as clean as possible by removing any unnecessary columns and checking through my data to see if the analysis I was going to give had data to show (this is in contrast to my Data Visualization project where I did not do this step). My initial thought was to use the dygraphs package in R to present my information. I spent most of my time trying to understand the intricacies of user input and output for R Shiny.

I cannot stress enough how important it is to understand the libraries needed to accomplish the goals for your project and the formats and syntax compatible with those libraries.

When I started to work with the dygraphs package it soon became apparent that my data, although clean, was not in the right orientation. With only a few hours left, I did not have enough time to learn the Reshape package that would help me transpose my data, as the base R package was not able to handle a my complicated transposition. Thus I ended up with only one variable with male and female groups and used the GoogleVis package. I would highly recommend GoogleVis to anyone looking to have an interactive exploratory experience with data. It is simple to use and very powerful in terms of visualization options.

Optimism, gritty and nuanced

This essay struck me because in his conclusion Steven Pinker presented an optimism not of naiveté and romanticism but rather an optimism rooted in the challenges of the present and resolved toward improving the future. You will notice that in the graph, despite the progress in increasing life expectancy overall, there is still a gap between the life expectancy of men vs. women. When women died in child birth earlier in our history we did not simply accept that as a part of human biology and ignore the problem, we sought to apply science and medicine to improve the outcomes. Similar, we should not look at lower life expectancy for males as something to be ignored but as impetus for further discussion and exploration to improve outcomes in this aspect.

Future work

My personal goal is to refine my skills on the Reshape package in R. I believe this will be of a lot of use if I work with companies that make use of a lot of pivot tables and perhaps need a more robust program such as R to handle larger data sets.  I hope that I can work on this project further and transpose my other data so that I can use all the health data I extracted and give users an opportunity to explore the data on their own.

Personal Thoughts

Thanks to Chipotle for giving me food as well as food for thought.

About Author

Frederick Cheung

Frederick Cheung

Hi my name is Fred. Although my educational background is an M.S. in Medical Science, my professional experience is with Small Business management, operations and sustainable business practices. I’ve recently completed a Data Science program working with languages...
View all posts by Frederick Cheung >

Leave a Comment

professional essay writer toronto January 23, 2017
Hi Dear, are you truly visiting this website daily, if so then you will absolutely obtain nice experience.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp