![]() For example, fare and distance, among others, must be numeric. We also want that the variables are stored in the type we need them to be. What we need in the end is clean data, that is, each row represents a unique trip and each column represents an attribute of that trip (date, distance, time, fare, etc.). The process of cleaning the data does not end here. The reference rows may also differ depending on whether your trip is in surge pricing, or in a promo, or includes other charges (example, toll fee). We do this for all the rows from where we can get the information we need. To indicate the row from where we can get the distance covered during the trip, which is in the line next to the reference row. ![]() To indicate the row from where we can get the trip date. We can use this then as the indicator for the first line of each trip receipt and from which we can create id per trip. Generates a new variable from that returns 1 if the row contains the string "From:". Next, we use Stas Kolenikov's findval ( ssc install findval), to identify rows that we will use as references to grab the information we need. | ‚Ç☑04.00 Thanks for choosing Uber, Mitch | | Subject: Your Monday afternoon trip with Uber |Ħ. How do we convert this into a tidy data that we can play with? First, we use insheet or import delimited to load the text file into memory. Subject: Your Monday afternoon trip with Uber In any case, at least in Mac Mail App, the steps above work.īelow are sample lines from the text file (some details are replaced by xxxxx): From: Uber Receipts Another way to save the receipts as text files is to read them directly from the folder where they are saved. I have not tried doing this from Gmail or Yahoo mail via their web apps. (name the file, uncheck "Include attachments", and choose "Plain Text" format) From Mail, it is easy to export filtered mails to a single text file:ġ) Filter "Uber receipts" mails using the search tabģ) File > Save As. Uber sends receipts via email that goes straight to my Mac Mail app. GrabTaxi receipts, on the other hand, only show the amount paid and manually encoded by drivers. These do not only show how much I am charged but include time, distance, fare disaggregated by time and distance, and many more. Trip receipts are automatically sent as soon as the trip has ended. But what I love most about Uber, apart from their customer service, is the data they send. Uber (and GrabTaxi) has eliminated the wait under the heat (and rain) and the dealing with the assholeness of most taxi drivers here in Metro Manila. I tried Uber in late May and since then it has been 131 Uber rides covering 1,200 kilometers and 80 hours on the road.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |