article

Analyzing 7.7M Traffic Accidents: Spencer’s Flatiron School Data Science Capstone Project

Mike McGee

Written By Mike McGee

Liz Eggleston

Edited By Liz Eggleston

Last updated October 7, 2025

Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.

After a decade in financial services, Spencer Polans found himself at a crossroads. His mortgage lending career was stable, but it wasn't fulfilling, and he knew he wanted to be at the forefront of the AI and technology revolution, reshaping industries. Spencer decided to take the leap, enrolling full-time in Flatiron School's Data Science bootcamp. Over four intensive months, he mastered Python, SQL, machine learning, and Tableau, creating a standout capstone project that analyzed over 7.7 million US traffic accidents to uncover safety insights for the Department of Transportation. Now equipped with a portfolio of data science projects and navigating the tech job search, Spencer shares what it takes to succeed in an all-consuming bootcamp, the reality of career pivoting, and why waking up at 3 AM to check on running models confirmed he made the right choice.

What's your pre-bootcamp story? What prompted you to pursue a bootcamp?

I've been in financial services since graduating from college in 2014, in several different roles, and I settled into the mortgage space over the past five and a half years. However, I wasn't getting the fulfillment in my career that I wanted; it wasn't where I wanted to be.

I saw where the world was going with the advent of AI and technology, and I felt like I wanted to be at the forefront. This wasn't something I decided to do rashly—I'd been thinking about it for a couple of years. I pulled the trigger towards the end of last year, wrapped up everything at my job, and decided to pursue this full-time.

After deciding and researching data science bootcamps, what specifically led you to choose Flatiron School?

Multiple factors went into choosing Flatiron School. There are plenty of different bootcamps out there, and I knew I wanted to go into the data space. What I was reading from Flatiron School sounded good, but the big thing for me was that I knew people who had completed the program.

I asked them, “What was it worth to you? Did you get what you wanted to get out of it?” Everybody I talked to spoke highly of it. One of my friends who had done it said he was able to jumpstart a career that he wouldn't have otherwise had, and that's my goal as well. There was alignment there.

I also liked that it was in New York, where I'm based. Everything came together.

What did a typical week look like for you as a student? 

The week was structured around classes, assignments, and a larger project. The rate at which I did that was up to me, but since I was doing it full-time, everything was condensed and moving quickly. The assignments had to be done, you had to keep up, and there was no real time to fall behind.

The entirety of the program followed that structure up to the capstones—you have these readings and videos to watch, do as much as you can, learn, and try to take it all in. We had live classes with my cohort twice a week, where we all discussed what we were going through, challenging topics, and things we found interesting, and we constantly bouncing ideas off each other. That was the structure Monday through Saturday.

How much time did you have for your capstone project during the program?

We actually had three different capstones! The one I will share with you came towards the end of the program. I have been working on capstone projects for the last five weeks or so, and I'm excited to share it.

Great segue! Go ahead and give us a demo of one of your capstone projects.

One of the capstones I worked on was an analysis of United States traffic accidents. I explored the frequency with which they occur, environmental risk factors, and whether any infrastructural features impacted accident frequency or severity.

Where do accidents most frequently occur? What environmental factors are linked to higher accident severity? What infrastructure features are associated with severe accidents? The goal was to explore this dataset and develop actionable insights that the Department of Transportation could use to help with their policies and mitigate risk.

The dataset itself had over 7.7 million entries with 46 different columns. I learned very early on in the bootcamp that data is often not clean, and you have to work with it and massage it to make it analytically ready. There were some null values in this dataset. For numerical values, I put the median in; for categorical, I used the mode; and if there was a data-specific item like a street address, I would put unknown. I also converted timestamp features to hour of the day, day of the week, and month, which I used to answer when and where these accidents occur. I engineered a feature called weather type - good versus bad weather - because there were so many different types, like light snow, heavy snow, light rain, and heavy rain, so I classified them as good or bad weather.

So, when and where do accidents most frequently occur? The general findings, a little unsurprising, are that most accidents occur during commuting hours during the week. People work nine-to-five jobs, so we see the most frequency in those commuting hours - in the morning and when they're done with work in the afternoon during the week. Something interesting: urban areas had the highest volume of accidents, and there was a sharp decline in accidents during the middle of 2020. We all know what was going on in 2020 - that was COVID.

What environmental factors are linked to higher accident severity? I classified good or bad weather - in this case, bad versus clear. The finding was that, in general, there is a slight increase in severity during adverse conditions, but overall, the environment has a limited impact.

