https://github.com/friendly/histdata
Data Sets from the History of Statistics and Data Visualization
https://github.com/friendly/histdata
graphics historical-data
Last synced: 5 months ago
JSON representation
Data Sets from the History of Statistics and Data Visualization
- Host: GitHub
- URL: https://github.com/friendly/histdata
- Owner: friendly
- Created: 2017-10-11T15:25:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-29T03:28:25.000Z (6 months ago)
- Last Synced: 2025-05-06T13:07:52.245Z (5 months ago)
- Topics: graphics, historical-data
- Language: R
- Homepage: https://friendly.github.io/HistData
- Size: 39.3 MB
- Stars: 63
- Watchers: 5
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
comment = "##",
fig.path = "man/figures/README-",
fig.height = 5,
fig.width = 5
# out.width = "100%"
)library(HistData)
```[](https://www.repostatus.org/#active)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://cran.r-project.org/package=HistData)
[](https://friendly.r-universe.dev/HistData)
[](https://cran.r-project.org/package=HistData)
[](https://zenodo.org/badge/latestdoi/106572219)
[](https://friendly.github.io/HistData/)# HistData
![]()
**Data Sets from the History of Statistics and Data Visualization**Dev. Version: 0.9-4
The `HistData` package provides a collection of small data sets
that are interesting and important in the history of statistics and data
visualization. The goal of the package is to make these available, both for
instructional use (as examples, problem sets or projects) and for historical research
(extending or criticizing a previous analysis).
Some of these present interesting challenges, or opportunities to "show off",
with graphics or analysis in R.Many of the data sets have examples which reproduce an historical graph or analysis.
These are meant mainly as starters for more extensive re-analysis or graphical
elaboration. If you are interested in any of these problems or data sets, I've purposely left
lots of room to do better!They are part of a program of research called *statistical historiography*
(Friendly, 2007; Friendly & Denis, 2001; Friendly et-al, 2016)
meaning the use of statistical methods to study problems and questions in the
history of statistics and graphics. A main aspect of this is the increased
understanding of historical problems in science and data analysis
trough the process of trying to reproduce a graph or analysis using
modern methods. I call this "Re-visioning", meaning _to see again, hopefully in a new light_.They are also used in our book, (Friendly & Wainer, 2021),
_A History of Data Visualization & Graphic Communication_, https://www.hup.harvard.edu/books/9780674975231.
See also the [companion website for this book](https://friendly.github.io/HistDataVis/).If you are looking more widely for datasets to use for examples, teaching or research, check out Vincent Arel-Bundock's
[Rdatasets](https://vincentarelbundock.github.io/Rdatasets/) package, with over 2200 datasets from various
R packages, with this list of [Available datasets](https://vincentarelbundock.github.io/Rdatasets/articles/data.html).### Data science
There is another R aspect that should be noted here:
A great deal of "data sciency" work was involved in constructing this package,
alas (for teaching) not captured in the resulting CRAN-friendly package.* In some cases, data had to be **extracted** from historical documents, using a variety of techniques (web scraping, OCR of PDS files followed by conversion to a data set), each problem with its own toolbox, in R or outside. In many cases, transcription errors had to be corrected
with code or manually;
* **digitization** of data from an image;
* **conversion** of text-based data sets to a CSV file and then to an `.RData` file with proper column names. Ever seen a Unix `.shar` (shell archive) file? Well, I have.
* **cleaning** variable names, e.g., using `janitor::clean_names()`, or, in some cases, manually editing an excel file.
* Applying **type-conversion**, e.g., `chr` to `factor` or `ordered`; constructing appropriate contrasts for factors to facilitate re-analysis.
* **tidying** data.frames: long <--> wide, abbreviations of character string labels, ...
* **documentation**: The thankless task? No -- considerable effort was made to give detailed descriptions, notes on methods, executable examples, references to original sources and
analyses, ...## Installation
Get the released version from CRAN
install.packages("HistData")
The development version can be installed to your R library directly from github or my [R-universe](https://friendly.r-universe.dev/) via:
install.packages('HistData', repos = 'https://friendly.r-universe.dev')
remotes::install_github("friendly/HistData")## Data sets
Here are the data sets in the package, with links to their documentation. Some topics are represented by two or more
data sets.```{r datasets, results='asis'}
# link dataset to pkgdown doc
refurl <- "https://friendly.github.io/HistData/reference/"dsets <- vcdExtra::datasets("HistData") |>
dplyr::select(Item, Title) |>
dplyr::mutate(Item = glue::glue("[{Item}]({refurl}{Item}.html)"))#knitr::kable(dsets)
library(tinytable)
# tt(dsets) |>
# format_tt(j = 1, markdown = TRUE) |>
# style_tt(j = 1, bootstrap_css = "width: 30%;") |>
# style_tt(j = 2, bootstrap_css = "width: 70%;")
tt(dsets, width = c(.2, .8)) |>
format_tt(j = 1, markdown = TRUE)
# save_tt("html") |>
# knitr::asis_output()
```## Contributors
Please note that the `HistData` project is released with a [Contributor Code of Conduct](https://friendly.github.io/HistData/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.Over the years, many people have contributed new data sets, offered corrections,
suggestions, or documentation examples. They are appreciatively listed below:David Bellhouse,
Brian Clair,
Stephane Dray,
Luiz Droubi,
Antoine de Falguerolles,
Monique Graf,
James Hanley,
Peter Li,
Dennis Murphy,
Jim Oeppen,
James Riley,
Neville Verlander,
Hadley Wickham.## References
Friendly, M. (2007). A Brief History of Data Visualization.
In Chen, C., Hardle, W. & Unwin, A. (eds.)
*Handbook of Computational Statistics: Data Visualization*, Springer-Verlag, III, Ch. 1, 1-34.
[Preprint](http://datavis.ca/papers/hbook.pdf)Friendly, M. & Denis, D. (2001).
Milestones in the history of thematic cartography, statistical graphics, and data visualization.
Web stite: [http://datavis.ca/milestones/](http://datavis.ca/milestones/)Friendly, M. & Sigal, M. & Harnanansingh, D. (2016).
"The Milestones Project: A Database for the History of Data Visualization,"
In Kostelnick, C. & Kimball, M. (ed.), *Visible Numbers: The History of Data Visualization*, Ashgate Press, Chapter 10. [Preprint](https://www.datavis.ca/papers/MilestonesProject.pdf)Friendly, M. & Wainer, H. (2021). _A History of Data Visualization and Graphic Communication_,
https://www.hup.harvard.edu/books/9780674975231,
Harvard University Press. Companion [web site](https://friendly.github.io/HistDataVis/)