Skip to content

Instantly share code, notes, and snippets.

@dheerosaur
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save dheerosaur/64ae38c739d8040fe7c3 to your computer and use it in GitHub Desktop.

Select an option

Save dheerosaur/64ae38c739d8040fe7c3 to your computer and use it in GitHub Desktop.
# bin/get_directions.py gets us with_directions.csv
# This can be easily loaded into SQLite:
> create table trips (vendor, 'pickupTime' DATETIME, duration, terminal, direction);
> .mode csv
> .import with_directions.csv trips
# To get daily counts from the SQL
> select DATE(pickupTime), count(1) from trips group by DATE(pickupTime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment