packcircles

R package for circle packing

https://github.com/mbedward/packcircles

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R package for circle packing

Basic Info
  • Host: GitHub
  • Owner: mbedward
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 178 KB
Statistics
  • Stars: 58
  • Watchers: 4
  • Forks: 7
  • Open Issues: 1
  • Releases: 5
Created about 11 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

R-CMD-check <!-- badges: end -->

packcircles

R package for circle packing. Algorithms to find arrangements of non-overlapping circles

This package provides functions to find non-overlapping arrangements of circles.

The function circleRepelLayout attempts to arrange a set of circles of specified radii within a rectangle such that there is no-overlap between circles. The algorithm is adapted from an example written in Processing by Sean McCullough (which no longer seems to be available online). It involves iterative pair-repulsion, in which overlapping circles move away from each other. The distance moved by each circle is proportional to the radius of the other to approximate inertia (very loosely), so that when a small circle is overlapped by a large circle, the small circle moves furthest. This process is repeated iteratively until no more movement takes place (acceptable layout) or a maximum number of iterations is reached (layout failure). To avoid edge effects, the bounding rectangle is treated as a toroid. Each circle's centre is constrained to lie within the rectangle but its edges are allowed to extend outside.

The function circleProgressiveLayout arranges a set of circles, which are denoted by their sizes, by consecutively placing each circle externally tangent to two previously placed circles while avoiding overlaps. It was adapted from a version written in C by Peter Menzel. The underlying algorithm is described in the paper: Visualization of large hierarchical data by circle packing by Weixin Wang et al. (2006).

The function circleRemoveOverlaps takes an initial set of overlapping circles and attempts to find a non-overlapping subset or, optionally, a subset with some specified degree of overlap. Circle positions remain fixed. It provides several fast heuristic algorithms to choose from, as well as two based on linear programming. For the latter, package lpSolve must be installed.

The function circleGraphLayout is an initial Rcpp port of an algorithm described by Collins and Stephenson (2003) to find an arrangement of circles which corresponds to a graph of desired circle tangencies. The implementation is based on a Python version by David Eppstein (see CirclePack.py in the PADS library.

To install:

  • the latest released version: install.packages("packcircles")
  • the latest development version (usually the same): remotes::install_github("mbedward/packcircles")

See also:

The ggcirclepack package which makes it easier to add circles created with at least one of the packcircles functions to ggplot2 graphs.

Share and enjoy!

Owner

  • Name: Michael Bedward
  • Login: mbedward
  • Kind: user
  • Location: Sydney, Australia
  • Company: University of Wollongong

Ecologist. Coder. Data masseur.

GitHub Events

Total
  • Issues event: 1
  • Watch event: 2
  • Issue comment event: 1
  • Push event: 4
  • Pull request review event: 1
  • Pull request event: 2
Last Year
  • Issues event: 1
  • Watch event: 2
  • Issue comment event: 1
  • Push event: 4
  • Pull request review event: 1
  • Pull request event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 83
  • Total Committers: 1
  • Avg Commits per committer: 83.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
mbedward m****d@g****m 83

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 6
  • Total pull requests: 1
  • Average time to close issues: 7 months
  • Average time to close pull requests: about 9 hours
  • Total issue authors: 6
  • Total pull request authors: 1
  • Average comments per issue: 4.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 9 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • discoleo (1)
  • ceci-m-c (1)
  • hope-data-science (1)
  • mbedward (1)
  • r2evans (1)
  • JeffreyBLewis (1)
Pull Request Authors
  • davidgohel (2)
Top Labels
Issue Labels
bug (2) enhancement (2) question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 2,071 last-month
  • Total docker downloads: 20,704
  • Total dependent packages: 4
  • Total dependent repositories: 10
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: packcircles

Circle Packing

  • Versions: 10
  • Dependent Packages: 4
  • Dependent Repositories: 10
  • Downloads: 2,071 Last month
  • Docker Downloads: 20,704
Rankings
Stargazers count: 6.3%
Downloads: 7.6%
Forks count: 8.7%
Dependent repos count: 9.2%
Dependent packages count: 9.3%
Average: 11.1%
Docker downloads count: 25.7%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2 depends
  • Rcpp >= 1.0.0 imports
  • ggiraph * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • lpSolve * suggests
  • rmarkdown * suggests