NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > R > Climate Change Visualizing the Green New Deal with R Shiny

Climate Change Visualizing the Green New Deal with R Shiny

Sam Collier
Posted on Jun 2, 2019

Project GitHub | LinkedIn:   Niki   Moritz   Hao-Wei   Matthew   Oren

The skills we demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

New York has pressed on with environmental legislation while the nation dawdles - where and by whom will the impact be felt?

Shiny app | GitHub

As mentioned in my last post, effective and timely Climate legislation will be a key weapon in the battle to keep greenhouse gas emissions at sustainable levels and avoiding an ecological crisis. This will involve both supportive policies for new clean technologies and business models as well as measures to phase out the worst contributors to the problem.

New York City's Climate Mobilization Act is packed full of the latter, with hints of the former. Overall it is an attempt to keep the city in line with emissions targets set by the Paris International Climate agreement, particularly important for the city given its vulnerability to rising sea levels. Mayor Bill De Blasio's own Office of Sustainability said "Protecting New Yorkers from climate change is not optional.". You can read and hear more about the act on the front page of the app.

This visualization and its later iterations have value for any business in the city seeking to understand how they might be affected. Conversely, it also represents a way for energy companies to map possible opportunities. If they can better understand who will have to make significant energy efficiency upgrades as a result of the new laws, they can market products more efficiently.

Structure

Overview

The visualization is built using ShinyDashboard, with three tabs. The first gives an overview of New York State's current emissions situation, and some more information on what exactly is specified in the main components of the new act. The press release can be found here. The other two tabs go on to examine two specific bills.

The GoogleVis chart on this page gives indicative numbers for where New York State's emissions have come from, and where current plans might mean they come from in the future - the data for this comes from the State's Department of Environmental Conservation. Here I have included fossil fuel combustion in residential, commercial or industrial properties, as well as for electricity, all under the buildings category, while the industry category contains emissions as a result of industrial processes. The fundamental takeaway from this chart is that although progress has been made, if the state is to meet its own emissions reduction targets by 2030 it must do approximately 3 times as much work in 10 fewer years than it did from 1990 - 2015.

Buildings

The second tab in the app examines the so-called "Dirty Buildings Bill", which requires buildings over 25,000 square feet to cut emissions by 40% by 2030, and 80% by 2050, by retrofitting new windows and insulation. The questions I really wanted to be able to answer with this tab were which areas, and what types of property, have the most to do when it comes to emissions reductions.

This tab uses building benchmarking data from NYC's Office of Sustainability. This was relatively easy to clean. Using the filters on the right hand side updates the GoogleVis scatter plot and ggplot histogram, allowing the user to examine distributions of building sizes and emissions. The outliers button is necessary to make the visualization clearer - the dataset is self-reported and there are clearly some errors. Finally, the infobox in the top right hand corner updates as the user filters to show the average annual emissions of the buildings selected.

There is a lot of exploring that can be done with this tab. A few general results are:

  • Offices, data centres, residence halls and hotels rank amongst the biggest greenhouse gas emitters, K-12 schools and distribution centres were surprise entries at the low end of the ranking
  • Manhattan has the highest average building emissions, and the highest average emissions intensity (emissions per square foot), while Brooklyn has the lowest of both of these metrics
  • Newer buildings generally have lower emissions, and more significantly, lower emissions intensities

Buses

The final tab in the project analyses a bill (which requires another vote) to convert all school buses to electric within 20 years, part of New York City's goal to switch all public buses to electric by 2040. Here the aim was to see which boroughs currently suffer from the worst pollution, and hence would benefit most from less exhaust fumes.

There are three layers to the interactive leaflet map. The yellow circles denote the positions of school bus garages, and their radius is proportional to the number of bus routes operating out of that garage. The brown circles similarly denote the positions at which pollutants are measured, their radius again being proportional to the total number of pollutants measured there. The choropleth of the boroughs shows the level of different pollutants associated with exhaust fumes (Carbon Monoxide, Hydrocarbons, Particulate Matter etc.). These can be selected on the right hand side and for some pollutants the type of sample also needs to be chosen.

This tab was harder to build. The data came from two separate sources; school bus information came from NYC Open Data whilst the air quality data came from the Environmental Protection Agency. The two unfortunately used different coordinate projections to locate the garages and pollutant measurements, respectively, so required some pre-processing before the pollutant data could be joined with the shapefiles. The borough shapefiles themselves came from the US Census Bureau.

A couple of conclusions from exploring this page:

  • There are large concentrations of school bus garages in areas of Queens, The Bronx and Brooklyn. Electrifying these will put large strain on the electricity networks in these areas. Effective local flexibility technologies like energy storage may be required to ease the transition.
  • Across the main vehicle pollutants, Queens seems to do the worst and hence has most to gain from more electric cars on the city's roads

Conclusions and further work

The first conclusion that should be highlighted here is that whilst the Climate Mobilization Act is a step in the right direction, it is still a small step compared to the scale of the challenge. Averting climate breakdown will require many more of these policies - this is the start of New York's climate change fight and not the end!

The app in its current form can be used to used to identify those areas, and in the case of the buildings data, those property segments that will be most affected by the new legislation. However, this only explores 2 of the 10 bills in the act, in the future I will expand this. My first target will be the bill investigating how to wean the city off fossil fuels. Looking at the data for wind/solar potential in the surrounding area and at sea could be very interesting. I would also like to introduce some way to tie the effects of the bills together, to try to get a concise overall picture of the impact of the package.

The buildings data unfortunately only lists buildings above 50,000 square feet, however as of next year this will be revised down to 25,000 square feet, which would make that data set even more relevant. Additionally, you may notice that Manhattan lacks a number of the pollutant measurement observations - a pollution data set with less geographically coarse measurements would be beneficial if it could be found.

About Author

Sam Collier

Sam Collier hails from across the pond where he earned both a First Class BSc and an MEng in Engineering Science from the University of Oxford, specializing in energy engineering. While in London, he did some work for...
View all posts by Sam Collier >

Related Articles

Data Visualization
Data Insights on US Gun Violence
R
Vision Zero: NYC Traffic Collision Prevention Plan
R
U.S. Cancer Research & R Shiny Application
Data Visualization
Data Science For Good: Identify which schools needs help
Student Works
Data Study on Cardiovascular Diseases and Risk Factors

Leave a Comment

Cancel reply

You must be logged in to post a comment.

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application