Package TrajDataMining

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package fastdummies. January 8, 2018

Package postgistools

Package knitrprogressbar

Package nngeo. September 29, 2018

Package canvasxpress

Package messaging. May 27, 2018

Package trajectories

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package projector. February 27, 2018

Package jpmesh. December 4, 2017

Package facerec. May 14, 2018

Package robotstxt. November 12, 2017

Package qualmap. R topics documented: September 12, Type Package

Package fitbitscraper

Package SEMrushR. November 3, 2018

Package WordR. September 7, 2017

Package waver. January 29, 2018

Package mdftracks. February 6, 2017

Package validara. October 19, 2017

Package rbgm. May 18, 2018

Package dkanr. July 12, 2018

Package bisect. April 16, 2018

Package geogrid. August 19, 2018

Package rpostgislt. March 2, 2018

Package ECctmc. May 1, 2018

Package tidytransit. March 4, 2019

Package kdtools. April 26, 2018

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package packcircles. April 28, 2018

Package ASICS. January 23, 2018

Package crossword.r. January 19, 2018

Package gtrendsr. October 19, 2017

Package rsppfp. November 20, 2018

Package data.world. April 5, 2018

Package dbx. July 5, 2018

Package RODBCext. July 31, 2017

Package opencage. January 16, 2018

Package semver. January 6, 2017

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package docxtools. July 6, 2018

Package mapsapi. March 12, 2018

Package comparedf. February 11, 2019

Package nlgeocoder. October 8, 2018

Package rnrfa. April 13, 2018

Package calpassapi. August 25, 2018

Package repec. August 31, 2018

Package datasets.load

Package balance. October 12, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package xtractomatic

Package cancensus. February 4, 2018

Package wdman. January 23, 2017

Package mapr. April 11, 2017

Package xtractomatic

Package tidylpa. March 28, 2018

Package rmapzen. October 7, 2018

Package rnaturalearth

Package IATScore. January 10, 2018

Package gtrendsr. August 4, 2018

Package clipr. June 23, 2018

Package splithalf. March 17, 2018

Package queuecomputer

Package textrecipes. December 18, 2018

Package postal. July 27, 2018

Package bikedata. April 27, 2018

Package lexrankr. December 13, 2017

Package tidytree. June 13, 2018

Package effectr. January 17, 2018

Package githubinstall

Package gfcanalysis. August 29, 2016

Package tiler. June 9, 2018

Package widyr. August 14, 2017

Package rzeit2. January 7, 2019

Package spark. July 21, 2017

Package sfdct. August 29, 2017

Package wikitaxa. December 21, 2017

Package scrubr. August 29, 2016

Package edfreader. R topics documented: May 21, 2017

Package MetaLonDA. R topics documented: January 22, Type Package

Package available. November 17, 2017

Package mapr. March 21, 2018

Package datapasta. January 24, 2018

Package barcoder. October 26, 2018

Package keyholder. May 19, 2018

Package NFP. November 21, 2016

Package TrafficBDE. March 1, 2018

Package climber. R topics documented:

Package vinereg. August 10, 2018

Package statsdk. September 30, 2017

Package oec. R topics documented: May 11, Type Package

Package auctestr. November 13, 2017

Package catenary. May 4, 2018

Package preprosim. July 26, 2016

Package areal. December 31, 2018

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package gifti. February 1, 2018

Package breakdown. June 14, 2018

Package gwfa. November 17, 2016

Transcription:

Package TrajDataMining January 15, 2018 Type Package Title Trajectories Data Mining Version 0.1.5 Date 2018-01-08 Contains a set of methods for trajectory data preparation, such as filtering, compressing and clustering, and for trajectory pattern discovery. License MIT + file LICENSE LazyData TRUE Encoding UTF-8 Depends R (>= 3.0.0) Imports sp, trajectories, rgdal, xts, rgeos, ggplot2, spacetime, RPostgreSQL, geosphere, methods, magrittr Suggests testthat, knitr, rmarkdown, covr VignetteBuilder knitr URL https://github.com/inpetrajectories/trajdatamining RoxygenNote 6.0.1 NeedsCompilation no Author [aut, cre], Karine Reis [ctb], Rafael Santos [ctb], Carlos Alberto [ctb], Felipe Carvalho [ctb] Maintainer <dvm1607@gmail.com> Repository CRAN Date/Publication 2018-01-15 13:45:13 UTC 1

