What Can Publicly-Available API Data Tell Us About Supply and Demand
Total Page:16
File Type:pdf, Size:1020Kb
Hassanpour, Bigazzi, and MacKenzie 1 What Can Publicly-Available API Data Tell Us about Supply and Demand for 2 New Mobility Services? 3 4 5 Amir Hassanpour 6 Department of Civil Engineering 7 University of British Columbia, Vancouver, Canada, V6T 1Z4 8 Email: [email protected] 9 10 Alexander Bigazzi 11 Department of Civil Engineering and School of Community and Regional Planning 12 University of British Columbia, Vancouver, Canada, V6T 1Z4 13 Email: [email protected] 14 ORCiD: 0000-0003-2253-2991 15 16 Don MacKenzie 17 Department of Civil and Environmental Engineering 18 University of Washington 19 201 More Hall, Box 352700 20 Seattle, WA 98195-2700 21 Tel: 206-685-7198; Email: [email protected] 22 23 24 25 26 Forthcoming in the Transportation Research Record, and presented at the 2020 TRB Annual Meeting 27 28 29 30 31 1 Hassanpour, Bigazzi, and MacKenzie 1 Abstract 2 Better understanding of the impacts of New Mobility Services (NMS) is needed to inform evidence-based 3 policy, but cities and researchers are hindered by a lack of access to detailed system data. Application 4 Programming Interface (API) services can be a medium for real-time data sharing and access and have been 5 used for data collection in the past, but the literature lacks a systematic examination of the potential value 6 of publicly-available API data for extracting policy-relevant information, specifically supply and demand, 7 on NMS. The objectives of this study are 1) to catalogue all the publicly available API data streams for 8 NMS in three major cities known as the Cascadia Corridor (Vancouver, British Columbia, Seattle, 9 Washington, and Portland, Oregon), 2) to create, apply, and share web data extraction tools (Python scripts) 10 for each API, and 3) to assess the usefulness of the extracted data in quantifying supply and demand for 11 each service. Results reveal some measures of supply and demand that can be extracted from API data and 12 useful in future analysis (mostly for bikeshare and carshare services, not ridesourcing). However, important 13 information on supply and demand of most of the NMS in these cities cannot be obtained through API data 14 extraction. Stronger open data policies for mobility services are therefore needed if policymakers want to 15 obtain useful and independent insights on the usage of these services. 16 17 18 Keywords: carshare, bikehare, ridesource, API 19 2 Hassanpour, Bigazzi, and MacKenzie 1 1 Introduction 2 In rencet years, technological advances, has led to rapid expansion and proliferation of New 3 Mobility Services (NMS) in transportation such as bikesharing, carsharing, and ridesourcing. In the United 4 States, 35 million trips were taken through bikesharing companies in 2017, which is 25% more than the 5 previous year. Dockless bikesharing emerged in early 2017 in its modern form and generated a substantial 6 increase in bikesharing. The total fleet size expanded from 42,500 at the end of 2016 to 100,000 in the U.S. 7 at the end of 2017 (NACTO Bike Share Initiative, 2017). Carsharing companies were operating in 46 8 countries as of October 2016, a 31% increase from 2014 (Shaheen, Cohen, & Jaffee, 2018). Car2go is one 9 of the largest carsharing companies in North America, and has expanded rapidly since beginning in 2010 10 (Car2go, 2018). The two dominant ridesourcing companies in North America are Uber and Lyft (Wirtz, 11 Lovelock, Wirtz, & Tang, 2016) operating since 2009 and 2012 respectively. In 2016, Uber carried its 12 second billion rides in just six months, after taking six years to provide the first billion (Somerville, 2016). 13 Elsewhere in the world, services such as DiDi in China, Ola in India, and Kater in British Columbia are 14 also growing rapidly. Projections indicate continued steady growth in the ridesourcing market (Costello, 15 2018). 16 As these services establish themselves in many cities and grow, their impacts, either negative or 17 positive, on cities and on people with different socio-demographics is increasingly important. Numerous 18 studies have examined environmental, social, and mobility impacts of NMS, but more research is needed 19 to generate the level of understanding that can inform evidence-based policy (Gehrke, Felix, & Reardon, 20 2019; Litman, 2017; Shaheen & Chan, 2016; Zhao, Deng, & Song, 2014). Public agencies and 21 municipalities are struggling to address new issues raised by NMS with effective policies. Some cities are 22 cautious about allowing new modes of transportation to operate, due to legitimate concerns about safety, 23 congestion, and other impacts. For example, British Columbia excluded ridesourcing services from 24 operating for almost the first decade of their prominence (Lindsay, 2019; Ma et al., 2018). 25 Supply and demand are fundamental characteristics of transportation services, and essential 26 measures for understanding the impacts of new services and relationships with internal and external 27 components of the transportation system. Examination of supply and demand relationships provides 28 information about resource allocation efficiency and equity, and can therefore enable policies that promote 29 broad public benefits from emerging technology. Quantifying supply and demand to inform relevant policy 30 decisions requires access to detailed, disaggregate trip and service availability data. However, NMS are 31 often operated by private companies which may have disincentives to share data due to concerns about 32 customer and employee privacy and business intelligence. As evidence, in 2019 large NMS providers such 33 as Uber, Lyft, and Bird supported a bill that would prevent cities in California from collecting granular data 34 from NMS providers (Bliss, 2017). Similar barriers to third-party analysis have existed in the freight sector 35 for decades, which is a recognized problem for travel modeling and transportation planning (Czerniak, 36 Lahsene, & Chatterjee, 2000; Jiang, Johnson, & Calzada, 1999; Southworth, 2018). 37 Where access to detailed, disaggregate system data is restricted, an alternative approach which has 38 been used in recent years is extracting data from Application Programming Interface (API) services 39 (Hughes & MacKenzie, 2016). Currently in the Cascadia Corridor, 7 out of 13 bikesharing, carsharing, and 40 ridesourcing services have APIs which are used to allow third-party access to limited information on their 41 fleet and their availability. APIs can be a medium for real-time data sharing, with appropriate data 42 specifications and standards. Wolff, Possnig, & Petersen (2019) describe and evaluate five data-sharing 43 framework scenarios for NMS in Vancouver, British Columbia, although no one approach has been widely 44 adopted in practice. The Los Angeles Department of Transportation created data specifications for mobility 45 APIs, to ensure that municipalities can evaluate and manage service providers (Los Angeles Local 46 Government, 2018). In a slightly different approach, Austin, Texas, created the Austin Dock-less API to 47 provide data reporting tools for NMS (Austin Transportation, 2019). While APIs have been used for data 48 extraction in a few ad-hoc studies and cities, the literature lacks a systematic examination of the potential 49 of publicly-available API data for improving understanding NMS. 3 Hassanpour, Bigazzi, and MacKenzie 1 Recognizing the limited availability of detailed NMS system data, this work seeks to answer the 2 question: “Can we derive policy-relevant information from publicly-available API data?” To work toward 3 the goal of helping cities understand the impacts of NMS, including interacting demand for various modes 4 of transportation, we must first examine what measures of supply and demand can be derived from API 5 data. Thus, the objectives of this study are 1) to catalogue all the publicly available API data streams in the 6 three major cities of the “Cascadia Corridor” (Vancouver, British Columbia, Seattle, Washington, and 7 Portland, Oregon), 2) to create, apply, and share web data extraction tools for each API, and 3) to assess 8 the usefulness of the extracted data in quantifying supply and demand for each service. 9 2 Method 10 The methodology consists of three steps: data extraction, creation of candidate measures of supply 11 and demand, and evaluation of the candidate measures. To extract data, Python scripts were written for 12 each NMS provider and run continuously for six months, saving the extracted data into a MySQL database. 13 The extracted API data were then explored to create candidate measures of supply and demand to quantify 14 serviced trips and service availability. Finally, the candidate measures were evaluated using three criteria 15 based on conformity to microeconomic theory and travel behavior data. 16 2.1 Cataloguing the API 17 The first step was to compile a list of all bikesharing, carsharing, and ridesourcing companies that 18 operate in Vancouver, British Columbia, Seattle, Washington, and Portland, Oregon. Each NMS company’s 19 website was then researched for API services. If no information on API services were found on the website, 20 the companies were contacted through publicly-available email addresses to enquire about the available of 21 an API. A single account was created by the research team to obtain credentials (keys) for API access. Keys 22 were requested by submitting a short description of the study. Past research has used “a couple of hundred” 23 API keys to extract Uber and Lyft API data (Cooper, Castiglione, Mislove, & Wilson, 2018); we chose to 24 limit the scope of this study to data extractable with a single key, both for feasibility and to avoid 25 deactivation by the API providers. 26 Each API service consists of multiple “endpoints” that can be queried to extract data (more 27 information about APIs is provided by Paruchuri (2019)). A reply (output) from an endpoint is typically in 28 one of two types: bulk data for the whole system, or output specific to an input location.