Manipulate and Map Origin-Destination Data
Convert coordinates into a data frame of origins and destinations
Aggregate od pairs based on aggregating zones
Interleave origin and destination coordinates
Convert origin-destination coordinates into geographic desire lines
Create matrices representing origin-destination coordinates
Split-up each OD pair into multiple OD pairs based on subpoints/subzon...
Filter OD datasets
Generate ordered ids of OD pairs so lowest is always first This functi...
Combine two ID values to create a single ID number
Return only interzonal (io intrazonal) OD pairs
Move desire line end points within zone to avoid all trips going to a ...
Aggregate OD pairs they become non-directional
Create a subsample of points from a route network for jittering
Convert OD data into lines with start and end points sampled on a netw...
Convert origin-destination data from long to wide format
Convert OD data into geographic 'desire line' objects
Convert origin-destination coordinates into geographic desire lines
Convert origin-destination data from wide to long format
Convert a series of points into a dataframe of origins and destination...
Extract coordinates from sfc objects with point geometry
The aim of 'od' is to provide tools and example datasets for working with origin-destination ('OD') datasets of the type used to describe aggregate urban mobility patterns (Carey et al. 1981) <doi:10.1287/trsc.15.1.32>. The package builds on functions for working with 'OD' data in the package 'stplanr', (Lovelace and Ellison 2018) <doi:10.32614/RJ-2018-053> with a focus on computational efficiency and support for the 'sf' class system (Pebesma 2018) <doi:10.32614/RJ-2018-009>. With few dependencies and a simple class system based on data frames, the package is intended to facilitate efficient analysis of 'OD' datasets and to provide a place for developing new functions. The package enables the creation and analysis of geographic entities representing large scale mobility patterns, from daily travel between zones in cities to migration between countries.
Useful links