Code Monkey home page Code Monkey logo

ukaccidents2016's Introduction

What

This repo contains a docker file and data for Road Safety published by Government of United Kingdom. The data used here (Road Safety Data) was published by Department of Transport, Government of U.K.

The dockerfile creates a postgres:latest container and creates several tables in the database. The central table is the accidents_2016. This has several foreign keys, some that refer to the tables generated using the codebook provided by GUK.

The codebook is called Road-Accident-Safety-Data-Guide.xls and an Excel workbook containing multiple sheets, each refering to integer codes used in some of columns in the dataset. Each worksheet (except the "Introduction") worksheet has been converted into individual csv files using the python script convert_codebook_to_csv.py, all of which will be uploaded to the database as individual tables.

Data can be obtained from: https://data.gov.uk/dataset/road-accidents-safety-data

Why

While trying to build dashboards with the dataset using Tableau (for Mac), Tableau kept crashing (without throwing a debug message). After scouring the web for such issues, I wasn't able to figure out why.

In the past, I have had no trouble using Tableau with Database based data sources, which I suspect is due to the fact that all the joins are executed by the database when executing my SQL query. Which is why, I decided to setup a docker container running postgresql 10 and having Tableau connect to that.

What can you use this for?

For whatever you want. What does this repo/setup use:

  • Docker CE
  • PostgreSQL
  • Data - published by Government of UK under Open Government License.

Clone this repo and run the following:

cd \path\to\repo
docker build -t ukaccidents2016 .
docker run -p 5432:5432 ukaccidents2016 

When connecting from Tableau/PowerBI, database type is PostgreSQL, username is accidentdata and password is 2016. Database name is ukaccidents_2016.

ukaccidents2016's People

Contributors

alokshenoy 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.