Skip to content

cameronlai/ath_res_vis

Repository files navigation

Athletics Results Visualization

Athletics Results Visualization is a Django app built to visualize athletics results of individual athletes It curretnly uses data from the HKSSF website. It uses chart.js as the javascript plotting tool.

Set up

  1. Start Django Project
django-admin startproject ath_res_vis_project
cd ath_res_vis_project
  1. Clone the git repository
git clone https://github.com/cameronlai/ath_res_vis
  1. Edit settings.py in your project folder
cd ath_res_vis_project
nano settings.py

Add 'ath_res_vis' in INSTALLED_APPS Add 'ath_res_vis/static/', in STATICFILES_DIR

  1. Edit urls.py in your project folder
nano urls.py

Add url(r'$^', include('ath_res_vis.urls')), to urlpatterns

  1. Run migrations with manage.py
cd ../
python manage.py migrate
  1. Dump athletics results data into Database

    • The data used are in PDF formats and they are copied into text files.
    • process_data.py parses the data into a sqlite database format.
    • export_sql.py copies the data from one database file to another.
    • Data can be found from this link.
    • You may write your own parser and reuse the web visualization part for other data.

Running Django app

  1. Run server
python manage.py runserver
  1. Launch web browser, enter correct IP address (Default is 127.0.0.1:8000) and your app is running.

Database format

The database is in the following format as in models.py

Field Name Description
Name Name of the athelete
School Name of the school the athlete is representing
Event Name of the event the athelete completed (e.g. 100m)
Sex Sex of the atehlete
Result Results of the athelete (either in seconds or meteres)
Date Date of the event completion
IsTrack True = Track event, False = field event

Dependencies

  • Chart.js

License

The app is released under the MIT License and more information can be found in the LICENSE file.

Contributions

ath_res_vis is a project to help people visualize athletics results more easier, instead of looking up multiple PDF / old text formats. Contributions for improvements and bug fixes are sincerely welcome!

About

Athletic Results Visualization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published