Step 1 of cleaning instagram vancouver 2015 neighbourhood dataset is to count the occurrences of each neighborhood using add_count() and filter()
Pontifications
(Step 2 is to remove those >100 occurrences whose neighborhoods aren’t in the city of Vancouver, like North Vancouver, Whistler, Squamish, Burnaby, etc)
- Step 1 of instagram vancouver 2015 neighbourhood data cleaning: We’ll derive count_ig_van_2015-colour-lat-long-date-neighborhood.csv as follows:
- Using the data from the last post, One CSV File with instagram Vancouver 2015 neighborhood using lappl(y) to read the CSV file and then bind_rows() to combine the rows of the CSV files, and
add_count()
andfilter()
we’ll remove all rows whose neighborhood occurs less than 101 times using the following R code:
- Using the data from the last post, One CSV File with instagram Vancouver 2015 neighborhood using lappl(y) to read the CSV file and then bind_rows() to combine the rows of the CSV files, and
count_ig_van_neighbourhood_2015 <-
ig_van_neighbourhood_2015 %>%
add_count(neighbourhood, sort = TRUE) %>%
filter(n > 100)
write.csv(count_ig_van_neighbourhood_2015,
file = "count_ig_van_2015-colour-lat-long-date-neighborhood.csv",
row.names=FALSE)