Skip to content

Commit

Permalink
Clean taxis data further and add source to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Oct 9, 2021
1 parent 4a44311 commit 483305e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ A partial list of where these datasets originate from.
- `penguins`: https://github.com/allisonhorst/penguins

- `planets`: https://exoplanets.nasa.gov/exoplanet-catalog/

- `taxis`: https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page
1 change: 1 addition & 0 deletions process/taxis.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
.assign(pickup_borough=raw["pulocationid"].map(loc["borough"]))
.assign(dropoff_borough=raw["dolocationid"].map(loc["borough"]))
.loc[lambda x: x.eval("dropoff - pickup").dt.seconds < MAX_TRIP_DURATION]
.loc[lambda x: x["fare"] > 0]
)

clean.to_csv("taxis.csv", index=False)
Loading

0 comments on commit 483305e

Please sign in to comment.