USPSA classification data

I’ve recently started doing a lot of USPSA shooting.

One of the main things that USPSA does for local matches, is provide a classification system. The classification system is used to determine a competitor’s skill level and group competitors of similar skill levels into classes, so competitions have more results and dimensions than just one person who beat everyone else.

Loke from gunbot has a great video showing the difference between shooters in the different classifications

Now, recently I’ve been training hard with a friend, in order to climb up the rankings. The results so far are:

Date Number Club F Percent HF Entered Source 10/08/17 08-03 CENTRAL JERSEY RIFLE & PISTOL CLUB Y 54.6545 6.0120 10/29/17 Stage Score 10/08/17 09-13 CENTRAL JERSEY RIFLE & PISTOL CLUB B 32.0900 2.8881 10/29/17 Stage Score 9/16/17 13-01 WEST SHORE PRACTICAL SHOOTERS D 42.1860 4.7493 9/19/17 Stage Score 9/09/17 03-08 CENTRAL JERSEY RIFLE & PISTOL CLUB Y 51.3491 5.7511 10/02/17 Stage Score 9/09/17 13-01 CENTRAL JERSEY RIFLE & PISTOL CLUB Y 43.4473 4.8913 10/02/17 Stage Score 8/13/17 13-05 CENTRAL JERSEY RIFLE & PISTOL CLUB Y 43.5864 5.2448 9/04/17 Stage Score 8/13/17 99-23 CENTRAL JERSEY RIFLE & PISTOL CLUB Y 41.0794 5.9524 9/04/17 Stage Score

So, the trend has been upward, reflecting all the practice that I’ve put in. Over 8 weeks I’ve increased my percentage by 13% - moving from the bottom of C class, to the top of C class and close to breaking into B class (60%).

The issue is, USPSA’s website is pretty archaic. The above dataset was directly copied and pasted from the USPSA site. Being a software engineer, I wanted to play around with the data and create some visualizations.

Trying to actually scrape the classification data from USPSA’s site however, is AWFUL. USPSA does not offer an API, but they do provide a public web page where you can enter a USPSA identification number and it will pull results. There is a TON OF DATA just waiting to be poked at.

The issue is that USPSA’s site is straight out of the 90’s - with the site using HTML tables to build the layout for the site. Which means I have to write a program that uses an HTML parser to parse the entire webpage, look for specific markers to differentiate between an HTML table that is being used for visual presentation, and an HTML table that contains the actual classification data.

I am currently using BeautifulSoup to parse the webpage, and the code is very brittle, since HTML tables on the page are being used for both the visual presentation of the site, as well as for data.

There’s a parody site called The Feed Ramp that had an article making fun of USPSA’s website, and when I first read it I had not really used USPSA’s website for anything but viewing classification results.

Now that I actually want to pull data from USPSA’s website the Feed Ramp article becomes funnier because it’s so true!

Practiscore, another big scoring system in the shooting sport scene is also hard to pull data from. They also do not publish a developer API, so you’d have to scrape the data from Practiscore via BeautfulSoup. I have not tried to pull data from Practiscore yet, but I assume since Practiscore is newer, it might be a little easier to extract the data since Practiscore uses CSS for presentation, and the only HTML tables on a page are tables that contain data.

A couple people have asked the Practiscore developers about an API on numerous occasions but it doesn’t appear to be high priority for them.

ShootNScoreit does advertise an API, for what it’s worth, but I don’t know if anyone uses their software.