2 A1 R topics documented: A1.............................................. 2 A2.............................................. 3 createspatialcluster..................................... 3 DataSourceInfo-class.................................... 4 directioncluster....................................... 5 douglaspeucker....................................... 6 douglaspeuckerrp..................................... 7 IndexToTrack........................................ 7 LimitedNeighborhood.................................... 8 owmeratniaby....................................... 9 owmeratniabycollection.................................. 10 partner............................................ 11 RightSize.......................................... 12 sendpartnerpairstodb................................... 13 singledifftrack-class..................................... 14 SlowestNeighborhood.................................... 14 speedcluster......................................... 15 speedfilter.......................................... 16 trackscollection....................................... 16 Index 18 A1 A trajectory of elephant sea object that contains distance, duration, speed and direction. A1 Format A trajectory with 2218 rows and 7 columns: id id each point of trajectory x latitude y longitude] time time stamps of the track points endtime end time stamps of the track points timeindex time index ones ones of the track

A2 3 A2 A trajectory of elephant sea A object that contains distance, duration, speed and direction. A2 Format A trajectory with 2148 rows and 7 columns: id id each point of trajectory x latitude y longitude] time time stamps of the track points endtime end time stamps of the track points timeindex id of time stamps ones ones of the track createspatialcluster Create Spatial Cluster Method for create a spatial cluster createspatialcluster(a3, clusterlist) ## S4 method for signature 'Track,list' createspatialcluster(a3, clusterlist) A3 clusterlist Track object list of cluster positions create spatial objects

4 DataSourceInfo-class cluster of polygons Deigo Monteiro Examples spcluster<-createspatialcluster(a1,speedcluster(a1,mean(a1@connections$speed), 12,min(A1@connections$speed)+4)) DataSourceInfo-class Data Source Info Class to connect in a database Slots user User of database title Title of database accessdriver The database access driver host Host of the database (e.g. localhost) port Port the database (e.g. 5432) timeout Timeout time of connection password Password of database db Database name encoding Encoding of database (e.g.cp1252 ) dbtype The type of the database (e.g. POSTGIS) path Path of the database

directioncluster 5 directioncluster Direction Cluster That given a Track and maximum change parameter, returns regions where direction changed more than the defined parameter directioncluster(track, mind, mint, tolerance) ## S4 method for signature 'Track,numeric,numeric,numeric' directioncluster(track, mind, mint, tolerance) track mind mint tolerance Represents a single trajectory followed by a person, animal or object Is the minimun direction change Is the minimun period at the speed Is the maximum change parameter returns regions where direction changed more than the defined parameter Examples cluster<-createspatialcluster(a1,directioncluster(a1,5,10,2))

6 douglaspeucker douglaspeucker Douglas Peucker Douglas-Peucker which reduces trajectories by preserving spatial precisions douglaspeucker(a1, dist) ## S4 method for signature 'Track,numeric' douglaspeucker(a1, dist) A1 dist Represents a single trajectory followed by a person, animal or object Distance time series reduces trajectories by preserving spatial precisions Examples ## Not run: library(ggplot2) dist <- max(a1@connections$distance) douglasp <- douglaspeucker(a1,dist) df <- data.frame(x=douglasp@sp@coords[,1],y=douglasp@sp@coords[,2]) ggplot(df,aes(x=df$x,y=df$y))+geom_path(aes(group = 1)) ## End(Not run)

douglaspeuckerrp 7 douglaspeuckerrp Douglas Peucker RP Method that reduces a trajectory spatially with first point and last point douglaspeuckerrp(a1, firstp, lastp, dist) ## S4 method for signature 'Track,numeric,numeric,numeric' douglaspeuckerrp(a1, firstp, lastp, dist) A1 firstp lastp dist track object given first point given last point distance Examples doug <- douglaspeuckerrp(a1,20,200,2000) IndexToTrack Conversão de index pra track Conversão de index pra track IndexToTrack(A1, index)

8 LimitedNeighborhood A1 index Track object An index list track object LimitedNeighborhood Limited Neighborhood Check the limite of Neighborhood LimitedNeighborhood(track, ini, mint, cln, cl, avg, sl) track ini mint cln cl avg sl Represents a single trajectory followed by a person, animal or object Order list of track speed Is the minimun period at the speed Cluster identification Empty list Average value of speed Is the speed limit

