Project 3

Introduction

This project was made with the purpose of showing several features (such as gas consumption, electric consumption, building height, etc.) for each census block and tract in Chicago.

Going to application, you are brought to the first page of the website.

This is a dashboard of information about the Near West Side. Here there is a map with information about each building, two tables showing electric and gas usage for the Near West Side divided into months. The two graphs at the bottom plot the data that is shown in the tables to illustrate the change in usage over the entire year.

Some of the things that you can do on this page is select a category to filter the data by. There are options to filter by electric, gas, building age, building height, building type, and total population for the block. When filtering by gas and electric, the user has the option to filter this data further by month. By default the gas and electric data is shown as a sum of all months, or "total".

The next page is the Block View page.

The Block View page has all the same features as the initial page with a few additional features, however the main focus of the page is to compare two Chicago census blocks. In order to save space, all the tables and plots were put under a tab in their respective side.

By default, Near West Side is shown on the left and the Loop is shown on the right. One of the new features implemented on this page is that the user can select the community shown on each side, which changes the map view, tables, and graph showed on the selected side. The other new feature that was implemented on this page is that the user can change the palette of the legend if they want to see the data in the new color.

The final page is the Tract View page.

On this page, the layout is essential the same as the Block View page with two views on each side. The only difference between the previous page and this page is that the user can select a tract instead of the community

Data

Data Origin

The data has two places that it can be downloaded from. It can either be downloaded from kaggle or from the Chicago Data Portal.

Data Info

The data that is downloaded has columns pertaining to community name, census block, building type and subtype, the totals for electric and gas data, statistical data for gas and electric, building information, population, and building occupation percentages.

Data Cleaning

Data was already relatively clean, so all I had to do was grab the columns that were necessary to use for the project. These columns are Community Name, Census Block, Building Type, Total KWh for each month as well as Total KWh, Therms for each month as well as Total Therms, Total Population, Average Stories, Average Building Age, Occupied Units Percentage, and Renter-Occupied Housing Percentage.

One small thing I had to change was a column name. "TERM APRIL 2010" is supposed to be "THERM APRIL 2010".

Running the Program

  1. Download the source code from Github

  2. Download and install R from here

    1. Make sure the version is 3.0.1 or newer, preferably the most recent version

  3. Download and install RStudio Desktop

  4. Once RStudio is installed, we need to install some packages. In the console, type and press enter on the following

    1. install.packages("shiny")

    2. install.packages("shinydashboard")

    3. install.packages("ggplot2")

    4. install.packages("leaflet")

    5. install.packages("mapview")

    6. install.packages("tigris")

  5. Once the libraries are installed, you can run the application by pressing "Run App" on the upper right corner of the text window. A window will open and your application will be running locally!


Interesting Finds

One thing I noticed is that the height of the buildings tend to be higher the closer the proximity to downtown Chicago. From the plots, I found out that gas and electric usage is highly affected by the time of year. Gas usage tends to be at the lowest during the summer months and at its highest during the winter months. For electric usage, there always seems to be a peak during the summer around July, then shoots really low during October, and then shoots up again during November and December.