Resources

Joseph Richey - Leveraging Data in a Volunteer Fire Department

The majority of fire departments in the United States are volunteer-based organizations. As an emerging professional in the field of data science, I was able to help my local fire department track, manage, and analyze data using R Shiny, Python, and AWS. This has allowed for increased efficiency within the department, and better transparency for fire department and local government officials. Talk by Joseph Richey Slides: https://docs.google.com/presentation/d/1JjjjfDBox7W1MK6CwBmu3cIFpzSEnLu_/edit?usp=sharing&ouid=117509225446346298730&rtpof=true&sd=true GitHub Repo: https://github.com/JosephRichey/fire-data

Oct 31, 2024
19 min

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

My name is Joseph Richey, and when I'm not working at my day job as a data analyst, I'm a volunteer firefighter.

It's June 20th, 2024, at 8 11 p.m. I'm sitting with my lovely wife eating dinner, when all of a sudden my pager goes off. Yes, it's 2024 and we still use pagers. I am quickly up and glance at my phone to see what we're headed to. Structure fire. I'm out the door moments later, running to the fire station that's about half a block from my house. I get there, start throwing my gear as others stream in and do the same. Four and a half minutes after we're paged, we're headed out the door, a fire engine full of firefighters, heading to our neighboring town to fight a house fire.

On the way, my heart is pounding. I try and focus, listening to the radio to find out what we're headed to. Where is the fire? How bad is it? Are there people still left inside? I talk with my captain and get my final instructions before I, before we get there, and then mask up so that I'm ready to go right when we get, when we arrive. Over the next four hours, I fulfill various roles fighting the fire, turning off gas to the house, standing by on the rapid intervention team, and pulling down ceiling, making sure that all the embers and hotspots are completely out.

By the time we get home, it's after midnight. Everyone is safe, the fire is out, and we're all tired. But like many things in life, there's still one thing left to do, all of the paperwork.

Volunteer fire departments and data challenges

The majority of fire departments in the United States are like mine, volunteer-based organizations. The last estimate put almost 70 percent of fire departments staffed completely by volunteers. Volunteer fire departments are really, really important because they protect a section of the country that full-time fire departments just can't. It doesn't make sense to put a full-time fire department in my town of 800 people like it would in a town of 8,000 people. Because we're volunteers, this is not what we do for a living. We have day jobs, we have other responsibilities. This is what we do in our evenings, on weekends, and what little free time we have. But just because we're volunteers doesn't mean we train any less hard than the full-time firefighters. We're certified to the same standard and we do a lot of work to make sure that we are certified.

As a volunteer fire department, we often don't have the resources that a full-time fire department has. This becomes especially true when you start to look at data.

As a fire department, there's certain data that we just legally have to have. Some of that relates to the Federal Emergency Management Agency, or FEMA. After we go on any type of fire incident, we go to a lovely government form and enter in data very manually, and then send it off. We provide the data, but it's difficult for us to use. We don't really retain a copy that's helpful for us. There are other categories of data. There's patient data, there's training data, there's all of this data. And it just really wasn't in a spot that we could leverage it to the best of our abilities.

So where did we start? When I joined the Carin Fire Department a little over a year ago, I walked into my very first Tuesday night drill. We drill for two hours a week in the evenings to practice anything from how to manage a cardiac arrest, to how to extricate a patient from a vehicle, or how to run some of the pumps on our brush trucks. When I showed up, there was a piece of paper on a clipboard and I wrote my name down. This is how we used to track attendance. Now if we were really, really lucky, somebody would remember to write down the date of that training and what we were training that night. That paper would then get stuck in a filing cabinet that might or might not have looked like this, or it would get shoved in the back office in a stack of papers, or it would end up who knows where.

Additionally, when we'd come back from one of our calls or one of our incidents, we'd get back to the station and go to a whiteboard that's hung on the wall next to our ambulance. On this whiteboard, we'd write the date, what we responded to, and who was at the call. This would then hopefully get taken a picture of on someone's phone, it would then get texted to one of the captains, and all of this data would then get entered very manually into a spreadsheet that is still actually only on one laptop, and that really makes me nervous. This took a lot of time, especially from this one captain that had kind of stood up to be our data guy. Again, a lot of time unpaid as a volunteer.

Now we didn't just track this data because it was just so much fun, we tracked it because we needed it. As a volunteer in the state of Utah, in order to respond to structure fires, wildland fires, and EMS calls and be minimally certified, it takes 64 hours of continuing education every year. That's a lot of time, and these Tuesday evening drills we have go a long way to making sure we can meet those requirements. Additionally, as we plan for our little community, it's really important to know how many times our services are needed.

