Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment we will analyse and visualise trajectory data to classify driving patterns. The data was collected by the American based rideshare company Lyft
In this assignment we will analyse and visualise trajectory data to classify driving patterns. The data was collected by the American based rideshare company Lyft wwwlyftcom The data is presented in csv format and has the following format: Attribute Description TripId The id of a trajectory TimeStep The record number for a point of a trajectory TimeStamp The timestamp for a point of a trajectory Speed The ground velocity Acceleration The rate of change of speed Heading The bearing which is a value between and Latitude The latitude coordinate of GPS observation Longitude The longitude coordinate of GPS observation You can download the file here: data.csv You should read the CSV file into a Pandas Data frame and use Pandas to perform the tasks listed below. These tasks are designed to give you an opportunity to demonstrate the following learning outcomes and to satisfy the assessment criteria: Clean irregularities in the raw data file to convert it into a proper CVS format. Read data from the cleaned CVS file into a Pandas Data frame. Convert between different Datetime formats. Filterrestrict the rows and columns in Pandas Data frames to help answer the queries. Use aggregation operations such as mean, median, sum, max and to summarize data. Use group by to summarize data for various categories. Create new columns that are computed based on other existing columns. Demonstrate appropriate use of a variety of types of Plots to visualize data using Pandas All plots should have meaningful titles, axes labels and userfriendly data labels and be scaled large enough to easy see the details required. Markdown headings should be added to clearly separate and explain each of the tasks and markdown should be provided to discusssummarize the key observations. Dont repeat yourself use functions to avoid duplicating the same logic in multiple places. Use programming best practice write clear simple Python code and use wellchosen identified names for all variables and functions. Note that the raw CSV data may require "cleaning" before it can be processed. Everything should be included in a single Jupyter notebook which you will need to create yourself no skeleton solution for this assignment Tasks: Use markdown to document the data cleaning that you performed. Read the cleaned CSV file into a Pandas data frame Convert the timestamp into an YYYYMMDDHHMMSS format Convert speed from mileshour to kilometrehour Add a column that shows the accumulated time driven for each vehicle Show the minimum and maximum speed for each trip in a plot Plot the speed profile for trip T Add a column that indicates if a vehicle moves straight or is turning leftright Plot the trajectories of all vehicles. Use a loop to go thorugh all the trajectories. Add a column that indicates hard braking where deceleration is larger than ms Plot a bar chart showing the travel time of each vehicle in ascending order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started