Project 2 — NYCHA Electricity

Author

Patricio Romero

Published

October 12, 2026

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. The transformed dataset will be used to analyze electricity consumption across boroughs and over time. The cleaned dataset will also be used to calculate monthly electricity costs and examine their relationship with electricity consumption.

Business Questions

This analysis will address two questions:

  1. How does electricity consumption vary across the five New York City boroughs and over time?
  2. 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.

Data Loading and Initial Exploration

I first loaded the NYCHA dataset into R to check its size, columns, and data types.

The original CSV file was not changed.

Code
# Load the required packages
library(readr)
library(dplyr)
library(tidyr)
library(ggplot2)

# Import the original dataset
nycha <- read_csv(
  "Data /NYCHA_Electric_Consumption_And_Cost.csv",
  show_col_types = FALSE
)

# Display the number of rows and columns
dim(nycha)
[1] 553666     27
Code
# Display the column names
names(nycha)
 [1] "Development Name"   "Borough"            "Account Name"      
 [4] "Location"           "Meter AMR"          "Meter Scope"       
 [7] "TDS #"              "EDP"                "RC Code"           
[10] "Funding Source"     "AMP #"              "Vendor Name"       
[13] "UMIS BILL ID"       "Revenue Month"      "Service Start Date"
[16] "Service End Date"   "# days"             "Meter Number"      
[19] "Estimated"          "Current Charges"    "Rate Class"        
[22] "Bill Analyzed"      "Consumption (KWH)"  "KWH Charges"       
[25] "Consumption (KW)"   "KW Charges"         "Other charges"     
Code
# Preview the first five observations
head(nycha, 5)
# A tibble: 5 × 27
  `Development Name` Borough `Account Name` Location `Meter AMR` `Meter Scope`
  <chr>              <chr>   <chr>          <chr>    <chr>       <chr>        
1 ADAMS              BRONX   ADAMS          BLD 05   NONE        BLD 01 to 07 
2 ADAMS              BRONX   ADAMS          BLD 05   NONE        BLD 01 to 07 
3 ADAMS              BRONX   ADAMS          BLD 05   NONE        BLD 01 to 07 
4 ADAMS              BRONX   ADAMS          BLD 05   NONE        BLD 01 to 07 
5 ADAMS              BRONX   ADAMS          BLD 05   NONE        BLD 01 to 07 
# ℹ 21 more variables: `TDS #` <dbl>, EDP <dbl>, `RC Code` <chr>,
#   `Funding Source` <chr>, `AMP #` <chr>, `Vendor Name` <chr>,
#   `UMIS BILL ID` <dbl>, `Revenue Month` <chr>, `Service Start Date` <chr>,
#   `Service End Date` <chr>, `# days` <dbl>, `Meter Number` <chr>,
#   Estimated <chr>, `Current Charges` <dbl>, `Rate Class` <chr>,
#   `Bill Analyzed` <chr>, `Consumption (KWH)` <dbl>, `KWH Charges` <dbl>,
#   `Consumption (KW)` <dbl>, `KW Charges` <dbl>, `Other charges` <dbl>
Code
# Examine the dataset structure
glimpse(nycha)
Rows: 553,666
Columns: 27
$ `Development Name`   <chr> "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADA…
$ Borough              <chr> "BRONX", "BRONX", "BRONX", "BRONX", "BRONX", "BRO…
$ `Account Name`       <chr> "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADA…
$ Location             <chr> "BLD 05", "BLD 05", "BLD 05", "BLD 05", "BLD 05",…
$ `Meter AMR`          <chr> "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "…
$ `Meter Scope`        <chr> "BLD 01 to 07", "BLD 01 to 07", "BLD 01 to 07", "…
$ `TDS #`              <dbl> 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,…
$ EDP                  <dbl> 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,…
$ `RC Code`            <chr> "B011800", "B011800", "B011800", "B011800", "B011…
$ `Funding Source`     <chr> "FEDERAL", "FEDERAL", "FEDERAL", "FEDERAL", "FEDE…
$ `AMP #`              <chr> "NY005001180P", "NY005001180P", "NY005001180P", "…
$ `Vendor Name`        <chr> "NEW YORK POWER AUTHORITY", "NEW YORK POWER AUTHO…
$ `UMIS BILL ID`       <dbl> 1842037, 1844205, 1841378, 1847148, 1848672, 1850…
$ `Revenue Month`      <chr> "2010-01", "2010-02", "2010-03", "2010-04", "2010…
$ `Service Start Date` <chr> "12/24/2009", "01/26/2010", "02/25/2010", "03/26/…
$ `Service End Date`   <chr> "01/26/2010", "02/25/2010", "03/26/2010", "04/26/…
$ `# days`             <dbl> 33, 30, 29, 31, 28, 30, 30, 31, 30, 30, 31, 31, 3…
$ `Meter Number`       <chr> "7223256", "7223256", "7223256", "7223256", "7223…
$ Estimated            <chr> "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",…
$ `Current Charges`    <dbl> 15396.82, 14556.34, 13904.98, 14764.04, 13729.54,…
$ `Rate Class`         <chr> "GOV/NYC/068", "GOV/NYC/068", "GOV/NYC/068", "GOV…
$ `Bill Analyzed`      <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", …
$ `Consumption (KWH)`  <dbl> 128800, 115200, 103200, 105600, 97600, 124000, 15…
$ `KWH Charges`        <dbl> 7387.97, 6607.87, 5919.55, 6057.22, 5598.34, 7112…
$ `Consumption (KW)`   <dbl> 216, 224, 216, 208, 216, 240, 296, 272, 280, 224,…
$ `KW Charges`         <dbl> 2808, 2912, 2808, 2704, 2808, 3120, 3848, 3536, 3…
$ `Other charges`      <dbl> 5200.85, 5036.47, 5177.43, 6002.82, 5323.20, 6456…

