Last active
December 10, 2015 13:50
-
-
Save spsaaibi/ece4f4630ad4187bbc55 to your computer and use it in GitHub Desktop.
read-process-taxi-data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###--- | |
### Sample Data Preparation | |
###--- | |
#install.packages("dplyr") | |
#install.packages("readr") | |
library(dplyr) | |
library(readr) | |
# read dataset | |
data <- read_csv("http://www.geolink.pt/ecmlpkdd2015-challenge/data/Porto_taxi_data_training.csv") | |
n_taxis_call_type <- | |
data %>% | |
group_by(CALL_TYPE,TAXI_ID) %>% | |
summarise( N_TAXIS_CALL_TYPE = n()) %>% | |
select(N_TAXIS_CALL_TYPE, CALL_TYPE) | |
n_taxis_call_type <- | |
n_taxis_call_type %>% | |
summarise(N_TAXIS_CALL_TYPE = sum(N_TAXIS_CALL_TYPE)) | |
n_taxis_call_type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment