It's Dressage Data Week!
But before we get into any cool data stuff, I wanted to walk through the beginnings of the project and what it took to get to this point. This might be quite boring, just warning you. Tomorrow we'll dig into the results.
| This guy got two weeks off while I was gone! Little did he know that the entire time, I was thinking about him and running data analytics on his dressage scores |
Setup and Data Cleaning
Data Entry
The first thing I did was to map out my database on my ipad. I started to input every single test, using google sheets to store it. I knew I wanted to be able to manipulate the hell out of it, so everything that could have warranted a table became a table. My tables: - Overall Results
- Primary Key: overallresultsid
- Foreign Keys: showid, showtestid, testid, horseid, judgeid
- This table had a single record for every test and became my main table
- Collective Scores
- Primary Key: overallresultsid
- Foreign Keys: showid, showtestid, testid
- This table could have been combined into overall results, but for some reason, I decided not to do that.
- Individual Scores
- Primary Key: overallresultstestidmovement
- Foreign Key: overallresultsid, testid, testidmovement
- This is the insane table, every record is a single movement on a single test sheet that I rode with the comments
- Show
- Primary Key: showid
- Foreign Keys: facilityid
- This is the table for just the show itself, it has the start and end date as well as the show name
- Show Judge
- Primary Key: showid
- Foreign Keys: judgeid
- I decided to use a separate table to connect the judge with the show, there was a reason for this that I'm forgetting, but this table has the judge's rating in it
- Judge
- Primary Key: judgeid
- Foreign Keys: NA
- This table just has the judge's name, gender, and the year they were born (which I have very incomplete data for)
- Horses
- Primary Key: horseid
- Foreign Keys: NA
- Horse info, I have the horse's show name, barn name, year born, and breed in there
- Tests
- Primary Key: testid
- Foreign Keys: NA
- This table is one record per test with the test's year and total points as well as the level and test number
- Test Movements
- Primary Key: testidmovement
- Foreign Keys: testid
- This was another big table, I inputted every test movement into this table and categorized the movements into general movement categories
- Facilities
- Primary Key: facilityid
- Foreign Keys: NA
- This table just has facility info in it, at this point it's just zip code but later I want to have categories like number of arenas or maybe a spookiness rating to try to account for show facilities that may be a bit spooky!
Data entry took me a long time. I opted to do only rated tests but apparently I have received 102 tests (some were with two judges so not 102 rides) at rated shows from 2004 until 2020. That's insane. But I did this while I was on leave and was super burnt out. Highly recommend doing something like that while watching TV to make yourself feel like you're being productive without using your brain.
After that I threw it into Tableau to play with and then decided that I didn't like Tableau that much, then started really focusing on my job hunt and ignored the data from then on.
Initial Code/Database Setup
- Primary Key: overallresultsid
- Foreign Keys: showid, showtestid, testid, horseid, judgeid
- This table had a single record for every test and became my main table
- Primary Key: overallresultsid
- Foreign Keys: showid, showtestid, testid
- This table could have been combined into overall results, but for some reason, I decided not to do that.
- Primary Key: overallresultstestidmovement
- Foreign Key: overallresultsid, testid, testidmovement
- This is the insane table, every record is a single movement on a single test sheet that I rode with the comments
- Primary Key: showid
- Foreign Keys: facilityid
- This is the table for just the show itself, it has the start and end date as well as the show name
- Primary Key: showid
- Foreign Keys: judgeid
- I decided to use a separate table to connect the judge with the show, there was a reason for this that I'm forgetting, but this table has the judge's rating in it
- Primary Key: judgeid
- Foreign Keys: NA
- This table just has the judge's name, gender, and the year they were born (which I have very incomplete data for)
- Primary Key: horseid
- Foreign Keys: NA
- Horse info, I have the horse's show name, barn name, year born, and breed in there
- Primary Key: testid
- Foreign Keys: NA
- This table is one record per test with the test's year and total points as well as the level and test number
- Primary Key: testidmovement
- Foreign Keys: testid
- This was another big table, I inputted every test movement into this table and categorized the movements into general movement categories
- Primary Key: facilityid
- Foreign Keys: NA
- This table just has facility info in it, at this point it's just zip code but later I want to have categories like number of arenas or maybe a spookiness rating to try to account for show facilities that may be a bit spooky!
This honestly was the most annoying part of it and it's why I procrastinated on it for fourteen months. My first step was to download Python and VS Code, get them to stop ignoring each other, then install a whole bunch of extensions. One was SQLite, which allowed me to upload the data to a little local database. I also needed some python libraries, below all of my code is written using the pandas library.
![]() |
| The data path points to where I put my sqlite database, I'm not going to go into that code because it was insane and also not my code anyway |
Data Cleaning
This was not that bad given that I was the person who did all the data entry and I knew I didn't want to do too much data cleaning. I just had some minor things to deal with, which was a great way to learn some very basic python/pandas.
I ended up recreating the score column because the original data type wasn't particularly helpful. I didn't feel like dealing with explaining to pandas how to handle the percent sign, so I just made a new column.
| Score |
I had a few instances where I called a movement with different capitalization (Leg yield vs Leg Yield and Half pass vs Half Pass) so I decided to put all of those into lower case.
![]() |
| Helpful! It was easy to find all this code by just searching for the pandas equivalent to the SQL code I already knew |
I also inputted two scores wrong, one gave us a 114% and one gave us a 14% so that didn't quite balance out. Luckily I had taken pictures of the tests and was able to update those to normal scores.
![]() |
| Whoops lol |
And finally, I did a lot of datetime extractions so that I could look at various times.
Function Creation
After the data was cleaned and ready to go, I started analyzing it. And stopped. And then started again, this time building a function.
I wanted to just observe the data, come up with some good questions. And so I wanted to look at aggregates.
![]() |
| My function for the descriptive stats |
And finally, it was time to use this function to do some really basic descriptive statistics!
![]() |
| More on these tomorrow! |






