Friday, April 3, 2020

COVID-19 and New Hampshire

Recently, I was in a friend's Facebook comments (not recommended, I know) in a post about his disappointment with New Hampshire Governor Chris Sununu's decision to close the beaches. In these comments there was some notion that things are not bad here and COVID is not "exponentially bad", especially when "compared to New York".  So it pushed me to look for some modeling for the COVID-19 outbreak in New Hasmphire, which is harder to find than I thought.  I did eventually find some stuff to show that NH is definitely seeing cases grow exponentially, but the data was not complete.  So today, I spent an hour going through the data and now have a spreadsheet where I am tracking the outbreak for NH and modeling in a very simple way against a theoretical exponential model.  The raw data spreadsheet can be found at the bottom of this post.

I want to use this space to share the charts I made and explain them, and then going forward, the google sheet at the bottom of the page will be able to be accessed to see progress.

Here are a few things to know.  Data is messy, particularly when making simple models and simple projections, to help with this, I am going to fit the model to a 5-day average. This will help account for fluctuations between days where people might be more likely to get tested, or tests might come back faster due to any number of factors like proximity to a weekend of a holiday. However, when I show you the growth curves, they will be on the actual total number of cases.  Everything in this post should be able to be understood if you have taken introductory statistics.


In this chart, the blue line is the total number of confirmed cases in New Hampshire (479 at the end of April 2) and the red line is an exponential growth curve.  This growth is a new cases increase of 18.5% each day, meaning that the number of new cases and total cases will double every 4 days.


Source: Data Gathered from: NHPR Live COVID-19 Blog 


When I look at the last 2 weeks of data, my 5 day average has an average growth of 15.5% with a standard deviation of 0.08%.  This means the model estimate of 18.5% is feasible but possibly over predicting a tad.  Thus, I will use the model above AND change the model to account for 15.5% growth to show two models of what this continued growth would look like over two weeks.







Note: The header here says 18% but it should be 15.5%.  Apologies for not editing it.


For each of these models (note the blue line still exists in both, but it now very hard to see), this assumes sustained growth, which is the exact thing we are trying to stop.  The difference between 18% and 15% growth is 1000 cases over the next two weeks, a big difference. The state-wide stay at home order is 7 days old, so we still have one more week (of half of the two predictions above) before we would expect to see this growth slow.


Finally, the last graph I will share is one of new cases.  This is the one where we will more obviously see sustained growth slowing.  This is what that currently looks like:



In this case, our data is 2 days behind because we are modeling according to a 5-day average, so the most recent 5-day average is March 31 (which is the average of March 29 through April 2). This looks the same as above because the growth is the same, but when the growth slows the shape will start to take a more bell-shape and will be easier to see improvement.



Raw Data: https://tinyurl.com/covid19nh

Monday, June 5, 2017

The Portsmouth Crosswalk Conundrum!

Background:

There is a place on Islington Street in Portsmouth New Hampshire where there is a popular tea and coffee shop, White Heron.  At this particular location the Parking and Traffic Safety Committee is considering adding a crosswalk, which requires a bump-out from the curb to make it clear there is only 1 lane there (there is room for 2 cars and cars often make it two lanes with the left going straight and the right turning at the next intersection).  This causes traffic to back up a little more during busy times as that "extra lane" is shortened and during busy times cars must wait until they get past the bump-out to begin the 2nd lane.  It also makes it so bikes need to merge into that lane to avoid the bump out.  The planning committee has temporarily tried this 2 times before, the first time had many problems and after feedback, they changed a few things (these are not important for this post) and tried again.  The 2nd time was more successful, but still saw complaints.  Both times there was an online comment period for people to provide feedback.  A few days ago, this temporary crosswalk and bump-out returned for another 1-month trial, this time during the busiest traffic time of the year, our touristy summers. It is also my understanding that to have the crosswalk, the bump-out, or something similar, is required as a crosswalk can only cross 3+ lanes of traffic if there is a stop sign or traffic light.

A photo of the first temporary crosswalk.  The current set up looks quite different.  Photo Credit: Wired Article



In a large local Facebook group, a member started a thread complaining that it had returned and many group members commented.  There were many comments claiming that nobody wants the cross walk and why did they provide feedback if it was just going to be ignored. It seemed clear that that most passionate of comments were of the thought that this is crosswalk is a bad idea, it is obvious it is a bad idea, and the city is ignoring the people and catering to some business. There were statements that only those who frequent the White Heron are in favor.  There were many other things said and some really good points on both sides, but that is not what this post is about, this post is about answering a few simple questions:

