Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Added instructions to import the overview data into mysql.
  • Loading branch information
chrisroos committed Dec 20, 2010
1 parent c4d9e1f commit 012d2b2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -41,6 +41,19 @@ I've also popped the data into [this Google Fusion table](http://www.google.com/

$ mysql sedpr -uroot -e"SELECT COUNT(*) FROM problems;"

### Combining all csv overview files into one file

$ echo "Services scheduled,Services run,Services within 5 minutes of schedule" > combined.overview.csv
$ cat data/csv/*.overview.csv >> combined.overview.csv

### Importing the combined overview data into mysql

$ mysql -uroot -e"CREATE DATABASE sedpr;"

$ mysql sedpr -uroot -e"CREATE TABLE overview (id INTEGER AUTO_INCREMENT, date DATE, services_scheduled INTEGER, actual_services INTEGER, services_within_five_minutes_of_schedule FLOAT, PRIMARY KEY(id));"

$ mysql sedpr -uroot -e"LOAD DATA LOCAL INFILE 'combined.overview.csv' INTO TABLE overview FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' IGNORE 1 LINES (date, services_scheduled, actual_services, services_within_five_minutes_of_schedule);"

### Stats

# Ten most disrupted days
Expand Down

0 comments on commit 012d2b2

Please sign in to comment.