Template talk:Opinion polling for the 2021 New York City mayoral election/Democratic primary

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Question regarding averaging for trendlines[edit]

@Stroopwafels: First off, thank you for being so diligent in maintaining this polling data. Because it is stored outside the main article, I wasn't aware of your fastidious upkeep! I noticed that with the latest updates, one set of data for 6/13 seems to be ignored in the creation of the trendline. Instead of taking an average of each candidate's polling from results ending 6/13, it only uses one (but still shows charts both results as points on the chart). This is perhaps an error in the underlying code, but I wanted to see if you had any insight. Is it a known issue? Thanks again. Shoestringnomad (talk) 21:44, 14 June 2021 (UTC)[reply]

@Shoestringnomad: It's a known issue, the MediaWiki chart seems to try to fit the spline to include both points but it only uses the last one. A pseudo-fix to avoid overlaying the points would be to example add exact timestamps (e.g. 00:00 and 12:00) to the dates for these polls to offset them slightly but it won't try to average them by design it looks because it always uses the last point. Stroopwafels (talk) 21:49, 14 June 2021 (UTC)[reply]