<commit_before>---
layout: post
title: "Predicting 911 Call Locations using Poisson Point Processes"
date: 2015-04-22
category: statistics
tags: [poisson-point-processes, vulnerability-mapping]
---

### Heat in Houston

In many locations throughout the world extreme heat represents a significant health hazard.
Heat is linked directly to illnesses like hyperthermia and heat exhaustion, but can also
exacerbate other negative health outcomes such as cardiovascular failure or kidney disease.
In the United States, an average of [618 deaths per year are attributed to heat][1]. Officials
in the city of Houston, TX, are interested in understanding what areas of the city are most 
vulnerable to extreme heat because it will help them to identify potential interventions
that will lead to increased health for Houston residents.

In order to understand the relationship between heat and health, it is necessary to make use of
spatial data. Spatial data presents unique challenges for analysis. It tends to be highly correlated 
and nonlinear, making traditional methods, such as multiple linear regression, difficult or 
impossible to implement. One method that can be used to effectively model this type of data,
dealing with both nonlinearity and correlation in a graceful manner, is a stochastic point 
process model.

### What is a stochastic point process?

The word "stochastic" simply means random, so a [stochastic process][2] is just a collection
of random variables. These random variables can be from any family, so a Gaussian process
is a collection of normal random variables, a Poisson process is a collection of Poisson 
random variables, and so on. Stochastic processes can be used to describe data that is 
distributed throughout time or space and generally assume that points closer to one another are more highly correlated.
As a result, in many cases these processes can be entirely characterized by a correlation 
function, such as the rational quadratic covariance function or the Matern correlation function.
By assuming that points behave similarly to nearby locations we can make predictions about 
values in unobserved locations by estimating how correlated they are with observed values.
In this post I will demonstrate how a Poisson process can be used to predict the likelihood that
a heat-related 911 call comes from a specific area in the city of Houston. 

### 911 call data

Our data comes from 1389 heat-related 911 calls made over a 4 year period between 2006 and 2010. A 
heat-related 911 call is defined as a call that was made and when medical personnel responded
someone at the scene was diagnosed with a heat-related illness, such as hyperthermia or heat
exhaustion. We are interested in understanding both the number of phone calls we expect to 
receive and where they are coming from. 


<iframe width='100%' height='500px' frameBorder='0'
src='https://a.tiles.mapbox.com/v4/jwmortensen.m06ong3d/attribution,zoompan,zoomwheel,geocoder,share.html?access_token=<KEY>'></iframe>
*This map shows the predicted probability that a 911 call originates in a 1 km grid cell*

[1]: http://www.cdc.gov/mmwr/preview/mmwrhtml/mm6136a6.htm "CDC"
[2]: http://en.wikipedia.org/wiki/Stochastic_process "Stochastic Processes"<commit_msg>Updated poisson point process post<commit_after>---
layout: post
title: "Predicting 911 Call Locations using Poisson Point Processes"
date: 2015-04-22
category: statistics
tags: [poisson-point-processes, vulnerability-mapping]
---

### Heat in Houston

In many locations throughout the world extreme heat represents a significant health hazard.
Heat is linked directly to illnesses like hyperthermia and heat exhaustion, but can also
exacerbate other negative health outcomes such as cardiovascular failure or kidney disease.
In the United States, an average of [618 deaths per year are attributed to heat][1]. Officials
in the city of Houston, TX, are interested in understanding what areas of the city are most 
vulnerable to extreme heat because it will help them to identify potential interventions
that will lead to increased health for Houston residents.

In order to understand the relationship between heat and health, it is necessary to make use of
spatial data. Spatial data presents unique challenges for analysis. It tends to be highly correlated 
and nonlinear, making traditional methods, such as multiple linear regression, difficult or 
impossible to implement. One method that can be used to effectively model this type of data,
dealing with both nonlinearity and correlation in a graceful manner, is a stochastic point 
process model.

### What is a stochastic point process?

The word "stochastic" simply means random, so a [stochastic process][2] is just a collection
of random variables. These random variables can be from any family, so a Gaussian process
is a collection of normal random variables, a Poisson process is a collection of Poisson 
random variables, and so on. Stochastic processes can be used to describe data that is 
distributed throughout time or space and generally assume that points closer to one another are more highly correlated.
As a result, in many cases these processes can be entirely characterized by a correlation 
function, such as the rational quadratic covariance function or the Matern correlation function.
By assuming that points behave similarly to nearby locations we can make predictions about 
values in unobserved locations by estimating how correlated they are with observed values.
In this post I will demonstrate how a Poisson process can be used to predict the likelihood that
a heat-related 911 call comes from a specific area in the city of Houston. 

### 911 call data

Our data consists of 1389 heat-related 911 calls made over a 4 year period between 2006 and 2010. A 
heat-related 911 call is defined as one where an emergency responder diagnosed the victim 
with a heat-related illness, such as hyperthermia or heat exhaustion. We are interested in 
understanding both the number of phone calls we expect to receive and where they are coming from. 
Fortunately a Poisson point process can allow us to answer both of these questions at the same time.

### Model

To model this data, let \\(N\\) be the number of phone calls and assume that 
\\[N \sim \text{Poisson}\left(\int\_{\mathcal{S}}\Lambda(s)\right),\\] where \\(\mathcal{S}\\) is the set of all 
spatial locations in the city of Houston and \\(\Lambda(s)\\) is what is known as the _intensity function_.
Additionally, let the joint probability that a phone call came from a specific location be 
\\[f(s\_1,s\_2,\dots,s\_N|N) = \prod\_{i=1}^N\frac{\Lambda(s\_i)}{\int\_{\mathcal{S}}\Lambda(s)}.\\]

<iframe width='100%' height='500px' frameBorder='0'
src='https://a.tiles.mapbox.com/v4/jwmortensen.m06ong3d/attribution,zoompan,zoomwheel,geocoder,share.html?access_token=<KEY>'></iframe>
*This map shows the predicted probability that a 911 call originates in a 1 km grid cell*

[1]: http://www.cdc.gov/mmwr/preview/mmwrhtml/mm6136a6.htm "CDC"
[2]: http://en.wikipedia.org/wiki/Stochastic_process "Stochastic Processes"
{'fraction_non_alphanumeric': 0.05556337037558025, 'fraction_numerical': 0.0181460120973414, 'mean_word_length': 4.799347471451876, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2883162', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1703, 'n_words': 1005}