Initial Dataset Summary

The original NYCHA dataset contains 553,666 observations and 27 variables. These records include information about housing developments, electricity billing periods, electricity consumption, and associated costs.

This check helped identify the columns needed for the analysis.

Data Cleaning and Preparation

The NYCHA Electricity dataset contains 27 variables and 553,666 observations. For this analysis, I selected the variables related to housing developments, boroughs, billing periods, electricity consumption, and electricity costs.

I renamed the selected columns, checked for missing values, and prepared the numbers for analysis.

The original CSV file remains unchanged.

Code
# Select and rename the variables needed for the analysis
nycha_clean <- nycha %>%
  transmute(
    development_name = `Development Name`,
    borough = Borough,
    revenue_month = `Revenue Month`,
    bill_id = `UMIS BILL ID`,
    consumption_kwh = readr::parse_number(
      as.character(`Consumption (KWH)`)
    ),
    current_charges = readr::parse_number(
      as.character(`Current Charges`)
    ),
    kwh_charges = readr::parse_number(
      as.character(`KWH Charges`)
    )
  )

# Examine the cleaned dataset
glimpse(nycha_clean)
Rows: 553,666
Columns: 7
$ development_name <chr> "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADAMS", "ADAMS",…
$ borough          <chr> "BRONX", "BRONX", "BRONX", "BRONX", "BRONX", "BRONX",…
$ revenue_month    <chr> "2010-01", "2010-02", "2010-03", "2010-04", "2010-05"…
$ bill_id          <dbl> 1842037, 1844205, 1841378, 1847148, 1848672, 1850070,…
$ consumption_kwh  <dbl> 128800, 115200, 103200, 105600, 97600, 124000, 156000…
$ current_charges  <dbl> 15396.82, 14556.34, 13904.98, 14764.04, 13729.54, 166…
$ kwh_charges      <dbl> 7387.97, 6607.87, 5919.55, 6057.22, 5598.34, 7112.64,…
Code
# Display the first five observations
head(nycha_clean, 5)
# A tibble: 5 × 7
  development_name borough revenue_month bill_id consumption_kwh current_charges
  <chr>            <chr>   <chr>           <dbl>           <dbl>           <dbl>
