PyBer Challenge Module 5
The project's goal was to analyze data for a ridesharing company called PyBer in order to calculate metrics related to total weekly fares for each city type in which the rideshare company operates. For each city type, datasets containing ride and city data were used to calculate metrics such as total rides, total drivers, total fares, average fare per ride and driver. The data sets were also used to generate a new data frame that calculated the average weekly fare for each city type from January 1st, 2019 to April 29th, 2019.The analysis dataframe was used to generate a multiple-line graph that depicted the total weekly fares for each city type over the specified time period. The metrics and visualization were then analyzed to provide recommendations to Pyber's CEO to address any disparities between city types.
To observe and analyze some disparities in city types, the following key metrics were calculated and a dataframe was created. We can see from this dataframe that urban cities have the most rides and drivers, while rural cities have the fewest. As a result, as shown in the Total Fares column, the city type Urban generates the most revenue, while rural cities generate the least. However, when we look at the Average Fare per Ride column of this dataframe, we can see that Rural city types have the highest average fare per ride, which means that there is a higher chance of revenue in this city type for every ride increase compared to Urban city types, which have the lowest average fare per ride.
The summary data frame shows total travel, total drivers, total fares, average fares per trip, and average fares per driver for each city type. The data includes 66 cities, 36 suburbs, and 18 local cities. The total number of trips for each city type is in line with our expectations. The total of 1,625 trips in urban areas is the highest, and the total of 125 trips in provincial cities is the lowest. The total number of drivers and total fares for each city type also follows this pattern.
Rural cities have the highest average prices per trip ($ 34.62) and urban cities have the lowest ($ 24.53). The average fare per driver is also highest in rural towns ($ 55.49) and lowest in urban towns ($ 16.57).
As part of the analysis, the following multiple line chart was created to help us visualize and analyze the Total Fares from January 1st, 2019 to April 29th, 2019 for each city type. In this period of analysis of the total fares for each city type, it is easy to see that the total fares for city types are the highest in all weeks and the lowest in rural areas. You can also see that the third week of February is the highest total fare of any city type that is in increasing demand at that time. Urban areas also seem to generate a lot of sales in the first and third weeks of March. From early January to the end of April 2019, all city-type rates will be reduced. The "Toal Fares by City Type" graph shows the differences in weekly total fares from January to April. Urban cities have the highest total fares ranging from $1,661.68 to $2,470.93 as shown by the yellow line. The red line shows that the total fares in suburban cities which ranges from $721.60 to $1,412.74 on a weekly basis. The lowest total fares is depicted by the blue line for rural cities and ranges from $67.65 to $501.24. In late February, the total fares in all types of cities seem to be at their highest. The relationship between total fares and date is depicted in the graph below:
Here are some recommendations for dealing with inequality between city types to analyze the results after calculating different metrics for each city type. Urban areas have the highest total fares and the most travel, so they make up the majority of the company's revenue. As a result, this is the highest performing city type and we will need to invest more in this type in order to bring significant profits to PyBer in the future. Local cities occupy the lowest travel and lowest fares of all types, but the average fare per trip is the highest in this city type, so increasing passenger numbers in this city type can increase revenue slightly. There is sex. Despite having the fewest drivers, the average fare per driver is the highest in this type of city. Therefore, if you can increase passenger numbers through investment in marketing and other means, it may be easy to find a driver for that particular city type. Suburban city types are medium-performance city types with all calculated metrics. Therefore, this city type can continue to function as it is currently doing in PyBer, allowing more investment to be directed to urban and rural city types.