House Damage Assessment

The Scenario

We are insurance agents at Hometown Insurance Company. We have received a claim from a business owner whose business was damaged in a recent severe storm.

The Claim:

  • Address: 1337 Bayard Ave, St Louis, MO

  • Claim: Exterior damage from tornado - need immediate assessment

The Problem

We need to know:

  • How bad is the damage?

Normally, this would require sending an adjuster to visit the property. But with aerial imagery, we can assess the damage remotely before scheduling an on-site visit.

The Solution

Instead, we'll use aerial imagery to assess the damage remotely:

  1. Get "before" images - how the building looked before the storm

  2. Get "after" images - recent imagery showing current conditions

  3. Compare the images - identify what's damaged

  4. Make an informed assessment - determine if immediate action is needed

The Process

Using aerial imagery, we can objectively determine:

  • Is the damage real? (verify the claim)

  • How severe is it? (cosmetic vs. major structural)

  • Is immediate action needed? (emergency repairs, safety concerns)

  • Next steps? (prioritize adjuster visit, approve emergency funds)

This remote assessment helps us make informed decisions about claim handling and resource allocation.

Code Walkthrough

Let's begin setting up the code by importing key libraries and configuring our environment variables. This code imports the necessary Python libraries for API requests, geocoding, and image display, then establishes our connection to the Spexi Image API using authentication headers. We're targeting a single address for our damage assessment analysis.

Retrieve collection ID

Now let's retrieve the collection ID of the imagery collection we have access to. This code queries the Spexi API to retrieve all accessible collections, displays the results so we can see what's available, then automatically selects the first collection for our analysis.

Geocode address

Next, we'll convert our street address into the geographic coordinates needed for the API query. This code uses OpenStreetMap's free geocoding service to transform "4769 Dr Martin Luther King Dr, St. Louis, MO" into precise latitude and longitude coordinates, then stores those coordinates for use in our imagery requests.

Query before and after images

Next, we'll retrieve the before and after aerial imagery for our damage assessment. This code queries the same location twice - once for images captured before May 16th (pre-storm condition) and once for images captured after May 16th (post-storm damage), allowing us to compare the property's condition and identify any visible damage from the severe weather event.

Display images

Lastly, let's inspect the before and after images side-by-side for easy visual comparison. The aerial imagery clearly shows the extent of roof damage and validates the homeowner's claim, allowing the insurance agent to quickly determine next steps without requiring an immediate site visit.

Last updated