For infrastructure features associated with accidents, I found that the average severity - and this was one of the key features I was using since the dataset classified severity on a scale of one to four, with one being the least severe and four being the most severe - accident severity was slightly higher when junctions were present.

One thing I pointed out when presenting this was that the dataset only had these as binary features. So if there was a stop sign, a traffic light, or a junction there, yes or no, that tells us some information, but we lose the context. We don't know exactly how it was set up, so there's a place where data can be limited and not give the whole picture.

Key findings: accidents peak during rush hour, poor weather slightly increases their severity, and some infrastructural features, like junctions, can lead to higher severity. Accidents are more common in the northeast, southeast, and far western parts of the country, like California, and they dropped in 2020 due to COVID-19.

Some business recommendations I came up with are: Identify high-volume periods during commuting hours, so we could potentially employ additional law enforcement in those areas to help with complex traffic situations. Work with local weather authorities to implement alert systems to ensure drivers know conditions and keep them off the roads. And for junctions and intersections with frequent or significant accidents, there's something wrong structurally with them. Places where we might lack safety features - you could do something low-cost like better signage and lane markers, or there could be more expensive, extensive options like redoing intersections.

I also created an interactive dashboard where everything is clickable and explorable. You can see the count of accidents by hour of the day and day of the week, with blue meaning a higher count and red/orange colors meaning fewer occurrences. I created a heat map showing where accidents are most heavily focused - in significant urban areas, the Northeast, the Southeast, and California.

Something interesting I found was when I plotted the top 10 cities by accident count - Miami, Houston, LA, etc. - I saw this massive cluster in the Northeast, but wondered where New York City was. This was a good lesson about data: our preconceived notions about what data should be are not always right. The data is set up the way the person who collected it intended. In this case, rather than being listed as New York City, it was broken down by boroughs - the Bronx, Brooklyn, etc. When I combined all those, New York City would fall into the top five.

The dashboard also shows accidents over time, such as the sharp drop during COVID-19 in 2020. I like the interactive features that Tableau provides—if I want to look at a specific state, I can see the same pattern across the board.

That's fascinating, Spencer. I enjoyed your demo, walking through the presentation and the Tableau dashboard. Did you use any technologies outside of the Flatiron School curriculum during development?

Not on this specific project, but I had to go outside the curriculum on some of my other work. One was training a Natural Language Processing (NLP) model to summarize text conversations. I had to use Google Cloud for that one because my local computing resources were so limited. That's not something Flatiron or many programs would teach. But there are all these excellent services out there, and having GPU access changed my project overnight.

For one of my projects analyzing New York City real estate, I pulled in different APIs and data sources. So the long answer to your question is yes—you're constantly thinking outside the box and trying to develop creative solutions. That's part of the beauty of data science: there's a problem, you have a question, we have data, let's solve it.

Maybe the dataset doesn't have everything you need. As I alluded to in my presentation, we're missing some context here—wouldn't it be great to have more context? Sometimes, you go in with these assumptions, which are not always right. The data is really cool and eye-opening, and I really enjoyed it.

How much help did you get from Flatiron School instructors or mentors while building these projects?

I'm one of those people who plans things out. In my previous job, on Monday morning, I would have a list of things I needed to get done that week. I took the same approach to this project and pretty much any project I've worked on - setting realistic goals to set myself up for success.

I want to have my exploratory data analysis done by Tuesday. For example, I want to start building visuals by a specific date. There was definitely strict planning involved. I am goal-oriented, so if I set a goal, I meet it. That works for me.

My instructor was great—I can't speak highly enough of her. I might not get her immediately if I had a question, but I would always get a detailed, informed answer. Having that resource was invaluable when going through these projects and experimenting with things you may not have much experience with.

My cohort was also really great. We all worked together—we worked independently, but we tried to elevate each other.

Did you face any roadblocks during this analysis, or was there anything that surprised you while collecting and reviewing the data?

Regarding roadblocks, it's rarely just a straight line to success. There is a level of experimentation and exploration that needs to be done. I get this massive dataset - 7.7 million entries, 46 different data points - where do you start with that? You've got to pick and choose.

Initially, I didn't really want to look at infrastructural impacts. I was exploring elsewhere, and as I was exploring and creating visuals, there were some things that I didn't like. I was not getting the statistical significance I was looking for. I ran statistical tests to ensure I had real statistical significance between weather and accidents. If I wasn't seeing that, I'm not presenting anything of value. That certainly happened several times.

