There's more...

To get a different visual perspective, we can plot the percentage increase in crime and traffic, instead of the raw count. Let's divide all the data by the first row and plot again:

>>> crime_begin = crime_quarterly.iloc[0]
>>> crime_begin
IS_CRIME 7882 IS_TRAFFIC 4726 Name: 2012-03-31 00:00:00, dtype: int64

>>> crime_quarterly.div(crime_begin)
.sub(1)
.round(2)
.plot(**plot_kwargs)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.165.70