1 ADAMS            BRONX   2010-01       1842037          128800          15397.
2 ADAMS            BRONX   2010-02       1844205          115200          14556.
3 ADAMS            BRONX   2010-03       1841378          103200          13905.
4 ADAMS            BRONX   2010-04       1847148          105600          14764.
5 ADAMS            BRONX   2010-05       1848672           97600          13730.
# ℹ 1 more variable: kwh_charges <dbl>

Missing Values Assessment

I checked the selected columns for missing values.

Code
# Count missing values for each variable
missing_summary <- nycha_clean %>%
  summarise(
    across(
      everything(),
      ~sum(is.na(.))
    )
  ) %>%
  pivot_longer(
    cols = everything(),
    names_to = "variable",
    values_to = "missing_count"
  )

# Display missing values
knitr::kable(
  missing_summary,
  col.names = c("Variable", "Missing Values"),
  caption = "Missing Values by Variable"
)
Missing Values by Variable
Variable Missing Values
development_name 0
borough 0
revenue_month 0
bill_id 0
consumption_kwh 0
current_charges 0
kwh_charges 0

Borough Validation

I checked the borough names before selecting the five NYC boroughs.

Code
# Count records by borough
borough_summary <- nycha_clean %>%
  count(borough, sort = TRUE)

knitr::kable(
  borough_summary,
  col.names = c("Borough", "Number of Records"),
  caption = "Number of Records by Borough"
)
Number of Records by Borough
Borough Number of Records
BROOKLYN 212402
MANHATTAN 141415
BRONX 125657
QUEENS 64276
STATEN ISLAND 4143
NON DEVELOPMENT FACILITY 3729
FHA 2044

Preparing the Analytical Dataset

I kept records from the five NYC boroughs with valid electricity use and cost values.

The original data was kept unchanged.

Code
# Prepare the analytical dataset
nycha_analysis <- nycha_clean %>%
  mutate(
    borough = toupper(trimws(borough))
  ) %>%
  filter(
    borough %in% c(
      "BRONX",
      "BROOKLYN",
      "MANHATTAN",
      "QUEENS",
      "STATEN ISLAND"
    ),
    !is.na(consumption_kwh),
    !is.na(current_charges),
    is.finite(consumption_kwh),
    is.finite(current_charges),
    consumption_kwh >= 0
  )

# Compare original and retained observations
cleaning_summary <- tibble(
  dataset = c("Selected Data", "Analytical Data"),
  observations = c(
    nrow(nycha_clean),
    nrow(nycha_analysis)
  )
)

knitr::kable(
  cleaning_summary,
  col.names = c("Dataset", "Records"),
  caption = "Data Cleaning Summary"
)
Data Cleaning Summary
Dataset Records
Selected Data 553666
Analytical Data 547893

Cleaning Summary

After cleaning, 547,893 records remained for analysis.

I used these records to compare electricity use and cost.

Data Transformation: Wide to Long

I organized the monthly electricity data into wide and long formats.

In the wide table, each borough has its own column.

I used pivot_longer() to put the borough names and electricity values into two columns.

The long table is easier to use for charts.

Monthly Electricity Consumption

Code
# Calculate monthly electricity consumption by borough
monthly_consumption <- nycha_analysis %>%
  group_by(revenue_month, borough) %>%
  summarise(
    total_kwh = sum(consumption_kwh, na.rm = TRUE),
    .groups = "drop"
  )

# Display the first observations
knitr::kable(
  head(monthly_consumption, 10),
  col.names = c("Month", "Borough", "Electricity (kWh)"),
  caption = "Monthly Electricity Consumption by Borough"
)
Monthly Electricity Consumption by Borough
Month Borough Electricity (kWh)
2010-01 BRONX 26765002
2010-01 BROOKLYN 33928541
2010-01 MANHATTAN 30656612
2010-01 QUEENS 9501068
2010-01 STATEN ISLAND 3009634
2010-02 BRONX 23581086
2010-02 BROOKLYN 29480943
2010-02 MANHATTAN 26832805
2010-02 QUEENS 8368548
2010-02 STATEN ISLAND 2647908