The data surprises you, and with every dataset I worked with, I felt like I learned something every time. Specifically, I felt almost done when I first looked at this project's data. I had plotted my visuals, and it seemed so wrong to me. I was like, Why is this looking so wrong? So I had to go back and re-filter my data.

There is certainly trial and error. There is learning as you go, taking lessons, and applying them.

Regarding learning through trial and error, experimenting, we'll shift focus to life after Flatiron and your next career move. How has your job search been up to now? Do you have an ideal job in mind? Have you discussed this project in interviews or during job-related conversations yet?

In terms of the job search itself, nobody likes looking for a job - I'm not different. Flatiron has provided me with excellent resources. Their career services have been great. I came out of 10 years in the financial services, and you start applying for jobs - guess what? Tech is a different space. The information they're looking for is entirely different. They were great in helping me write a new resume - I basically had to start from scratch.

In terms of a dream job, I don't have one. The beauty of data is that it's needed everywhere. It's needed in financial services, sports, fashion, healthcare, and any client-based industry. I'm certainly open to what's out there because things happen for a reason. I have this strong background in mortgage lending and finance, so that may be where my fit would be, but you never know. I was talking to somebody the other day who completed the bootcamp, and he's working at L’Oreal, so whatever life throws at me, I'm excited to do the work.

And yes, I have spoken about my projects in interviews. All of these employers understand that as a bootcamp graduate, you're coming into the field relatively green, and these projects I worked on are my foundation. This is where I've learned my lessons in data. I've spoken specifically about the traffic accident project, but I've also talked about what I learned from it - what lessons I can take away and apply to future work.

Reflecting on your time at Flatiron School, if someone approached you and contemplated joining Flatiron School—similar to how you considered your career pivot—what advice would you offer to someone just beginning at Flatiron School?

You have to be serious about what you're doing. You have to be ready to grind every single day because it's called a bootcamp for a reason. You're in the trenches, you're doing this every single day. It does become your life, which for some people may not be what they want. It's certainly not easy.

So my advice would be to ensure this is what you want to do. Make sure that you're ready to grind, and if you are, it will be very rewarding.

I understand you just graduated and haven't had much time since Flatiron School. It might be challenging to give a definitive answer, but reflecting on your recent bootcamp experience, was Flatiron School worth it?

What I've learned, or what Flatiron taught me, reinforced that I made the right decision. Taking a leap of faith, I had a decent mortgage career but wasn't getting the fulfillment I wanted. I'm now equipped with the tools I need to be successful and get the job I want.

So yes, but you need to be sure - if you're going to do Flatiron or any bootcamp, make sure this is what you want to do because it is all-consuming for better or worse. It's all day, every day. You go to sleep thinking about it. There were times I woke up in the middle of the night - I was running a model overnight, and I was like, I wonder how it's doing. I got up at 3 AM, and I was coding. It's very cool, the stuff that you learn.

During my bootcamp, I had two great instructors who taught different areas of the data science space. The collaborative nature of the cohort was also phenomenal. So, overall, it was worth it. For anybody thinking about doing it, just be ready to work because that's what a bootcamp is. All good things come with hard work.

Find out more and read Flatiron School on Course Report. This interview was produced by the Course Report team in partnership with Flatiron School.


Mike McGee

Written by

Mike McGee, Content Manager

Mike McGee is a tech entrepreneur and education storyteller with 14+ years of experience creating compelling narratives that drive real outcomes for career changers. As the co-founder of The Starter League, Mike helped pioneer the modern coding bootcamp industry by launching the first in-person beginner-focused program, helping over 2,000+ people learn how to get tech jobs, build apps, and start companies.


Liz Eggleston

Edited by

Liz Eggleston, CEO and Editor of Course Report

Liz Eggleston is co-founder of Course Report, the most complete resource for students choosing a coding bootcamp. Liz has dedicated her career to empowering passionate career changers to break into tech, providing valuable insights and guidance in the rapidly evolving field of tech education.  At Course Report, Liz has built a trusted platform that helps thousands of students navigate the complex landscape of coding bootcamps.

Also on Course Report

Get Free Bootcamp Advice

Sign up for our newsletter and receive our free guide to paying for a bootcamp.

By submitting this form, you agree to receive email marketing from Course Report.

Get Matched in Minutes

Just tell us who you are and what you’re searching for, we’ll handle the rest.

Match Me