owmeratniaby 9 owmeratniaby Ow Meratnia By Method that reduces trajectories spatiotemporally owmeratniaby(a1, dist, speed) ## S4 method for signature 'Track,numeric,numeric' owmeratniaby(a1, dist, speed) A1 dist speed Represents a single trajectory followed by a person, animal or object. Distance time series Speed of track Reduces trajectories spatiotemporally Examples ## Not run: library(ggplot2) speed <- max (A1@connections$speed) distance <- max (A1@connections$distance) ow <- owmeratniaby(a1,distance,speed) df <- data.frame(x=ow@sp@coords[,1],y=ow@sp@coords[,2]) ggplot(df,aes(x=df$x,y=df$y))+geom_path(aes(group = 1), arrow = arrow(),color='blue') ## End(Not run)

10 owmeratniabycollection owmeratniabycollection Ow Meratnial By Collection Method that reduces a set of trajectories spatiotemporally owmeratniabycollection(a1, dist, speed) ## S4 method for signature 'TracksCollection,numeric,numeric' owmeratniabycollection(a1, dist, speed) A1 dist speed Represents a collection of trajectories followed by different persons, animals or objects Distance time series Speed of object Trajectory spatiotemporally reduced Examples library(magrittr) library(sp) library(ggplot2) ow <-owmeratniabycollection(trackscollection,13804.84,0.03182201) %>% coordinates() df <- data.frame(x=ow[,1],y=ow[,2]) ggplot(df,aes(x=x,y=y))+geom_path(aes(group = 1), arrow = arrow(),color='blue')

partner 11 partner Partner Method to recognize trajectories that stay together, based on trajectory distance time series analysis partner(a1, A2, dist, maxtime, mintime, datasource, tablename) ## S4 method for signature ## 'Track,Track,numeric,numeric,numeric,DataSourceInfo,character' partner(a1, A2, dist, maxtime, mintime, datasource, tablename) ## S4 method for signature ## 'Track,Track,numeric,numeric,numeric,PostgreSQLConnection,character' partner(a1, A2, dist, maxtime, mintime, datasource, tablename) ## S4 method for signature ## 'Track,Track,numeric,numeric,numeric,logical,missing' partner(a1, A2, dist, maxtime, mintime, datasource, tablename) ## S4 method for signature ## 'TracksCollection,missing,numeric,numeric,numeric,missing,missing' partner(a1, A2, dist, maxtime, mintime, datasource, tablename) ## S4 method for signature ## 'TracksCollection, ## TracksCollection, ## numeric, ## numeric, ## numeric, ## missing, ## missing' partner(a1, A2, dist, maxtime, mintime, datasource, tablename)

12 RightSize ## S4 method for signature ## 'TracksCollection,Track,numeric,numeric,numeric,missing,missing' partner(a1, A2, dist, maxtime, mintime, datasource, tablename) A1 A2 dist maxtime mintime datasource tablename Represents a single trajectory followed by a person, animal or object. Represents a single trajectory followed by a person, animal or object. Ristance that two objects can stay apart Maximum time period that two objects can stay apart Minimum time period that two objects must stay together Is object class DataSourceInfo The name of the table database List with begin time and end time stamps of two objects partner Examples partner(a1,a2,110792,2277,0,false) RightSize Right size verifier Right size verifier RightSize(diffTracks, begintime, endtime, sizemultiplier) difftracks Difftrack begintime Begin time endtime End time sizemultiplier number will multiplier the diff

sendpartnerpairstodb 13 boolean sendpartnerpairstodb send Partner Pairs To DataBase Method that sends found partners to a PostGIS database Method that sends found partners to a PostGIS database with object DataSourceInfo Method that sends found partners to a PostGIS database using object PosgreSQLConnection sendpartnerpairstodb(dataframe, datasourceinfo, tablename) ## S4 method for signature 'list,datasourceinfo,character' sendpartnerpairstodb(dataframe, datasourceinfo, tablename) ## S4 method for signature 'list,postgresqlconnection,character' sendpartnerpairstodb(dataframe, datasourceinfo, tablename) dataframe Dataframe list datasourceinfo A object class datasourceinfo tablename Name of table send the partners list for a database

