Using Stepwise to find the best model

Call:
lm(formula = requests_per100@ ~ pct_white + pct_black + male_pct +
median_income_last_12mo + city + pct_poverty, data = data_model_final)

Residuals:

Min 1Q Median 3Q Max
646.45 -146.12 @.66 140.51 1032.25
Coefficients:

Estimate Std. Error t value Pr(>itl>

Cintercept) -6,749e+02 1.716e+82 -3.933 9.90e-05 ***
pct_white 3.275e+@2 1.4Sie+@2 2.258 0.024518 *
pct_black 5.219e+82 1.339e+82 3.899 @.000114 ***
male_pct 6.887e+02 1.845e+82 3.734 0.008217 ***
median_income_last_i2mo 5.666e-@3 8.350e-84 6.785 4.26e-11 ***
cityDC -1.627e+02 4.223e+81 -3.852 0.000137 ***
cityNYC -3.149e+02 4.112e+81 -7.658 1,47e-13 ***
pct_poverty 2.313e+03 1.928e+82 11.998 < 2e-16 ***

Signif. codes: @ ‘***' 0.001 ‘**' 0.01 ‘*' 05°." O12 ' 2

Residual standard error: 262.5 on 394 degrees of freedom
Multiple R-squared: 0.5304, Adjusted R-squared: @.5221
F-statistic: 63.58 on 7 and 394 DF, p-value: < 2.2e-16


Hypothesis



Transforming the Data

Create table of requests, by year, zipcode, and city.

Convert dependent variable; a count of 311 requests by
zipcode to requests per 1,000 people by utilizing the
population estimate from ACS(2013-2017).

Create other race count by:
\( Total Population \) - \( White Count \) - \( Black Count \)

Transform the acs count data into percentages from acs of
Race, divided by population. Eg: \( \frac{White}{Total
Population} \)

Convert the city & years into factors


Data Challenges

¢ Each 311 data set had to be cleaned

* New York City is way too big (20M rows) ; had to aggregate at
GET request.

¢ There is not a nationwide reporting standard of 311 data
labeling

e Learning the ACS package functions and the structure of
American Community Survey (table names, variable names,
variable codes)

city unique service request categories unique agencies

Baltimore


Datasets

American Community Survey(ACS)- 5 year estimates. Using an R package
called 'acs'The package queries from the Census Bureau API.

¢ total population, male counts
* median household income
* median age
© white count, and black count
311 Data Sets 2016-2018 Using the Socrata API and an R package called
'RSocrata’:
¢ Baltimore
¢ New York City
e DCdownloaded via opendata.dc.gov


Distribution of all Variables

male_pet median_ope median _income_last_12mo
18 0.06 20-05~
10- 004-
5 5 10-05
5 o02-
—— 7 ‘ 0.00-"> y 7 de+00-,) ‘
04 06 os 10 20 40 60 80 t) 5000
pet_black pet_other_race
o- a
20 4
Bis B,
= 15- a 3-
§ 10- 2 4
BD os- 1- 1-
oo 7 ° 7 . 0“ 7 7 ; o- 5 7 5
000 «0.25 «6050 «7S 1.00 00 02 04 06 oo of o2 o3 o4 o8
pet_white requests_pert000,
15- 0.0015 ~
10- o.0010-
05- 0.0008 -
oo) ; 7 ; + 0.0000 - 7 0 0 ‘
000 0.25 050 075 100 6 500 1000» 1800-2000

value


311 Service Requests

Monica Puerto, MS Data Science AU University
GASP 9/23/2019

Github: @monipip3


Poverty vs 311 by city

Baltimore

2000-

8

requests_per1000

8

4

os00 Ot

a2 03 04
pet_poverty

0500


Correlation

ie}
E
N
ai}
o
eo x
8 TM 9!
5 a 5
£ 2
Moe plan Mime
22ZGosins
SLE @EQsceESs
$3560 78 8 8
gocves sy
®BaeREF ER
requests_per1000 . 6 @
pet_white m o®@
pet_black eee o®
pct_other_race @ ©
male_pct
median_age @
median_income_last_12mo @@e@ C a

pct_poverty @ @@ @| | e@


311 Request Size

¢ Baltimore had the most logged requests despite smallest
population.

¢ DC,had the highest average rate of 311 requests per 1000
people out of the 3 cities.

= DC outliers due to museums/universities/downtown area
(removed them later on)

‘ia Yoo a500«
- en
| cag : =
7 T Bx 2”
st — —
Batre oc wre Bates x wre
city

city

total_requests
La
cee we

fequests_pert000



311 Open Data

“Open 311’ is about providing an API standard for future web
applications that is accessible and decentralized. With the
explosion of mobile data, most cities have stored their millionth
311 request in their 311 database.

Why is this important?

e Transparency

¢ Accountability

¢ Accessibility

e Infrastructure for Operations


Conclusion

¢ Poverty had the strongest relationship/affect on the rate of
311 requests.

* 1% of poverty results in an increase of 23 service requests
per 1000 people
= According to Pew Research “In 2016, one-fifth of adults living in
households earning less than $30,000 a year were “smartphone-only”

internet users” and “The vast majority of Americans (95%) now owna
cellphone of some kind”.


Where are 311 Services Available?

¢ The service launched first in Baltimore, Maryland in 1996
after concluding that 60% of the prior years 1.8 million 911
emergency phone calls were not an emergency.

= Now 80cities in United States have 311
= Canada has ~20 participating cities.

= Latin American countries like Panama and Costa Rica have also
launched this 311 service.


What is a 311 Service Request?

Asolicitation to the local government to remediate anon
emergency issue that occured within that local juridistiction.

Requests range and are not exclusive to the following :
noise complaints, abandoned vehicles, dead animal
removal, potholes / sinkholes, snow removal, street light
repairs, missed garbage complaint, sidewalk repair,
homeless services, etc.


ye.

requests_peri000
ee
eo
. eo

Ty


Next Steps

SEPLOS

Include other cities in analysis

* Have seperate models for
types of cities. Use KNN to »
figure out similar cities with
ACS data

e Inspire a standardization of
311 data and more research
on 311 data that can help
urban planning.