Giter Club home page Giter Club logo

futbol's Introduction

Futbol

  • This project is designed to be a collaborative project.
  • Participants are encouraged to understand and implement OOP principles in order to meet project test time requirements.
  • Participants will be accessing and organizing data from csv files in order to create sport analyst style method outputs.

Project Structure Overview:

Stat Tracker Initialization

  • When we initialize the Stat Tracker class, we use the Csv module to create a table with the information from the CSV files by creating an object for each line of data. We feed in the data in the form of a hash, and the corresponding class instantiates the objects.
  • For the game files and teams files we created hashes where the game_id and team_id act as keys and each object is the value. For the game team files we created an array because the game_ids are not unique.

alt text

Calling Methods On Stat Tracker

  • While all the methods live in the Stat Tracker, when a method is called it will make a call on the corresponding statistics class. For example, if we call the best_offense method from the Stat Tracker, it will call the League Statistics class, which in turn inherts a helper method from the League Stat Helper class to return the value requested.

alt text

Special Note: In order to run in under 5 seconds in the RSPEC test, please close all other applications.

alt text

Contributors:

Starter repository for the Turing School Futbol project.

  • optional: install SimpleCov to test

futbol's People

Contributors

stillsheryl avatar foymikek avatar joselopez235 avatar memcmahon avatar

futbol's Issues

Create worst_offense method

Name of the team with the lowest average number of goals scored per game across all seasons. returns string

Create average_goals_per_game method

Average number of goals scored in a game across all seasons including both home and away goals (rounded to the nearest 100th)

Return value - Float

Create team_info method

A hash with key/value pairs for the following attributes: team_id, franchise_id, team_name, abbreviation, and link

Return value - Hash

Create best_offense method

Name of the team with the highest average number of goals scored per game across all seasons. returns String

Create rival method

Name of the opponent that has the highest win percentage against the given team.

Return value - String

Create average_goals_by_season method

Average number of goals scored in a game organized in a hash with season names (e.g. 20122013) as keys and a float representing the average number of goals in a game for that season as values (rounded to the nearest 100th)

Return value - Hash

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.