14 SlowestNeighborhood singledifftrack-class Sigle diff track My compare method get distances between 2 Track objects for each point in time where they overlap and create a corresponding line tr1 tr2 represents a single trajectory followed by a person, animal or object. represents a single trajectory followed by a person, animal or object. Details @import xts a difftrack object SlowestNeighborhood Slowest Neighborhood Method for check slowest neighborhood SlowestNeighborhood(track, ini, mint, cl) track ini mint cl Represents a single trajectory followed by a person, animal or object Order list of track speed Is the minimun period at the speed Empty list

speedcluster 15 speedcluster Speed Cluster Method for check the regions where speed was lower than the defined parameter speedcluster(track, avg, mint, sl) ## S4 method for signature 'Track,numeric,numeric,numeric' speedcluster(track, avg, mint, sl) track avg mint sl Represents a single trajectory followed by a person, animal or object Is the average speed of track Is the minimun period at the speed of track Is the speed limit of track Details Order the speed so it will start with the slowest speed cluster Returns regions where speed was lower than the defined parameter Examples avgspeed <- mean(a1@connections$speed) minspeed <- min(a1@connections$speed) speed <- speedcluster(a1,avgspeed,minspeed,586)

16 trackscollection speedfilter Speed filter A speed filter that filters out trajectory observations whose speeds are above a user-defined maximum velocity speedfilter(a1, speed) ## S4 method for signature 'Track,numeric' speedfilter(a1, speed) A1 speed Represents a single trajectory followed by a person, animal or object Is the maximum speed parameter Examples library(ggplot2) speed <- min(a1@connections$speed) sf <- speedfilter(a1,speed) df <- data.frame(x=sf@sp@coords[,1],y=sf@sp@coords[,2]) ggplot(df,aes(x=df$x,y=df$y))+geom_path(aes(group = 1), arrow = arrow(),color='blue') trackscollection A tracks colleection of a plataform argos A dataset containing tracks objects trackscollection

trackscollection 17 Format A trajectory with 7 columns: id id rows xmin latitude minimum xmax latitude maximum ymin longitude minimum ymax longitude maximum tmax maximum time tmin minimum time timeindex time index n ones of the track

Index Topic datasets A1, 2 A2, 3 trackscollection, 16 A1, 2 A2, 3 createspatialcluster, 3 createspatialcluster,track,list-method (createspatialcluster), 3 DataSourceInfo (DataSourceInfo-class), 4 DataSourceInfo-class, 4 directioncluster, 5 directioncluster,track,numeric,numeric,numeric-method (directioncluster), 5 douglaspeucker, 6 douglaspeucker,track,numeric-method (douglaspeucker), 6 douglaspeuckerrp, 7 douglaspeuckerrp,track,numeric,numeric,numeric-method IndexToTrack, 7 (douglaspeuckerrp), 7 LimitedNeighborhood, 8 owmeratniaby, 9 owmeratniaby,track,numeric,numeric-method (owmeratniaby), 9 owmeratniabycollection, 10 owmeratniabycollection,trackscollection,numeric,numeric-method (owmeratniabycollection), 10 partner,track,track,numeric,numeric,numeric,postgresqlconn (partner), 11 partner,trackscollection,missing,numeric,numeric,numeric,m (partner), 11 partner,trackscollection,track,numeric,numeric,numeric,mis (partner), 11 partner,trackscollection,trackscollection,numeric,numeric, (partner), 11 RightSize, 12 sendpartnerpairstodb, 13 sendpartnerpairstodb,list,datasourceinfo,character-method (sendpartnerpairstodb), 13 sendpartnerpairstodb,list,postgresqlconnection,character-m (sendpartnerpairstodb), 13 singledifftrack-class, 14 SlowestNeighborhood, 14 speedcluster, 15 speedcluster,track,numeric,numeric,numeric-method (speedcluster), 15 speedfilter, 16 speedfilter,track,numeric-method (speedfilter), 16 trackscollection, 16 partner, 11 partner,track,track,numeric,numeric,numeric,datasourceinfo,character-method (partner), 11 partner,track,track,numeric,numeric,numeric,logical,missing-method (partner), 11 18