1)  Are members of the group generally for or against the crosswalk?
2)  What is the difference in crosswalk opinions for those who live near the crosswalk vs those who do not vs those who only work in the area (and live in a different city)?
3)  What is the difference in crosswalk opinions for those who frequent White Heron vs those do not?
4)  What is the difference in crosswalk opinions for those who drive through the proposed crosswalk daily vs those who do not.


To answer these questions I posted a survey to the group and promoted it.  I received 104 responses.  I asked if they were strongly against, somewhat against, strongly for, somewhat for, or neither for or against the crosswalk.  I asked where they lived, if how often the patronize White Heron, how often they cross at the spot anyway (I used the word illegally and one survey taker commented that it is not actually illegal to cross there as it is an intersection and pedestrians have the right of way at intersections), how often they drive by that spot and if they patronize other businesses near White Heron.  Here are the summarized results for each question and the raw data: Results and Raw Data.

This is what I have found.

Here are the results for the general question of people being against or in favor of the crosswalk.  I combined strongly and somewhat for against and for into a single category.  In this survey, people were in favor at a rate nearly 2 to 1 versus those against as 55% were in favor at 30% were against.
Perhaps it matters where people live.  Many commented that only those who live near there would be in favor, so do we see a difference when we condition on location?  There appears to be no difference as these distributions are similar to the overall:


I found this to be pretty surprising, and while it is a small sample of those who work nearby (some live in other cities and some live in Portsmouth but not near the location), it was interesting that they had more in favor.


Next, we can look at how patronizing White Heron affects opinions.  For this, I combined those who are frequent (once or twice a week) and those who are very frequent (a very regular customer) into one group called frequent, those who have never been there or only been there once or twice ever into a group called rarely/never and the rest into infrequent customers.  One would expect White Heron customers to welcome this (in fact they signed a petition to make the cross walk permanent), so that is not what we are looking at.  We are most interested in those who do not patronize White Heron and to a lesser degree those who do so infrequently.  Here is where those against start to group:


Those who do not patronize White Heron are against the crosswalk 2 to 1, while those who go frequently are in favor 3 to 1. Interestingly, those who go to White Heron infrequently (a couple times a month) are also in favor by almost 3 to 1 -- these are also our largest group.

If it makes sense that those who are impacted positively when access to White Heron is improved overwhelmingly support, one might also hypothesize that those most inconvenienced, those who drive by often would be overwhelmingly against.  However, it is not that simple as there is some bias in this data as those who frequent White Heron are also likely to drive by often.  Regardless, it is interesting to look at:

 For this, I combined those who drive by daily with those who drive by more than daily (daily and often multiple times in a day) as a yes.  More are in favor than not, but it is not close to the 2 to 1 margin we have seen early.  Unsurprisingly, those who do not drive by daily like the crosswalk at a 3 to 1 clip.  What if we break down those who drive by daily by the frequent vs the very frequent:

 We can see that those who are very frequent make up the majority of those against.  Again, do not be fooled by how many are for, it is important that it is nearly the same amount, but there is some bias here as there are members of this sample who are also in the frequent White Heron customer sample.

Finally, there are those who are already crossing at that spot -- which according to one survey taker is legal and not jaywalking because it is an intersection (Islington and Albany). I am not sure that is true, but it would not surprise me, New Hampshire has many laws like this.  For the record, I did phrase it as "illegally cross" when I asked.  Once again, not a surprise, but interesting to see:


Conclusion:

I am not writing this to help support my opinion, rather to lay out some data so that I can generally be more informed.  I think it is clear that many against commenters made assumptions that everyone shared their opinion and I think the data shows that is not true.

I am happy to answer a question you have, of if you want me to look for something else in the data (I could go way deeper, but this took me a couple hours to write, so I am only going as deep as this on my own).  I will say that I wish I had asked if the participant biked in the area, that has been a big topic of discussion.

I hope you enjoyed.

-Stats Sam

Edit:

A comment pointed out that there are other establishments besides White Heron at the proposed location and asked me about it, here is how that looks:



I also was asked if there was a way to remove the frequent White Heron patrons from those who drive through the area often, so I did that as well:


What this is...

This is a venue for me to post data and stats related things.  I do not expect there to be regular posts, but when I do little side projects I will archive them here.