Turnout and other Analytic Statistics

Hi SUG Members,

Especially those who are interested in producing demographic insights and/or club turnout statistics.

I have modified/enhanced a Python script put together by Andy Barrow, a Sailwave user in Mexico, which could extract data from a Sailwave created JSON file and load the data into a MySQL/MariaDB database.

Andy’s Python script only extracted competitor data and the expected JSON file name is hardcoded into the script. My changes:

  • create an SQLite database file
  • added the extraction of race and results data as well
  • added specification of the JSON file name as an argument on the command line
  • added capability to include on command the the name of the database file to be created, otherwise if not specified the SQLite database file is given the same name as the JSON file with a .db extension

There are some caveats:

  • The competitor data extracted is most of the default competitor information and not any ‘Extra competitor fields’ if been checked on Setup | User interface or other competitor information that may be available if other options on Setup | User interface have been checked.
  • Race information does not included start(s) information.
  • Only been tested on Linux systems.
  • Python v3.x has been used to develop and test this Python script.
  • No help on creating SQL queries to extract demographic or turnout statistics

A short guide to using the script has been written.

If you are interested in getting a copy of the Python script, then get in touch.

Kind regards,
Huw