Giter Site home page Giter Site logo

uk_ghg_emissions_dashboard's Introduction

Interactive Dashboard: UK Emissions by Industry

Introduction

This repository contains an interactive dashboard which allows users to explore the greenhouses gases emitted in the UK. The source of the data is: ONS 1990 - 2018 UK emissions. The interactive dashboard is live and hosted at: shinyapps.io.

Project and Aims

Data regarding the greenhouse gas emissions of various UK industries was made public by the Office for National Statistics. The aim of this project was to examine the dataset and create an interactive dashboard to display:

  • the trend over time for a given emission type (GHG) and industry
  • a breakdown of industries for a given year

Cleaning Process

For each GHG

  1. The data is read from the atmoshpericemissionsghg.xls spreadsheet, which contains separate sheets relating to each GHG and a totals page.
  2. The data is passed through a function that converts it to a tidier form by:
    • renaming columns to appropriate names
    • taking a subset of only the desired data
    • pivoting the data to long form
  3. The clean and tidy data is written to a csv in the clean data directory

A new file was made to contain the total emissions across all industries for each GHG. These values were included in the raw data. Each GHG and the total of all GHGs is extracted from the raw data, cleaned and tidied as above, and then combined into one dataset containing all of the totals.

How to Run the Project

The dashboard is live and can be explored at shinyapps.io .

To run the project locally:

  1. clone this repository
  2. open the R project file: uk_emissions_dashboard.Rproj in RStudio.
  3. Open either
  4. Click "Run App" or enter the command:
shiny::runApp()

Exploring the dashboard

The initial view of the dashboard: Dashboard Top

There is additional information at the bottom of the dashboard. The decision was made to keep all of the information on one tab for ease of use. Dashboard Bottom

At the top of the dashboard:

The user can select a particular greenhouse gas and the plots will update automatically: Select Emission

On the left-hand side:

The user can select a particular industry and then the plot showing the emissions over time would be displayed. Select Industry

On the right-hand side:

The user can also enter a year and then a plot showing a breakdown of all the industries and the emissions for each industry. Select Year

On the Industry Constituents tab:

The user selects a greenhouse gas, a year, and a degree of resolution. An adaptive sankey network illustrates the constituent elements of each industry. The user can hover over links or nodes on the network for more information.

Industry Constituents

Packages Used

The cleaning script and dashboard elements were written in R using RStudio, making use of the following packages.

Library Version
tidyverse 1.3.0
assertthat 0.2.1
assertr 2.7
shiny 1.5.0
shinydashboard 0.7.1
RColorBrewer 1.1.2
networkD3 0.4

uk_ghg_emissions_dashboard's People

Contributors

dc27 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.