Skip to content

flowcluster

0.2.2Package record

Cluster Origin-Destination Flow Data

0packages depend
2.5Kdownloads / year
97.1%test coverage
12/13flavors OK

Overview

About

Provides functionality for clustering origin-destination (OD) pairs, representing desire lines (or flows). This includes creating distance matrices between OD pairs and passing distance matrices to a clustering algorithm. See the academic paper Tao and Thill (2016) doi:10.1111/gean.12100 for more details on spatial clustering of flows. See the paper on delineating demand-responsive operating areas by Mahfouz et al. (2025) doi:10.1016/j.urbmob.2025.100135 for an example of how this package can be used to cluster flows for applied transportation research.

Changes in 0.2.2
  • Fixed the CRAN check issue addressed in PR #35 by correcting the clustering validation logic for MinPts.

From NEWS.md in the release

Install

Health

CRAN checks
1ERROR12OK
Check messages
ERRORtestsr-patched-linux-x86_64
Running ‘testthat.R’ [13s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(flowcluster)
  > 
  > test_check("flowcluster")
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Linking to GEOS 3.15.0, GDAL 3.13.3, PROJ 9.9.0; sf_use_s2() is TRUE
  Flows remaining after filtering: 328 (32.8%)
  Extracting start and end coordinates from flow geometries...
  Adding x, y, u, v columns to flow data...
  Assigning unique flow IDs..
...[truncated]...
ng: 23 (11.5%)
  Extracting start and end coordinates from flow geometries...
  Adding x, y, u, v columns to flow data...
  Assigning unique flow IDs...
  Flows remaining after filtering: 10 (10%)
  Extracting start and end coordinates from flow geometries...
  Adding x, y, u, v columns to flow data...
  Assigning unique flow IDs...
  [ FAIL 1 | WARN 84 | SKIP 0 | PASS 63 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-clustering.R:66:3'): dbscan_sensitivity: runs without error ────
  Error: minPts must be a single, finite, integer-valued number >= 1.
  Backtrace:
      ▆
   1. └─flowcluster::dbscan_sensitivity(...) at test-clustering.R:66:3
   2.   └─flowcluster::cluster_flows_dbscan(...)
   3.     └─dbscan::dbscan(x = dist_mat, eps = eps, minPts = minPts, weights = w_vec)
   4.       └─dbscan:::.validate_integer_scalar(minPts, "minPts")
  
  [ FAIL 1 | WARN 84 | SKIP 0 | PASS 63 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 1.5 min · r-oldrel-windows-x86_64
Status changes
  • ERROR12 OK, 1 ERRORNow
  • ERROR11 OK, 2 ERROR2026-10-05
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.2.2
READMEYes · 1,408 wordsVignettesNoNEWSYes · 100% structured · mentions 0.2.2Citation fileNoWebsiteYes · pkgdown
Help pages
11 (1 internal)
Examples that run
100%9 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
9%

Downloads

2.5K
CRAN downloads in the past year
Rank #17,366 · ~7/day · ~206/mo
Daily download trend is not available in this view yet.
32430 days
73290 days
2.5K1 year
Compare downloads with other packages →
Also on55 r2u7 autocran

Repository

5Stars
1Forks
2Open issues
0Open PRs
2Releases
111Commits
3Commit identities
111 commits · Last activity 2026-10-13 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
3
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-18 · 52026-07-07 · 5
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/hussein-mahfouz/flowcluster on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.qmdpkgdown

GitHub Pages site last deployed 2026-10-13 · The repository has a site deploy workflow

pkgdown site last built 2026-10-13

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing flowcluster adds 31 packages (22 with compiled code, 39 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, dbscan 3.8 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.1.0 (2025)
Releases (3)

Pick two releases to compare their code metrics.

  • 0.2.2Latest
    record
    2026-10-13 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.1
    record
    2025-08-21 · diff ↗ ·
    added 1 export
    aggregate_clustered_flows
  • 0.1.0
    record
    2025-07-05
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-07-05
Total releases
3 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
49 KB / 1 file
Download size
1.9 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("flowcluster")
Mahfouz, H., & Lovelace, R. (2026). flowcluster: Cluster Origin-Destination Flow Data (Version 0.2.2) [Computer software]. https://doi.org/10.32614/CRAN.package.flowcluster

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for flowcluster version 0.2.2 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy