Blog home

Comparison of SafeGraph Places and Patterns Data vs Lyft "Top 9 Most Visited Nightlife Spots in Nantucket"

July 23, 2021
Ilan Rich

With summer in full swing, many companies are developing consumer applications and recommendations for fun activities based on location data. One of these companies, Lyft, developed a list of the hottest nightlife destinations in various locales based on their trip data - including in Nantucket, MA. Comparing SafeGraph foot traffic data to Lyft trip data illustrates some of the cool applications and intricacies of working with points of interest (POI) data.

For a full breakdown of the code needed for this analysis, check out our Google Colab Notebook.

Lyft's top nine Nantucket nightlife destinations based on trip data.

In Part 1 of the analysis, we analyzed SafeGraph Monthly Patterns data for the month of June 2021. We limited the analysis to restaurants, bars, and movie theaters by filtering on specific NAICS codes. popularity_by_hour is a column included in the Monthly Patterns release and is an array of visits seen in each hour of the day over the course of the month. We analyzed this column and only looked at visits during the hours between 8pm and 2am, which we considered to indicate "nightlife." By adding up and sorting these visits, we created a SafeGraph ranking of top Nantucket nightlife spots.

In Part 2 of the analysis, we analyzed the column visitor_home_cbgs, which tracks the home census block groups (CBGs) for each visitor to a POI. We then used publicly available census data to determine the age and demographic breakdown of the visitors to the top nightlife destinations. This shows which late night spots are better for a respective age group. The final investigation simply counted the amount of visitors to each POI from each US state to provide further context. This was also determined using the column visitor_home_cbgs. As tourism on Nantucket is seasonal, we expected to see many visitors who live year round in other states.

Comparing the Data

SafeGraph data can be compared to Lyft's list of top Nantucket nightlife spots in two easy steps:

1. Initialize Google Drive path and read in data

Work with the code for yourself in the Google Colab Notebook.

2. Read in Monthly Patterns data and aggregate visits

Ensure that all date columns are read as dates using pandas function to_datetime.

The Results

The top nine Nantucket nightlife spots according to SafeGraph Patterns data.

The list produced using SafeGraph data and the list produced by Lyft agree on 4 POIs: "The Chicken Box," "Lo La 41," "Slip 14," and "The Rose and Crown." The 5 POIs that are not included on the list produced using SafeGraph data are "Brotherhood of Theives,"  "The Town," "The Muse," "31 York St," and "Straight Wharf." An investigation into the missing POIs help illustrate the difficulties with creating high quality datasets of POI and mobility data.

Counting visits at the appropriate time

In the SafeGraph dataset we have three of the POI on the Lyft list, but don't attribute many of the visits during the late night hours. Many of the visits to these POIs are occurring during the day and thus are ranked low in our late night ranking.

Businesses opening and closing

Further investigation shows that one of the POIs listed by Lyft has actually closed its doors temporarily.

While included in Lyft's list, Brotherhood of Thieves had to shut its doors during the COVID-19 pandemic and for that reason is not showing up as a top late night spot in SafeGraph's June 2021 Patterns dataset. Perhaps Nantucket visitors do not know this and still order Lyfts to this location.

POI categorization

One of the POIs included by Lyft is actually a residential address that simply has a high volume of Lyft trips associated to it.

Maybe the most interesting missing "POI" is actually not a POI (the current scope of a POI by SafeGraph is defined as any location humans can visit with the exception of single family homes, multi-family homes, and apartments). Lyft included a private home on their list, presumably because a lot of Lyft rides were called to and from this location during the late night. Using volume data, this is not incorrect. However, this is why POI categorization and NAICS codes are helpful in determining which POI to factor into an analysis. Lyft labeled the residence "Other Latenight," illustrating how difficult it is to categorize and tag true POIs.

Age and demographic analysis

An added benefit of using SafeGraph data is that once we have identified the top late night places of interest we can then map publicly available census block group data to SafeGraph Patterns data to derive demographic profiles of the visitors. Many demographic characteristics can be gleaned from this, such as gender, income, race, and education levels. When looking at an age breakdown, it appears that Nantucket's nightlife visitors mainly originate in CBGs with middle aged - older populations.

With origin CBG information, we can see where people come from to visit Nantucket. Tourism on Nantucket is seasonal and occurs during the summer months. Based on SafeGraph data, this summer's Nantucket visitors were mainly from Massachusetts, Florida, Connecticut, and New York. It is important to note that during the off season the origin breakdown will probably look very different.

To get started on your own comparison, visit the SafeGraph Shop to download data for the location you're interested in. Then follow the steps outlined in our Google Colab Notebook to see the differences.

Browse the latest

Questions? Get in touch with our team of data experts.