thereallinusrg / cma-week3 Goto Github PK
View Code? Open in Web Editor NEWExercise 3 of the course "Computational Movement Analysis"
Exercise 3 of the course "Computational Movement Analysis"
Lines 141 to 148 in aa1e24e
TrajID
info. Below I attach how I did it:
ggplot(pedestrians, aes(E,N)) +
geom_point(data = dplyr::select(pedestrians, -TrajID),alpha = 0.1) + # here I am adding the dataset once
# more, without the TrajID column
geom_point(aes(color = as.factor(TrajID)), size = 2) +
geom_path(aes(color = as.factor(TrajID))) +
facet_wrap(~TrajID,labeller = label_both) +
coord_equal() +
theme_minimal() +
labs(title = "Visual comparison of the 6 trajectories", subtitle = "Each subplot highlights a trajectory") +
theme(legend.position = "none")
Lines 118 to 121 in aa1e24e
This is an accepted way to go, since there is the assumption that everything is sampled in a 1min interval.
You could also filter out the segments with duration < 5 mins
, by cmputing the actual duration and then performing the filtering based on the newly created column. You could use the following expression to do it:
mutate(duration = as.integer(difftime(max(DatetimeUTC),min(DatetimeUTC),"mins")))
Something like this:
caro60_moves %>%
group_by(segment_id) %>%
mutate(duration = as.integer(difftime(max(DatetimeUTC),min(DatetimeUTC),"mins"))) %>%
filter(duration > 5) %>%
ggplot(aes(E, N, color = segment_id)) +
geom_point() +
geom_path() +
coord_equal() +
theme(legend.position = "none") +
labs(subtitle = "Long segments (removed segements <5 minutes)")
https://github.com/thereallinusrg/cma-week3/blob/aa1e24e623a66450956695e8f1fb04bfa8c846dbC:/Users/bako/Desktop/kurse/FS21/week3_groupBako/MarjanTababaka/cma3/Exercise3.R#L8-L8
I cannot see where and how you imported your caro60.csv
file. I was expecting something like the following:
caro60 <- readr::read_delim("pathToYourFile",",")
Lines 204 to 206 in aa1e24e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.