TreatSmartLiving: Maximizing your Halloween candies

A few years back Nextdoor started letting its user “announce” whether they are giving out candy or not for Halloween. That was exciting to us ! As real “nerds” we thought what if we can plan ahead the path that will give you the most candy without having to sweat too much!

Hence, we decided to do some legwork to prepare for the big day. We used the data on Nextdoor to identify the locations of houses giving out candies. Given that Next-door includes voluntary information only we also did some manual labor and drove around the area to see which houses at which streets where decorated – this increases the chance of them handing out candies…

Then the problem is “easy”. If you assume that every house that hands out candy provides the kid with a benefit, and assuming that all houses give out good candies so the benefit is the same for every such house, then what we have is essentially a constrained optimization problem. Maximize the “candy profit” by walking only a pre-defined maximum amount of distance!

Luckily we had readily available algorithms that we have developed with for urban tour recommendations (which we have used in the past to find paths full of trees) and hence, we crunched the data and…voilĂ , we were ready to go get some candies. As for the evaluation, we will have to wait after Halloween to see how much candy we collected..! Hopefully, next year more people will have the information on Nextdoor so I will not have to do extra data collection…Just a note to Nextdoor folks, let the people say what candies they are handing out too, so we don’t end up with a lot of peanut butter 🙂

New PSL Screen at Bakery Square

New Bus Shelter at Bakery Square
New Bus Shelter at Bakery Square

Have you seen the PittSmartLiving screen at the sparkling-new bus shelter at Bakery Square? It is located at the corner of Penn Ave and Bakery Square Blvd. The screen shows live Port Authority bus arrival times and capacities, nearby Healthy Ride bike availability, weather, news, and more. The project was a collaboration between PittSmartLiving and Walnut Capital, with support from the National Science Foundation.

Free parking and small business Saturday

Since 2010 the Saturday after Thanksgiving we are celebrating and supporting small businesses. This was a way to counter Black Friday and Cyber Monday that mainly feature big-box retailers and huge e-commerce stores (well, mainly Amazon). Many local governments promote and support (as they should do) small local businesses. In Pittsburgh (and in many other places across the country) one of the ways the local government promotes small business Saturday is by offering free curb parking across the city.

The intentions are certainly good; no one argues about that. The line of thought for offering free curb parking, is that by removing the “barrier” of curb parking pricing, more customers will decide to drive and come out to support local businesses by shopping. Sounds reasonable, but it is not the case. Sure people love free parking (even though nothing is free in life; we pay for it in other ways), but remember the objective here is to support local businesses. What do local businesses need? Infrastructure to support the – hopefully large – incoming flow of customers. Parking is one such infrastructure, that allows customers to temporarily store their cars, and run their errands, including shopping. Therefore, local businesses ideally want this infrastructure to be able to support as many cars as possible. Given that the number of curb parking spots are fixed, this means that the turnover of each parking spot should be high. The turnover of a spot is simply the number of cars parked in that spot during the day. A higher turnover, means that more cars parked in one spot, which can potentially translates to more customers.

What does free parking do? Free parking actually reduces the turnover of a parking spot! When parking is free, drivers do not have parking ticket anxiety anymore, and turnover plummets. Simply put, someone that might park for 30 minutes, run their errands and leave, might now stay 60 minutes and take their time in completing their errands. So this spot will be occupied for an additional 30 minutes, possibly not allowing another potential customer to park. Will this second person leave the area and not shop? Chances are not, but what will happen is that they will circle around to find a spot, increasing traffic, polution, and we all know what this does to our mood. Not to mention, that they might think of it twice before going back next time.

While we cannot know how exactly people will react when they cannot find a spot (i.e., leave or keep circling), we can get an estimate of the turnover of a spot through simulations. Assuming a simple Poisson model we can simulate our parking spot’s state. Starting with the – realistic for business areas – assumption that there is high demand for parking (which is actually another side-effect of free parking, that is, induced demand), we can simulate the turnover of a parking spot based on the changes in the average service rate of a parking spot. For example, if the average occupancy time of a parking spot is 30 minutes under normal pricing, we can expect this time to increase when we move to free parking. We do not know by how much but we can simulate a variety of cases ranging from conservative (e.g., a 5 minute increase on average) to more pessimistic ones (e.g., doubling the occupancy time). The following figure shows the simulated distributions for the turnover of a parking spot under different scenarios.