A couple years ago, there was an idea to put a couple full-time, or sorry, part-time firefighters at our station Monday to Friday, 9 to 5, because this is a really tough time for volunteers to cover, as a lot of us are at work. The city started to ask questions, and they were good questions. Things like, how many calls have you responded to? What time of the day did it happen, and what types of calls were they? Were they calls for EMS? Were they calls for fire? We didn't really have a great way to answer that question. All of the data was there, but it wasn't in a usable format. This was a problem.

Designing a solution for firefighters

As data analysts, data scientists, and whatever data person you might identify as, our job is to solve problems at its root. I proposed that by decreasing repetitive work, making data entry user-friendly, and leveraging the data, we could solve this problem. I had to start with a question that I actually thought quite a bit about the first few weeks as I began to think on this. How do you get firefighters to record data? Firefighters and data scientists, as you might guess, come from different worlds. You might call a firefighter to put out this fire, and you might call a data scientist to put out these fires.

In order to get firefighters to record data, I knew there was a couple principles that I would have to apply. First, there had to be the minimum input. Everybody loves sitting down and spending 15, 20, 30 minutes entering data, right? Yeah. If this was going to take any amount of time, it wasn't going to work. It had to be the minimum input. Secondly, it had to be self-explanatory. If we needed training every time something changed in the system, or we needed technical documentation, it just wasn't going to get used. And finally, it had to be accessible. This wasn't something that we were going to have time to break out laptops on, or we had to be at the station to use the station computer to work. This had to be something really agile.

So, in order to solve this problem, to meet these requirements, and also with no money, and also with just me to rely on, we turned to Shiny. Shiny was a great solution for this. And so, I began to build a Shiny app. That Shiny app quickly became three Shiny apps. And so, now we have a Shiny app that helps us track our attendance on Tuesday nights. We have one that we record our incidents in, or our calls. And finally, we have a data portal used by officers and administrators to generate reports, manage rosters, trainings, etc.

In order to solve this problem, to meet these requirements, and also with no money, and also with just me to rely on, we turned to Shiny.

The Shiny apps in action

So, now, if you were to come to Corrine, Utah, at 6 p.m. on a Tuesday, and come to our little fire station, you'd walk up the stairs into the classroom, and you'd see QR code taped to the table. The QR code would take you to a Shiny app, where firefighters scan on their phone, select their name from a dropdown, and hit check in. I've given an example of what that app might look like with some fake data. And below that, you'll see a status table, so we can make sure everyone was successfully checked in, see what time they checked out, as well as whatever else we might need in the future.

And now, when we return from a call, like this one we did that were about a month ago, instead of writing on that whiteboard, there's now a QR code on that whiteboard that takes you to our incident response app. Firefighters enter key details about what the incident was, what firefighters were on what apparatus, anything with wheels, and finally, after the incident is submitted, you see a summary, so that we can quickly validate the incident was entered, and it was entered accurately. We're now done. It's in the database. We don't have to think about it again, and there's no more manual work.

Finally, this brings us to the data portal. Now, this is the one I'm most excited about, and I'm sure you guys are excited about. However, we have spent the last year focusing on gathering data, because you have to have data in order to analyze it, and so there's a lot of blue skies ahead on this app. Currently, where it stands, it can give immediate status reports of how many training hours a firefighter has. These are my training hours from this year. I no longer have to wait until the next time somebody sits down to update the spreadsheet and add them all up. It's right there. I know at any point of the year. Additionally, there's an export that exports all of our training, what the topic was, a short description, any notes. This is really useful as we go and submit our hours at the end of the year to our licensing organizations.

What's coming next

And finally, like I mentioned, well, I didn't mention, but I meant to mention, we've started using this instant response app. This one's actually brand new. We've been using it about two weeks, and I've been out of town the last two weeks, and I'm happy to report that the firefighters are using it, and they're loving it. They've got some feedback, but we'll get there. Three months from now, we have some important reporting deadlines coming up. One of those being our annual city budget. As you can imagine, rural communities have some budget constraints, and so we're excited to be able to start to report more to our city council about why they should continue to fund a local fire department.

One of the features I'm really excited about is our billing feature. We have to be able to have money to put gas in the trucks. As we report our incidents and store them in the database, we're able to generate invoices and billing documents that we can send to the county and other agencies in the surrounding area. This is something that historically has been a lot of manual work and a lot of time that we're now going to be able to get done with Shiny.

A year from now, I do have some hopes and dreams, and I'm going to say hopes because I just don't know where we're going to go. But if I could pick, I would hope that we are able to better plan for our community that is growing and that we are going to be able to answer questions about should we put a part-time firefighter at the station. Every fire department in the United States has an insurance services office rating or classification. This is a really important number. You may not know it, but it's one of the driving factors of how much you pay for your home insurance.