Creating the Wide-Format Dataset

Code
# Transform the monthly data into wide format
nycha_wide <- monthly_consumption %>%
  pivot_wider(
    names_from = borough,
    values_from = total_kwh
  ) %>%
  arrange(revenue_month)

# Display the wide-format dataset
knitr::kable(
  head(nycha_wide, 10),
  col.names = c("Month", "Bronx", "Brooklyn", "Manhattan", "Queens", "Staten Island"),
  caption = "Wide-Format Electricity Consumption Dataset"
)
Wide-Format Electricity Consumption Dataset
Month Bronx Brooklyn Manhattan Queens Staten Island
2010-01 26765002 33928541 30656612 9501068 3009634
2010-02 23581086 29480943 26832805 8368548 2647908
2010-03 22213157 27885320 25712414 8136467 2354075
2010-04 22084746 28604105 25739077 8098016 2245797
2010-05 22729296 27145995 26138619 8810369 2510650
2010-06 29475950 35862456 34584149 10349353 3215086
2010-07 39531115 47766230 45843344 14948903 4128253
2010-08 38492604 47535216 45489596 15116398 4082860
2010-09 29817501 36379367 34552552 11725546 3270162
2010-10 24922925 31008322 28097254 8940865 2659077

Converting Wide Data to Long Data

Code
# Convert wide-format data into tidy long format
nycha_long <- nycha_wide %>%
  pivot_longer(
    cols = -revenue_month,
    names_to = "borough",
    values_to = "total_kwh",
    values_drop_na = TRUE
  ) %>%
  arrange(revenue_month, borough)

# Display the transformed dataset
knitr::kable(
  head(nycha_long, 10),
  col.names = c("Month", "Borough", "Electricity (kWh)"),
  caption = "Long-Format Electricity Consumption Dataset"
)
Long-Format Electricity Consumption Dataset
Month Borough Electricity (kWh)
2010-01 BRONX 26765002
2010-01 BROOKLYN 33928541
2010-01 MANHATTAN 30656612
2010-01 QUEENS 9501068
2010-01 STATEN ISLAND 3009634
2010-02 BRONX 23581086
2010-02 BROOKLYN 29480943
2010-02 MANHATTAN 26832805
2010-02 QUEENS 8368548
2010-02 STATEN ISLAND 2647908

Transformation Validation

Code
# Compare the number of rows
transformation_summary <- tibble(
  dataset = c(
    "Monthly Aggregated Data",
    "Wide-Format Data",
    "Long-Format Data"
  ),
  observations = c(
    nrow(monthly_consumption),
    nrow(nycha_wide),
    nrow(nycha_long)
  )
)

knitr::kable(
  transformation_summary,
  col.names = c("Dataset", "Records"),
  caption = "Wide-to-Long Transformation Summary"
)
Wide-to-Long Transformation Summary
Dataset Records
Monthly Aggregated Data 825
Wide-Format Data 165
Long-Format Data 825
Code
# Verify that electricity consumption totals are preserved
validation <- tibble(
  original_total_kwh = sum(monthly_consumption$total_kwh),
  transformed_total_kwh = sum(nycha_long$total_kwh, na.rm = TRUE)
) %>%
  mutate(
    difference_kwh = original_total_kwh - transformed_total_kwh
  )

knitr::kable(
  validation,
  col.names = c("Original (kWh)", "After Transformation (kWh)", "Difference (kWh)"),
  caption = "Electricity Consumption Validation"
)
Electricity Consumption Validation
Original (kWh) After Transformation (kWh) Difference (kWh)
16466065485 16466065485 0

Transformation Summary

Each row in the long table represents one borough in one month.

Both tables contain the same electricity totals.

The validation found a difference of 0 kWh.

Business Question 1: Electricity Consumption by Borough and Over Time

Research Question: How does electricity consumption vary across the five New York City boroughs and over time?