As we can see even under conservative assumption (average occupancy time increasing by 5 minutes), the spot turnover is reduced by approximately 14% (from an average turnover of 21 to an average turnover of 18). Businesses need spot turnover. Free parking achieves the opposite. So if we want to support local businesses, we should come up with other ways and not free parking. Borrowing from the core idea of PittSmartLiving of bringing together public transit, commuters and local businesses, free bus rides or free bike rides to specific business destinations could be a good start. This can help local businesses, can help dwellers particularly from underserved communities, while at the same time promoting public transit as a viable option for moving around the city. Equally important, is the signal sent by offering it for free during a small business celebration that public transit is a crucial link between people and businesses.

For anyone interested in the economics of parking (which are very different from what a superficial view of the topic might imply), the book “The High Cost of Free Parking” by Donald Shoup is a must-read.

Mobility Patterns Dashboard

We have created an interactive dashboard to visualize mobility patterns in Allegheny County. The dashboard helps to visualize the level of compliance with the shelter-in-place orders that were put in place due to the COVID-19 pandemic. The mobility data were obtained from SafeGraph.

Users can click on a census block group (CBG) on the map to visualize the mobility patterns relating to that CBG. The colors on the map indicate the level of mobility between the selected CBG and all other CBGs in the county. There are two modes of operation. The outgoing mode shows where the people who reside in the selected CBG are traveling to. The incoming mode shows where people who visit the selected CBG are coming from. Additionally, the date range can be altered to see how these patterns change during the various phases of the shelter-in-place orders.

The middle panel shows a more detailed view of the mobility patterns for the selected pair of CBGs over time. The right panel shows important census data for the selected census block group, including population, income, race, and age.

This dashboard is part of a larger project analyzing how social distancing compliance is related to COVID-19 deaths. For more information, read our paper, which will be presented as part of the epiDAMIK workshop. The dashboard is available at http://mobility.pittsmartliving.com/.

got-toilet-paper? There is a website for that!

The Pitt Smart Living team created a mobile-friendly web site to help Pittsburgh-area grocers figure out which times are best for visiting a store and what items are in-stock/out-of-stock during these challenging times. Our goal is to make everybody’s lives a bit easier during the pandemic and help flatten the curve of people visiting grocery stores.

The web site is immediately accessible at https://got-toilet-paper.org

No download or registration is required. It works on any mobile smartphone equipped with a web browser. It also works on laptops or desktop computers, although the location-based features will not be as accurate.

How it works

The got-toilet-paper? website works in two modes:

  • View existing data — shoppers can search for a particular store on a map centered in downtown Pittsburgh and then select the store of interest to see:
    • information about how busy the store typically is and how busy it currently is (using data provided by Google), and
    • information about essential items being in-stock/out-of-stock. We report when was the last time information was submitted and use data only from the last 3 days.
  • Contribute new data — shoppers can submit information about how crowded a store is and whether certain items are in-stock or out-of-stock. We only allow reports for up to 3 hours in the past.

The list of stores currently in the system is available at https://got-toilet-paper.org/about/stores

Sample screenshots are shown below:

crowding.PNGproducts.PNG

How to help

  1. Please use the got-toilet-paper? website the next time you go to a grocery store in the Pittsburgh area. Use it to view information and also contribute information for others to use!
  2. Please help promote the website through social media. Please tag us (@PittSmartLiving) on Twitter or Facebook.
  3. If you are a store manager, please contact us (got-toilet-paper AT list.pitt.edu) to add authoritative information about your store and become a partner (especially as we are looking to extend its functionality). The service is free.
  4. If you are a journalist, please help us raise awareness of the got-toilet-paper? website. Feel free to reach out (got-toilet-paper AT list.pitt.edu) if you need more information.

Who did this?

This app was put together in an agile way by the following members of the Pitt Smart Living team:

  • Programmer: Kristi Bushman
  • Faculty: Alex Labrinidis (main contact), Kostas Pelechrinis, Sera Linardi
  • Postdoc: Robizon Khubulashvili
  • PhD student: Mallory Avery

and is funded by the National Science Foundation and the University of Pittsburgh, through their support of the Pitt Smart Living project.

These Days, Smart Living means Distant Living

At PittSmartLiving we have been trying to find ways to avoid over-crowded buses through win-win-win settings for all involved stakeholders (port authorities, riders and local businesses), improve riding conditions and in general “flatten the curve” for public transport.  As part of our efforts we have been analyzing crowding data in buses and businesses. The latter is important since it means that we could use the same methods to study changes in businesses’ foot traffic during the coronavirus pandemic, to understand how people react to recommendations for social distancing (which in the author’s personal opinion it should be termed as physical distancing, since we are still socializing using the technological advancements of our era).

We have been using Google’s Place API to collect crowding data. You might have interacted with this information available from this API when you tried to search for your favorite cafe and got back a bunch of information for it, including the bar chart below:

Screen Shot 2020-04-07 at 8.53.16 AM

This chart provides information on how “busy” the place is expected to be based on historical data from people’s cell phones that use Google’s services, as well as, how busy the place is right now (red-ish bar). These numbers are expressed as a fraction of the most popular time of the week for the venue. For example, if the red bar on the figure above corresponds to 40, and this place is expected to be at its weekly busiest on a Sunday at noon, then currently the place is 40% as busy as during a Sunday at noon. Now, of course, the current value can be larger than 100 as well, which means that the place is busier than the expected weekly busiest time. Google’s estimates for the expected levels of crowdedness are updated in a rolling window fashion (with details not being fully known to the public).

It should be evident that we can use these data to get an estimate of how people are distancing these days. We started collecting data for this purpose from a select number of venues in Pittsburgh on March 13th and we found some interesting patterns. People, in general, were following recommendations (the order for sheltering in place was announced on March 19th and enforced on March 23rd in Pennsylvania). During that week traffic in retail stores and malls was down (approximately 45%), traffic in restaurants was down (approximately 30%), traffic in transportation hubs/stations was down (approximately 65%). Following, are some representative time-series examples of venues that experienced a reduction in traffic.

Steel Plaza Station32020Starbucks32020

The Waterfront32520Phipps Conservatory and Botanical Gardens32020

One significant exception was bars during March 14th that were busier than normal, with Pittsburghers celebrating St. Patrick’s day as it can be seen by the following time-series:

Mario's South Side Saloon32020 (1)

Now the only type of business that did not see any significant decline during the first week of data collection in Pittsburgh was grocery stores. They saw a small decline of 4%, but since that week things have changed, with larger declines observed. For example, the following figure shows average daily changes from a busy grocery store:

giantEagle

These results seem to indicate that people stocked up and distanced themselves even from grocery stores. Among the 30 groceries that we have been monitoring currently, the last 10 days there has been an average reduction of 30% in the crowdedness levels in these businesses. Now it is always good to understand the data. Part of this decline can be policies put by various grocery stores on how many people can be within their premises at any given time. This certainly will have an impact on the volumes reported by Google and other providers. So it is always good to keep in mind these things when trying to understand the data and make conclusions.

Recently, I also came across another dataset from Foursquare that captures foot traffic in venues. Now I was a bit skeptical initially since people rarely check-in to places they go, but digging a bit deeper in the data, these are not based on check-ins but rather on passive sensing of user locations (i.e., similar to what Google does). I was particularly interested in residential venues (that we cannot get information about from the Google API) and how foot traffic has changed there. First I took a look at the US as a whole and following are some interesting figures:

We can see the natural progression here through the month of March across the whole country with foot traffic in residential places being significantly reduced by the end of the month (as compared to the month of February on a similar day)! Now again we have to understand what the data measure. Someone might be confused saying that this does not make sense since we are staying at home more. This is true, but these Foursquare data measure the foot traffic, i.e., how many people are in a building/venue. This means that by the end of March there were fewer people in a residential building than expected (as compared to a baseline from February). This points to people physically distancing from their close friends and family as well, staying home with their close/immediate family only. Simply put, they do not have people over. Following is the time series of these changes for Allegheny County, which tells a similar story.

Allegheny-ts

Overall, people seem to be taking this seriously (as they should) but there is still more that we can do! Stay far from each other; it saves lives!

Note: Google published a similar analysis in the beginning of April that provides a similar analysis for several countries and you can access these reports here.

Grocery App Sign-up

In light of the COVID-19 pandemic, we are trying to help our community through an app that will allow people to find out and report on the availability of certain items at grocery stores and supermarkets.

The app is under rapid development; we expect to have it ready within a few days.

2019 NSF Cyber-Physical Systems PI Meeting

In November, we presented some of our work at the NSF Cyber-Physical Systems PI Meeting in Arlington, VA. We were excited to share the following items at our demo booth:

  • Bus capacity visualization – How full is the bus at a given stop throughout the day?
  • Digital display of bus arrivals times & capacity – When will my bus arrive and how full will it be?
  • Field experiment visualization – Where and when are people taking the bus?

Watch the video for more info about our project and the progress that we have made throughout the last year.

PittSmartLiving Demo at Smart Cities Connect Conference and Expo

Our project is participating in the NSF Smart and Connected Communities PI meeting and in the Smart Cities Connect Conference and Expo this week, in Denver, CO.

If you are attending, make sure to stop by our booth tomorrow for a demo:

Motivating Pro-Social Behavior

Would you take a later bus if a mobile app told you the next bus would be full and gave you $3 off coffee? The PittSmartLiving project (https://pittsmartliving.org) is building infrastructure to make that a reality, by providing real-time information to commuters along with such incentives from nearby businesses. In addition to developing a holistic urban transportation system that balances utilization across both public transportation networks and local businesses, we plan to design and evaluate the market mechanism that integrates and aligns the incentives of various stakeholders, to motivate pro-social transportation behavior.

Booth #25, NSF, Smart and Connected Communities

Sera Linardi talk at CITRIS Research Exchange

Designing Microbehavioral Research for Practical Social Innovation (Wednesday, March 13, 2019)

#behavioral economics * #data systems * #transit choices

seralinardiphoto300x300

Sera Linardi
Associate Professor of Economics
Graduate School of Public and International Affairs (GSPIA), University of Pittsburgh

Watch the talk video

About the talk:

PittSmartLiving (PSL) is a $1.4M 3-year National Science Foundation project hosted in University of Pittsburgh to reduce public transit congestion by designing a market that connects rush hours travelers with time-sensitive local business discounts. This project is currently organized within three research labs: Data & Systems, Human Behavior, and Business Integration. In this talk, we will look at the research taking place in the PSL Human Behavior Laboratory, which uses economic theory, experiments, simulations, and interviews to build a social science framework for the larger interdisciplinary collaboration.

About the Speaker:

Sera Linardi is an Associate Professor at the Graduate School of Public and International Affairs (GSPIA) at the University of Pittsburgh, where she directs the PittSmartLiving Human Behavior Laboratory. She received her Ph.D. in Social Science at the California Institute of Technology after working as a computer scientist at Adobe Systems. She bridges academic research and practical challenges in public/social services provision, specifically around prosocial behavior, information aggregation, and behavior economics of the poor. Her research has been published in economics, management, and political science journals (Journal of Public Economics, Management Science, Games and Economic Behavior, British Journal of Political Science) and won the 2016 Midwest Political Science Association Best Paper in Comparative Politics Award. Her work is currently supported by the NSF and the Heinz Endowment.

About the Series:

Launched in 2008, the CITRIS Research Exchange delivers fresh perspectives on information technology and society from distinguished academic, industry, and civic leaders. Join us this spring to celebrate 10 years of innovative ideas and dialogue.

Learn more about CITRIS and the Banatao Institute at the University of California.