Giter VIP home page Giter VIP logo

wcdatadash's Introduction

WCGoals DataDash

Intro

Using goals scored data from the Fifa World Cup 2018 in Russia. I have created a data dash-board using D3.js, DC.js and Crossfilter. The site has been created with Python using the Flask web framework, and has been deployed using Heroku.

As the charts update upon filtering, you can explore patterns in how the goals were scored based on a variety of factors. Such as the minute scored, the current round, the country or continent etc

Visit site..

To use

The page boots with a tutorial upon visiting. Follow the simple instructions to use.

Creation

My initial setup and help with deployement owes to sahildiwan's blog. I gained inspiration from his app file setup and changed the routes to fit my need.

Installing on your machine

First you will need to get pip and Postgresql

CD to your desired folder and run the following from the terminal:

git clone https://github.com/danieldeiana/wcdatadash.git

Activate the virtual environment:

. myenv/bin/activate

To run the app locally go to the app.py file in the root folder and change the LOCAL variable to True. Then run the app from the terminal:

python app.py

and visit local host in your favourite browser.

To run the tests go to the root folder in the terminal and run:

python tests.py

Use data locally

If you would like to use the goals data locally you can link to it as so..

At the top of the app.py file, import urllib

Change the get_goals_json() function from this:

@app.route('/goalsdata')
def get_goals_json():
    """
    When accessing this route, the serialized Goal object is provided
    """
    return goals_to_json(Goal)

to this:

@app.route('/goalsdata')
def get_goals_json():
    """
    When accessing this route, the serialized Goal object is provided
    """
    link = 'https://wcgoals-datadash.herokuapp.com/goalsdata'
    open_link = urllib.urlopen(link)
    goals_data = open_link.read()
    return goals_data

wcdatadash's People

Contributors

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