Project 2 — NYCHA Electricity
Introduction
For Project 2, I reviewed the datasets presented in the Week 5 Discussion 5A posts. These posts were used to identify three different datasets that could be prepared and analyzed independently.
This report focuses on the Electric Consumption and Cost dataset. After identifying the dataset through Discussion 5A, I accessed NYC Open Data and downloaded the original data directly from the official source.
The dataset contains monthly electricity consumption and cost records for New York City Housing Authority developments. It includes information such as development name, borough, location, billing period, electrical meter, electricity consumption, and electricity cost.
Dataset Selection
The Electric Consumption and Cost dataset was selected as one of the three datasets required for Project 2.
Discussion 5A was used to identify and describe the dataset. The actual data used in this report was downloaded from the official NYC Open Data website. The original CSV file will be preserved, and the tidying, transformation, and analysis will be completed in this Project 2 report.
Data Source
Dataset: Electric Consumption and Cost (2010–Sep 2025)
Publisher: New York City Housing Authority
Official source: NYC Open Data
Dataset webpage: Electric Consumption and Cost
The original CSV file is stored in:
data/NYCHA_Electric_Consumption_And_Cost.csv
Approach
The purpose of this analysis is to compare electricity consumption across the five New York City boroughs and examine how consumption changes over time. The analysis will also evaluate the relationship between electricity consumption and electricity cost.
The original data will be imported from the CSV file downloaded from NYC Open Data. I will use dplyr to select the required variables, standardize column names, convert consumption and cost fields to numeric values, and address missing or inconsistent observations.
The selected data will be organized into a wide-format table by month and borough. I will then use pivot_longer() from the tidyr package to transform the borough columns into a tidy structure. All analysis and visualizations will use the transformed dataset.
Business Questions
This analysis will address two questions:
- How does electricity consumption vary across the five New York City boroughs and over time?
- What is the relationship between electricity consumption and electricity cost?
Planned Analysis
The analysis will include:
- Monthly electricity consumption by borough.
- A comparison of total and average electricity consumption among the five boroughs.
- An examination of monthly electricity-consumption trends.
- A comparison between electricity consumption and electricity cost.
- Two or three clearly labeled visualizations created with
ggplot2. - A brief interpretation of the principal findings.
Expected Outcome
The analysis will show how electricity consumption differs among the five New York City boroughs and changes over time. It will also examine whether higher electricity consumption is associated with higher electricity cost.
AI Use
ChatGPT was used to help interpret the assignment requirements, organize the planned approach, improve the English writing, and provide guidance for the R code. I downloaded the original data from the official source and will run, review, and verify the data transformations, analysis, visualizations, and final conclusions.