And this is the type of data that the insurance services office uses. When we started tracking this data in spreadsheets, our classification improved and we're really excited to see what happens as we provide them more data that they want to know so that they can better classify our fire department. And finally, I hope there are other departments using this application. This is an open source solution to rural firefighting. All of the code is on GitHub, and I've built this in the hopes that there are others out there that can use this.

The fire chief's response

Nine months ago, when I sat down with the fire chief and the assistant fire chief and showed them a very, very minimum viable product that just barely worked, I got done with my presentation and was amazed by the response I got. The first was from the fire chief who looked at me and said, Joseph, this is great. What do you need from us to get this at our department?

I loved having such a positive and open outlook to this new process I was suggesting. And as cool as that first response was, I think the second response was even better. The assistant chief looked at me and said, Joseph, this is amazing. But can it do this? What about this? We've always wondered about this.

Between these two, they have 30 years in the fire service as firefighters. They know what they need. And I'm starting to be able to provide them tools to make their lives easier.

At the end of the day, this app is not valuable because it's a work of technical genius. It's a simple wrapper around an AWS database. There's some fun Python scripts that do some things in the background. The reason it's valuable is it's the intersection of two worlds. The fire service and data science. I'm really lucky to live in a community where me, this guy right here, who sits most of his day at a keyboard typing away in R, can go and serve my community when I'm not working. And I'm hoping that the work I'm doing now helps these guys. It helps them do less repetitive work. It helps them have a good experience entering data and it gives them the ability to leverage data.

At the end of the day, this gives firefighters data tools at their fingertips without writing a single line of R or Python code. So that they can focus on what matters. Saving lives, protecting the community, and getting home to their families safely and timely. Thank you.

The reason it's valuable is it's the intersection of two worlds. The fire service and data science.

Q&A

Thank you so much. We do have time for a few questions as well. The first one is, where are you posting your Shiny apps? Is your fire department providing support for data collection, storage, and usage? Yeah, great question. Right now we're on shinyapps.io. After seeing some of the amazing stuff at conference, I think eventually we'll probably move over to PositConnect Cloud. I've been messing around with that in the evening, because I'm so excited. As far as data storage, for now I'm still meeting the requirements for the AWS free tier. And just any incidental fees I'm just covering out of my own pocket, because this has been a really fun passion project for me.

And because you're using your own data collection and manually collected data, is there a way to compare your volunteer fire department to others in the areas as a benchmark of good versus bad on trainings and other metrics? Yeah, I hope so. I think that goes into where I hope we're going, that a couple of years from now, we might be able to start publishing anonymized data saying, hey, look, here are volunteer fire departments from across the country. Where do you land in terms of what you're doing?

And then I guess kind of in addition to that with talking about metrics, because it is a volunteer fire department and no one's at the firehouse at all times, do you track response times, like when a fire is reported versus when you get there and how that maybe compares to other in the area as well? Yeah, that's one of actually the most important metrics, which is probably no surprise. And so we actually do have some systems in place. We use a computer aided dispatch system. And so the county tracks that for us. So as we arrive and we respond, they record those times for us. And so that's been an awesome thing. That is something that we've had in the past, but we were kind of missing some other parts that were important to us.

Okay. And is there any idea of collaboration to collect or cross-reference with the 911 call data? Do you have access to that? Yes, we've looked into that. I'm going to punt that question and say, we don't know yet. I know it's out there. We've looked at doing some API work to maybe see if we could start to bring those together. That's actually something we'll probably end up doing at the end of this year as we do our reporting so we can cross-reference and make sure that it all ties out.

And then a question about your app. Since creating it, what are some app improvements you're already thinking of? A lot of it has been UI focused stuff. A lot of back buttons and refreshes. The incident response app, I got a text from one of the firefighters. He said, hey, is there any way to do a back button? Because if I mess up, I have to cancel and go through all of it again. And I was like, oh man, that's not going to be fun. So a lot of it's UI based stuff. And a lot of it's actually trying to figure out how to track time and date in R in a fun way. If you've done stuff with LuberDate, there's a billion things that are fun to play with. So trying to do that in a sustainable way is something that I'm really focused on.

And I don't know if you saw the Shiny talk yesterday. There was someone talking about the back button for ShinyApp. So you could check it out. Oh, sweet. I missed that one. I'm going to have to go watch that one tonight. She had dynamic URLs and she's like, on a website, you can just click back. And she added that to her Shiny app. So it's definitely possible. Oh, man. I'm really excited. That's awesome.

And that's all the questions that we have for right now.