The idea of an "epoch" is to provide a grouping of years of into time periods that can be
characterized by some theme.
define_epoch() creates a data structure defining historical epochs or use in
timeline visualizations, or analysis of milestones items.
It returns a data frame with epoch boundaries, labels,
and calculated midpoints.
Arguments
- breaks
Numeric vector of boundary years (for custom epochs). Must be sorted in ascending order.
- labels
Character vector of epoch names. Length must be one less than length of
breaks.- descriptions
Optional character vector of longer descriptions for each epoch.
- style
Character. Either "default" to use predefined epochs, or "custom" to use provided
breaksandlabels.- extend
Character or logical. How to extend the default epochs:
NULLorFALSE: Use defaults as-is (1500-2000)"before": Add Prehistory epoch (-Inf to 1500)"after": Add Digital Age epoch (2000 to current year)"both"orTRUE: Add both Prehistory and Digital Age
Only used when
style = "default".- x
An object of class
"milestone_epochs".- ...
Additional arguments (currently ignored).
Value
A data frame of class c("milestone_epochs", "data.frame") with
one row per epoch.
Invisibly returns the input object.
Details
The functions epoch_boundaries() and get_epoch() provide tools for working with epochs
in relation to milestones events.
The default epochs are based on the period classification described in Friendly et al. (2015)
for use in producing timeline with interpretable labels. The extend argument allows these
defaults to be extended to earlier or later periods.
1500-1600: Early maps & diagrams
1600-1700: Measurement & theory
1700-1800: New graphic forms
1800-1850: Modern age
1850-1900: Golden Age
1900-1950: Dark age
1950-1975: Re-birth
1975-2000: Hi-Dim Vis
You can create your own time epochs using style = "custom" and providing breaks and labels
The returned data frame has class c("milestone_epochs", "data.frame")
and contains columns:
epoch_id: Sequential identifier (1, 2, 3, ...)start: Start year of epochend: End year of epochlabel: Short display namemidpoint: (start + end) / 2, useful for label positioningdescription: Optional longer description
References
Friendly, M., Sigal, M. & Harnanansingh, D. (2015). "The Milestones Project: A Database for the History of Data Visualization." In Kimball, M. & Kostelnick, C. (Eds.) Visible Numbers: The Historyof Data Visualization, Chapter 10.
Examples
# Get default epochs
epochs <- define_epochs()
print(epochs)
#> Milestone Epochs
#> Number of epochs: 8
#> Time range: 1500 to 2000
#>
#> 1 1500-1600: Early maps & diagrams
#> 2 1600-1700: Measurement & theory
#> 3 1700-1800: New graphic forms
#> 4 1800-1850: Modern age
#> 5 1850-1900: Golden Age
#> 6 1900-1950: Dark age
#> 7 1950-1975: Re-birth
#> 8 1975-2000: Hi-Dim Vis
# print it just as a plain data.frame
as.data.frame(epochs)
#> epoch_id start end label midpoint
#> 1 1 1500 1600 Early maps & diagrams 1550.0
#> 2 2 1600 1700 Measurement & theory 1650.0
#> 3 3 1700 1800 New graphic forms 1750.0
#> 4 4 1800 1850 Modern age 1825.0
#> 5 5 1850 1900 Golden Age 1875.0
#> 6 6 1900 1950 Dark age 1925.0
#> 7 7 1950 1975 Re-birth 1962.5
#> 8 8 1975 2000 Hi-Dim Vis 1987.5
#> description
#> 1 Early cartography and diagrams
#> 2 Mathematical measurement and theory development
#> 3 Innovation in graphical forms
#> 4 Emergence of modern statistical graphics
#> 5 Golden age of data graphics and thematic cartography
#> 6 Decline in statistical graphics innovation
#> 7 Revival of statistical graphics and visualization
#> 8 High-dimensional visualization and computer graphics
# Extend with Prehistory and Digital Age
extended <- define_epochs(extend = TRUE)
print(extended)
#> Milestone Epochs
#> Number of epochs: 10
#> Time range: ... to 2026
#>
#> 1 ...-1500: Prehistory
#> 2 1500-1600: Early maps & diagrams
#> 3 1600-1700: Measurement & theory
#> 4 1700-1800: New graphic forms
#> 5 1800-1850: Modern age
#> 6 1850-1900: Golden Age
#> 7 1900-1950: Dark age
#> 8 1950-1975: Re-birth
#> 9 1975-2000: Hi-Dim Vis
#> 10 2000-2026: Digital Age
# Extend only before
with_prehistory <- define_epochs(extend = "before")
# Define custom epochs (4 breaks creates 3 intervals)
my_epochs <- define_epochs(
breaks = c(1600, 1750, 1900, 2000),
labels = c("Early Modern", "Enlightenment", "Industrial"),
style = "custom"
)
# Get epoch boundaries for plotting vertical lines
boundaries <- epoch_boundaries(epochs)
# ---- Relating milestone items to epochs ----
# Load milestone data
ms <- milestone()
# Attach epoch labels to each milestone
ms$epoch <- get_epoch(ms$date_from_numeric, extended)
# Create a frequency table of milestones by epoch
table(ms$epoch, useNA = "ifany")
#>
#> Dark age Digital Age Early maps & diagrams
#> 43 5 11
#> Golden Age Hi-Dim Vis Measurement & theory
#> 59 40 27
#> Modern age New graphic forms Prehistory
#> 39 34 17
#> Re-birth
#> 22
# Or as a data frame with counts
as.data.frame(table(epoch = ms$epoch))
#> epoch Freq
#> 1 Dark age 43
#> 2 Digital Age 5
#> 3 Early maps & diagrams 11
#> 4 Golden Age 59
#> 5 Hi-Dim Vis 40
#> 6 Measurement & theory 27
#> 7 Modern age 39
#> 8 New graphic forms 34
#> 9 Prehistory 17
#> 10 Re-birth 22
# Get summary statistics for each epoch: count, min year, max year
# (in epoch order, not alphabetical)
by_epoch <- split(ms$date_from_numeric, factor(ms$epoch, levels = extended$label))
data.frame(n = lengths(by_epoch),
min_year = sapply(by_epoch, min),
max_year = sapply(by_epoch, max))
#> n min_year max_year
#> Prehistory 17 -6200 1453
#> Early maps & diagrams 11 1500 1581
#> Measurement & theory 27 1600 1693
#> New graphic forms 34 1701 1798
#> Modern age 39 1800 1846
#> Golden Age 59 1850 1899
#> Dark age 43 1900 1944
#> Re-birth 22 1957 1974
#> Hi-Dim Vis 40 1975 1999
#> Digital Age 5 2002 2009
