Water Consumption in New York City

Aminata Gadio
4 min readMar 26, 2019

--

Aminata Gadio

https://mystylebd.us/home/wp-content/uploads/2017/03/drink-water.jpeg

Purpose

Knowing how to work with pandas is a basic life skill that many people use in various occupations, businesses, and classrooms. When my professor challenged us to demonstrate some basic skills with pandas using a data set that interest us the most, information published on NYC Open Data about water consumption in New York City throughout history caught my attention. Though it is rare for someone to know how much water the city consumes every year (per year), pandas will us to receive this information from the palm of our hands. From using integers, variables, booleans, strings, to tacking tough questions about our data set. Let’s begin!

Data Dictionary:

Integers : Positive and Negative whole numbers

Booleans : Two constant objects. True and False

Strings : List of characters that are immutable

Variables :Reserved memory locations to store values and are used to represent many numbers

How to insert your data set directly to Google Colab:

With this cell, all your information from the data set will be transferred on to google colab from the JSON link.

Questions to be Explored:

Before exploring a data set, it is always good to brainstorm a set of questions about the data. Here are my questions:

Tip! : For beginners, it is important to use comments above your code to organize your information and help you find bugs faster! (see above image)

Describe Cell

This code allows you to have an outline of your data set in different categorizes ranging from mean, standard deviation, minimum, and maximum.

From then on, the first thing needed to answer my first question: Which year consumed the most water, is finding out the mean of NYC’s population. Finding the mean will average out the central value of the discrete set of numbers (the sum of the values divided by the number of values).

Mean of NYC population

Mean of NYC’s consumption of gallons per person, per day

Mean of consumption of gallons per person per day

After finding the mean of each, I used that information to combine NYC’s population and how much gallons are consumed everyday, per day.

Because it was hard to tell which year consumed the most water due to the mass amount of numbers, I decided to create a bar graph with color coded bars to represent the population in the Y-axis and year in the X-axis (per year).

Population : From the chart above, year 2017 had the most people with about 8 billion people!

Product:

Through this visualization I found that 1979 was the year which consumed the most water while 2017 consumed the least amount of water. I believe the data is as it is because in today’s society, many people are finding ways to save water as it is a major crisis our world is facing today. Back then, it wasn’t much of a problem as Global Warning wasn’t as prevalent as it is today.

Check out this article to learn more about what you can do to save water!

http://time.com/4708941/world-water-day-water-consumption/

Overall, from the data collected from NYC Open data, I learned many things from Water Consumption and the impact it has on the city and population. From basic skills learnt from pandas, I became aware of how much information a person can view right from the palm of your hands.

--

--

No responses yet