‘You Draw It’: Implementation of Visually Fitted Trends with r2d3
Volume 21, Issue 2 (2023): Special Issue: Symposium Data Science and Statistics 2022, pp. 281–294
Pub. online: 12 January 2023
Type: Computing In Data Science
Open Access
Received
29 July 2022
29 July 2022
Accepted
23 December 2022
23 December 2022
Published
12 January 2023
12 January 2023
Abstract
How do statistical regression results compare to intuitive, visually fitted results? Fitting lines by eye through a set of points has been explored since the 20th century. Common methods of fitting trends by eye involve maneuvering a string, black thread, or ruler until the fit is suitable, then drawing the line through the set of points. In 2015, the New York Times introduced an interactive feature, called ‘You Draw It,’ where readers are asked to input their own assumptions about various metrics and compare how these assumptions relate to reality. This research is intended to implement ‘You Draw It’, adapted from the New York Times, as a way to measure the patterns we see in data. In this paper, we describe the adaptation of an old tool for graphical testing and evaluation, eye-fitting, for use in modern web-applications suitable for testing statistical graphics. We present an empirical evaluation of this testing method for linear regression, and briefly discuss an extension of this method to non-linear applications.
Supplementary material
Supplementary Material
•
‘You Draw It’ Demonstration Applet: The shiny app used to demonstrate the ‘You Draw It’ method can be accessed at https://emily-robinson.shinyapps.io/can-you-draw-it/.
•
Participant Data (Linear): De-identified participant data collected in the linear study and used for analyses are available to be downloaded from GitHub at https://github.com/earobinson95/sdss-2022-you-draw-it-manuscript/raw/master/data/eyefitting-model-data.csv.
•
Participant Data (Non-linear): De-identified participant data collected in the non-linear study and used for analyses are available to be downloaded from GitHub at https://github.com/earobinson95/sdss-2022-you-draw-it-manuscript/raw/master/data/youdrawit-model-data.csv.
•
Data Analysis Code: The code used to replicate the linear and non-linear study analysis in this paper can be found at https://github.com/earobinson95/sdss-2022-you-draw-it-manuscript/blob/master/analysis/data-analysis.Rmd.
References
Bates D, Mächler M, Bolker B, Walker S (2015). Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1): 1–48. https://doi.org/10.18637/jss.v067.i01.
Furic B (2017). “You-Draw-It-Graph: The User Can Draw His Own Graph Line and Compare with the Reality.” GitHub. https://github.com/BenoitFuric/you-draw-it-graph.
Pearce A (2019). “You-Draw-It.” Observable. https://bl.ocks.org/1wheel/07d9040c3422dac16bd5be741433ff1e.
R Core Team (2022). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
Strayer N, Luraschi J, Allaire JJ (2020). R2d3: Interface to ‘D3’ Visualizations. https://CRAN.R-project.org/package=r2d3.
US Energy Information Administration (2022). Weekly U.S. All Grades All Formulations Retail Gasoline Prices (Dollars Per Gallon). US Energy Information Administration Independent Statistics & Analysis. https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=EMM_EPM0_PTE_NUS_DPG&f=W.