/teneo-cfb-data

college football data

Primary LanguagePython

cfb-data

11/21/2019 SPECIAL NOTE:

This code has been broken for about a month until now. It is working again. The issue was how I was calculating the series record for matchups between two teams that hadn't played against each other before (in the year range set in the config.ini). This became an issue when Georgia was scheduled against Texas A&M.

Summary:

Python code used to pull data related to FBS college football teams.


Vision:

I'm building this project on a raspberry pi (4B) with the vision of having the device left on permanently and using crontab jobs to notify me of college football events that I am interested in (such as forward and retrospective schedule or game results information for selected teams).

I am initially building in some customizability via a config.ini file (read further for more info), including the customizability of outgoing email server for notifications.

In the longer run, I would like to use this as stepping stone into a similar project for college basketball. I'd also like to implement a database to handle record storage and processing. In late October, I selected MariaDB as the database solution (a MySQL replacement), because I am using Raspbian Buster on an ARM architecture which has limited my options. Additionally, I am already familiar with the assocaited Python packages used in a MySQL-enabled stack.


Cloning / Installation:

When cloning this repo, ensure you rename config_template.ini to config.ini and populate the values as described in the comments in that file. The code will not function without the necessary values.


Packages / Requirements:

This repo is built to minimize specialty package requirements. If I've been successful, the code will not require any special package installations to run the notification processes. The following packages are used, but were pre-installed with my Python 3.7 installation on Raspbian Stretch:

  • os
  • sys
  • configparser
  • numpy
  • pandas
  • requests
  • datetime
  • smtplib
  • email
  • dateutil

    Note that as this project progresses into the future, there will also be ingestion processes that will be used. Those ingestion processes are expected to require the following:

  • Python packages:
    • sqlalchemy
    • mysql-connector
  • Database:
    • MySQL or MariaDB database with write access
    • A specail dbconfig.ini file to define connection params (not yet created in this project)

    This project gratefully leverages the following other projects:

  • api.collegefootballdata.com for:
  • www.sports-reference.com for:



    Go Deacs!