bassurvey.blogg.se

Theme park incidents
Theme park incidents








  1. THEME PARK INCIDENTS HOW TO
  2. THEME PARK INCIDENTS PDF
  3. THEME PARK INCIDENTS UPDATE

# Each date has a space after it so I split on that space to get a date column Incidents = pd.DataFrame(splitlist, columns = ) #Convert my list of lists into a one-column data frame # This giant clumsy regex is to get rid of all the theme park names that snuck into the copypaste With open("unformatted_incidents.csv", 'rb') as csvfile: # I use the csv module here to read in the file because pandas was doing too much formatting for me After a long time figuring out the regex for a date, I just started reading through regex tutorials which was really boring but really useful! From there I started pulling out whatever information I could using any patterns I could see. Started with a date that had a space in front of it. Thankfully there was at least a tiny bit of standardisation in the file – each line

THEME PARK INCIDENTS HOW TO

I tried to just read it in using pandas at first, but there were way too many random commas for it to handle. That left my only option being importing the whole thing as strings, stick all the strings together and figure out how to split it myself. Python is much faster dealing with strings than R, and pandas is a really useful (and R-like) module to make data handling even more simple. This decision was mainly because Credit:

theme park incidents

To get this data into some sort of shape I decided to use the regex functions provided by re and pandas modules in Python. So I decided to do something unforgivable and just copypaste the whole thing into a spreadsheet – definitely not scalable! Little did I know that scalability would be thrown out the window very quickly as I started working with it in Python.

theme park incidents

THEME PARK INCIDENTS PDF

Unfortunately that fell apart really quickly as I realised it was a pdf file and pretty much impossible to read with my current skills.

THEME PARK INCIDENTS UPDATE

I thought this was a bit of luck! If they were just updating the same page then I could theoretically set up a script to check it each quarter and update my data sheet. Some Google searching managed to turn up some reports from WDWinfo and the Orlando Sentinel (not available in EU) which seemed to link to a Florida government site that has one document that appears to be continually updated through the same link.

theme park incidents

Get in touch through the contact page if you’d like a copy of the original data or the final cleaned version to play with. In this article I’m going to tell you how I found the incidents that have been reported to the Florida Government, cleaned most of it and converted it to a spreadsheet that I could actually analyse with some basic plots. In a world that seems so inherently dangerous but sells itself on being safe, I’ve been really curious what the data actually said. I’ve been interested in finding incident reports since I started writing this blog.










Theme park incidents