knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

visged

R-CMD-check CodeFactor

Produce a variety of visualisations for family tree GEDCOM files.

The package is part of the gedcompendium ecosystem of packages. This ecosystem enables the handling of tidyged objects (tibble representations of GEDCOM files), and the main package of this ecosystem is tidyged.

knitr::include_graphics("man/figures/allhex.png")

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("jl5000/visged")

Example

library(tidyged)
library(visged)

sw <- gedcom() |>
  add_indi(sex = "M", indi_notes = "The central character in the Star Wars Skywalker Saga") |>
  add_indi_names(name_pieces(given = "Anakin", surname = "Skywalker"), type = "birth") |>
  add_indi_names(name_pieces(prefix = "Darth", given = "Vader"), type = "given") |>
  add_indi(sex = "F", indi_notes = "Queen of Naboo") |>
  add_indi_names(name_pieces(given = "Padme", surname = "Amidala"), type = "birth") |> 
  add_indi(sex = "F") |> 
  add_indi_names(name_pieces(given = "Leia", surname = "Skywalker"), type = "birth") |>
  add_indi_names(name_pieces(prefix = "Princess", given = "Leia", surname = "Organa"), type = "adoptive") |> 
  add_indi(sex = "M") |>
  add_indi_names(name_pieces(given = "Luke", surname = "Skywalker"), type = "birth") |> 
  add_indi(sex = "M") |> 
  add_indi_names(name_pieces(given = "Obi-Wan", nickname = "Ben", surname = "Kenobi"), type = "birth")

anakin_xref <- find_indi_name(sw, "Anakin")
padme_xref <- find_indi_name(sw, "Padme")
luke_xref <- find_indi_name(sw, "Luke")
leia_xref <- find_indi_name(sw, "Leia")

sw <- sw |>
  add_famg(husband = anakin_xref, wife = padme_xref, 
           children = c(luke_xref, leia_xref)) |>
  activate_indi(anakin_xref) |> 
  add_indi_fact("death", age = "45y", cause = "Killed by son Luke",
                fact_place = place("Second Death Star", notes = "Orbiting Endor System"))
pedigree_chart(sw, luke_xref)
knitr::include_graphics("man/figures/luke_pedigree.png")
descendancy_chart(sw, anakin_xref)
knitr::include_graphics("man/figures/anakin_descendancy.png")

If you would like to create charts showing more than one family group, it is highly recommended that you use the Topola Genealogy Viewer.

The package is also able to plot interactive timelines of facts for groups of individuals.



jl5000/visged documentation built on June 15, 2022, 8:38 p.m.