To answer this question, I used the transformed long-format dataset to compare total and average monthly electricity consumption across the five boroughs. I also examined monthly consumption patterns to identify differences over time.

Total and Average Electricity Consumption by Borough

Code
# Calculate total and average monthly consumption by borough
borough_consumption <- nycha_long %>%
  group_by(borough) %>%
  summarise(
    total_consumption_kwh = sum(total_kwh, na.rm = TRUE),
    average_monthly_kwh = mean(total_kwh, na.rm = TRUE),
    months = sum(!is.na(total_kwh)),
    .groups = "drop"
  ) %>%
  arrange(desc(total_consumption_kwh))

# Display results
knitr::kable(
  borough_consumption,
  digits = 2,
  col.names = c("Borough", "Total Electricity (kWh)", "Monthly Average (kWh)", "Months"),
  caption = "Total and Average Monthly Electricity Consumption by Borough"
)
Total and Average Monthly Electricity Consumption by Borough
Borough Total Electricity (kWh) Monthly Average (kWh) Months
BROOKLYN 5429743216 32907535 165
MANHATTAN 4765841703 28883889 165
BRONX 4300696913 26064830 165
QUEENS 1523393706 9232689 165
STATEN ISLAND 446389948 2705394 165

Visualization 1: Total Electricity Consumption by Borough

Code
# Create a bar chart comparing electricity consumption
ggplot(
  borough_consumption,
  aes(
    x = reorder(borough, total_consumption_kwh),
    y = total_consumption_kwh / 1e9,
    fill = borough
  )
) +
  geom_col(show.legend = FALSE) +
  coord_flip() +
  labs(
    title = "Electricity Use by Borough",
    x = "Borough",
    y = "Electricity (billion kWh)"
  ) +
  theme_minimal()

Interpretation of Business Question 1

Brooklyn had the highest electricity use, about 5.43 billion kWh. Manhattan was next, followed by the Bronx. Queens and Staten Island used less electricity.

The monthly chart shows how electricity use changed over time. Differences may be related to the number and size of NYCHA buildings in each borough.

Business Question 2: Electricity Consumption and Electricity Cost

Research Question: What is the relationship between electricity consumption and electricity cost?

To answer this question, I examined the relationship between electricity consumption, measured in kilowatt-hours (kWh), and electricity charges, measured in US dollars.

I aggregated the cleaned data by month and borough to compare monthly electricity consumption with monthly electricity costs. This approach helps determine whether higher electricity consumption is associated with higher charges.

Monthly Electricity Consumption and Cost

Code
# Calculate monthly electricity consumption and charges by borough
monthly_cost <- nycha_analysis %>%
  group_by(revenue_month, borough) %>%
  summarise(
    total_consumption_kwh = sum(consumption_kwh, na.rm = TRUE),
    total_cost_usd = sum(current_charges, na.rm = TRUE),
    .groups = "drop"
  ) %>%
  arrange(revenue_month, borough)

# Display the first ten observations
knitr::kable(
  head(monthly_cost, 10),
  digits = 2,
  col.names = c("Month", "Borough", "Electricity (kWh)", "Cost (USD)"),
  caption = "Monthly Electricity Consumption and Cost by Borough"
)
Monthly Electricity Consumption and Cost by Borough
Month Borough Electricity (kWh) Cost (USD)
2010-01 BRONX 26765002 3262095.9
2010-01 BROOKLYN 33928541 4173703.2
2010-01 MANHATTAN 30656612 3700233.5
2010-01 QUEENS 9501068 1155172.4
2010-01 STATEN ISLAND 3009634 378856.8
2010-02 BRONX 23581086 2922307.5
2010-02 BROOKLYN 29480943 3679808.1
2010-02 MANHATTAN 26832805 3297540.6
2010-02 QUEENS 8368548 1038193.1
2010-02 STATEN ISLAND 2647908 294590.0

Correlation Analysis

Pearson’s correlation coefficient is used to measure the strength and direction of the linear relationship between electricity consumption and electricity cost.

A positive correlation indicates that higher consumption tends to be associated with higher electricity charges. However, correlation does not establish causation.

Code
# Calculate the correlation between consumption and cost
cost_correlation <- monthly_cost %>%
  summarise(
    correlation = cor(
      total_consumption_kwh,
      total_cost_usd,
      use = "complete.obs"
    )
  )

knitr::kable(
  cost_correlation,
  digits = 4,
  col.names = c("Correlation"),
  caption = "Correlation Between Electricity Consumption and Cost"
)
Correlation Between Electricity Consumption and Cost
Correlation
0.9319

Visualization 3: Electricity Consumption vs. Electricity Cost

Code
# Create a scatter plot comparing consumption and cost
ggplot(
  monthly_cost,
  aes(
    x = total_consumption_kwh / 1e6,
    y = total_cost_usd / 1e6,
    color = borough
  )
) +
  geom_point(alpha = 0.6, size = 2) +
  geom_smooth(
    method = "lm",
    se = FALSE,
    color = "black"
  ) +
  labs(
    title = "Electricity Use and Cost",
    x = "Electricity (million kWh)",
    y = "Cost (million USD)",
    color = "Borough"
  ) +
  theme_minimal()

Electricity Cost Summary by Borough

Code
# Calculate total electricity charges by borough
borough_cost <- monthly_cost %>%
  group_by(borough) %>%
  summarise(
    total_consumption_kwh = sum(total_consumption_kwh),
    total_charges_usd = sum(total_cost_usd),
    average_monthly_cost_usd = mean(total_cost_usd),
    .groups = "drop"
  ) %>%
  arrange(desc(total_charges_usd))

knitr::kable(
  borough_cost,
  digits = 2,
  col.names = c("Borough", "Total Electricity (kWh)", "Total Cost (USD)", "Monthly Average Cost (USD)"),
  caption = "Electricity Consumption and Cost Summary by Borough"
)
Electricity Consumption and Cost Summary by Borough
Borough Total Electricity (kWh) Total Cost (USD) Monthly Average Cost (USD)
BROOKLYN 5429743216 767550803 4651823.0
MANHATTAN 4765841703 690744229 4186328.7
BRONX 4300696913 617941543 3745100.3
QUEENS 1523393706 227532740 1378986.3
STATEN ISLAND 446389948 58551173 354855.6

Interpretation of Business Question 2

Electricity use and cost had a strong positive relationship. The correlation was 0.9319, meaning higher electricity use was generally linked to higher costs.

Brooklyn had the highest total electricity cost, about $767.55 million. Its average monthly cost was about $4.65 million.

Electricity bills also depend on utility rates and other charges, so correlation does not prove causation.

Key Findings

The analysis provides two main findings based on the business questions.

Question 1: Electricity Consumption by Borough and Over Time

Brooklyn had the highest electricity consumption, at approximately 5.43 billion kWh. Manhattan and the Bronx followed. Electricity consumption also changed over time across the five boroughs.

Question 2: Electricity Consumption and Electricity Cost

Electricity consumption and cost had a strong positive relationship, with a correlation of 0.9319. Higher electricity consumption was generally associated with higher electricity charges.

These findings are based on the cleaned and transformed NYCHA dataset.

Conclusion

This project studied NYCHA electricity use and cost in New York City. The original dataset had 553,666 records. After cleaning, 547,893 records were used.

Brooklyn had the highest electricity use, followed by Manhattan and the Bronx. Electricity use and cost were strongly related, with a correlation of 0.9319.

This project shows how R can help clean, organize, and understand real-world data.

Limitations

The analysis does not include building size, occupancy, or weather. These factors may affect electricity use, so the results do not measure building efficiency.

Video Presentation

This video presents my NYCHA Electricity Consumption and Cost analysis for DATA 607 Project 2. It briefly explains the data cleaning and transformation process, answers the two business questions, and summarizes the main findings, conclusions, and recommendations.

YouTube Presentation:
https://youtu.be/kY-j4vY_Za8

AI Use

I used ChatGPT to help organize the report, improve my English, and review the R code. I downloaded the original data from NYC Open Data and checked the tables and results.