WikiProject iconTelevision Template‑class
WikiProject iconThis template is within the scope of WikiProject Television, a collaborative effort to develop and improve Wikipedia articles about television programs. If you would like to participate, please visit the project page where you can join the discussion. For how to use this banner template, see its documentation.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Suggestions edit

Season Episode number Average Ref.
1 2 3 4 5 6 7 8 9 10
1 2.22 2.20 2.44 2.45 2.58 2.44 2.40 2.72 2.66 3.04 2.52 [1][2]
2 3.86 3.76 3.77 3.65 3.90 3.88 3.69 3.86 3.38 4.20 3.80 [2]
3 4.37 4.27 4.72 4.87 5.35 5.50 4.84 5.13 5.22 5.39 4.97 [3]
4 6.64 6.31 6.59 6.95 7.16 6.40 7.20 7.17 6.95 7.09 6.84 [4]
5 8.00 6.81 6.71 6.82 6.56 6.24 5.40 7.01 7.14 8.11 6.88 [5]
6 7.94 7.29 7.28 7.82 7.89 6.71 7.80 7.60 7.66 8.89 7.69 [6]
7 10.11 9.27 9.25 10.17 10.72 10.24 12.07 10.26 [7]
  1. ^ "Updated: 'Game of Thrones' Ratings: Season One". TV by the Numbers. June 19, 2011. Archived from the original on July 26, 2017. Retrieved July 26, 2017. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  2. ^ a b "Game of Thrones: Season Two Ratings". TV Series Finale. June 11, 2012. Archived from the original on September 1, 2016. Retrieved April 18, 2016. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  3. ^ "Game of Thrones: Season Three Ratings". TV Series Finale. June 12, 2013. Archived from the original on September 1, 2016. Retrieved April 18, 2016. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  4. ^ "Game of Thrones: Season Four Ratings". TV Series Finale. June 18, 2014. Archived from the original on September 1, 2016. Retrieved April 18, 2016. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  5. ^ "Game of Thrones: Season Five Ratings". TV Series Finale. June 16, 2015. Archived from the original on September 1, 2016. Retrieved April 18, 2016. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  6. ^ "Game of Thrones: Season Six Ratings". TV Series Finale. June 28, 2016. Archived from the original on September 1, 2016. Retrieved April 24, 2016. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  7. ^ "Game of Thrones: Season Seven Ratings". TV Series Finale. August 29, 2017. Archived from the original on September 16, 2017. Retrieved August 29, 2017. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)

I have modified the table found at {{Game of Thrones ratings}} to provide an example of the changes i am suggesting. I am not a template editor so i would like to ask AlexTheWhovian's and Brojam's opinions on the following:

  1. Get rid of the "Ep." abbreviations by creating an "Episodes" header, as seen in other templates for series with more episodes per season (example {{Seinfeld ratings}}).
  2. Put the references inside the table, as seen in other tables (example award tables) and get rid of the text "Source: Nielsen Media Research [references]" below the table.
  3. Properly highlight the average ratings, as the italic text is confusing.
  4. It would also be good for readability purposes if we could add 1em left and right padding in the table headers.

One more suggestion for the graph. The default width should be calculated so that there is a 2px space between the bars. I have found through testing that the four following cases are true, when X is the total total number of episodes (including TBD ratings):

  1. If X is between 001 and 019, then the width should be equal to X*13+98
  2. If X is between 020 and 049, then the width should be equal to X*12+98
  3. If X is between 050 and 079, then the width should be equal to X*11+98
  4. If X is between 080 and 150, then the width should be equal to X*10+98

For example, a total of 67 episodes of Game of Thrones have aired, so according to case #3 the width of the graph, in order to have 2px space between the bars, should be 67*11+98 = 737+98 = 835. Case #4 stops at 150 episodes (1598px), because X=151 exceeds the width limit, currently set at 1600px. - Radiphus 15:12, 29 January 2018 (UTC)Reply

Good suggestions; I'll look into it for you. -- AlexTW 17:44, 29 January 2018 (UTC)Reply

Update: I have implemented some of these changes myself. I will wait for the ongoing discussion at WP:TV to conclude and then i 'll look for more ways to improve this template. - Radiphus 10:34, 17 August 2018 (UTC)Reply

Mobile view problem edit

Today i realized that the pictorial graph does not appear in mobile view (see example: Rick and Morty ratings). I believe this is caused by a bug with EasyTimeline (see report: Phabricator). I am bringing this to your attention as i am hoping that some of you might be able to understand what this is about and perhaps figure out a solution so that this problem will not affect the template. Radiphus (talk) 19:08, 18 February 2019 (UTC)Reply

Hyphen separator issue edit

The hyphen separator messes up with the editor, which causes the code coming after this template to be annoying to work with, as the editor thinks the ratings template isn't closed. Line 189 is where the code checks for v == '-', to support backwards compatibility, this should stay, but another option should be given, one that the editor can work with. Any recommendations on which it should be? --Gonnym (talk) 09:47, 2 June 2019 (UTC)Reply

Problem edit

@Alex 21: Please see Factor X (Portuguese TV series)#Ratings which is currently showing "Lua error in Module:Television_ratings_graph at line 152: attempt to concatenate field '?' (a nil value)." I'm hoping you can fix either the article or the module. Johnuniq (talk) 02:25, 11 October 2019 (UTC)Reply

Johnuniq, on it! -- /Alex/21 02:27, 11 October 2019 (UTC)Reply
Johnuniq,   Done The primary issue was in the article; it was that the template was using "–" (an en dash) instead of "-" (a hyphen). -- /Alex/21 02:34, 11 October 2019 (UTC)Reply
Thanks. Johnuniq (talk) 02:40, 11 October 2019 (UTC)Reply

Citation needed edit

This template applies {{citation needed}} without any way to specify a |date= to that template, which causes the article to be placed into Category:Articles with unsourced statements rather than an appropriate dated subcategory. Please fix. Thanks. Anomie 12:05, 24 October 2019 (UTC)Reply

Ping Alex 21, who seems to maintain this template. Anomie 12:06, 24 October 2019 (UTC)Reply
Anomie, done. -- /Alex/21 13:51, 24 October 2019 (UTC)Reply
@Alex 21: Thanks, although having it always use the current date somewhat defeats the purpose. There should be a parameter to the template, which I can have AnomieBOT add. Anomie 22:49, 26 October 2019 (UTC)Reply

Issue with n/a entries edit

I was trying to edit the ratings graph for Breaking Bad and I noticed whenever I added "n/a" for episodes where ratings info is unavailable, it would remove entries from the end of the ratings graph. For example, there is 5 episodes in season 2 with no ratings info, so when I enter "n/a" instead of leaving it blank (as "TBD" is incorrect in this instance), there would only be 57 episodes displayed in the graph instead of all 62 episodes. What's the issue here? Thanks. Drovethrughosts (talk) 20:52, 13 March 2020 (UTC)Reply

@Alex 21: Hey, any chance you know what's going on here? I'm wondering if this is just an issue with Template:N/a. Do you have any insight? Thanks. Other examples are List of Hannibal episodes–one episode uses "n/a" for rating so the graph just shows 38 episodes not all 39 and List of Fargo episodes–when you leave the start and end date blank for season 4, the row for season 4 disappears. Drovethrughosts (talk) 12:18, 11 April 2020 (UTC)Reply
Drovethrughosts, thanks for the ping; I've been on an editing hiatus until recently. I appear to have fixed the issue: "n/a" values just weren't being counted as actual entries, now they are. As for the Fargo issue, that's a {{Series overview}} issue - rows are only added when a start date is defined, so I've added {{N/A|TBA}} to start4 to show the row. Cheers. -- /Alex/21 12:34, 11 April 2020 (UTC)Reply
Thanks so much for the quick response and fix! Very much appreciated! Drovethrughosts (talk) 12:39, 11 April 2020 (UTC)Reply

Change needed to conform with MOS:US edit

For MOS:US to be achievable (consistency within articles), the section of the script currently:

  • if args.country ~= nil and args.country ~= '' then
  • if args.country == "U.S." or args.country == "US" or args.country == "United States" then countryDisplayUS = 'U.S.'
  • elseif args.country == "U.K." or args.country == "UK" or args.country == "United Kingdom" then countryDisplayUK = 'UK'
  • else countryDisplayOther = args.country
  • end

needs amending to:

if args.country ~= nil and args.country ~= '' then

  • if args.country == "U.S." or args.country == "United States" then countryDisplayUS = 'U.S.'
  • elseif args.country == "US" then countryDisplayUS = 'US'
  • elseif args.country == "U.K." or args.country == "UK" or args.country == "United Kingdom" then countryDisplayUK = 'UK'
  • else countryDisplayOther = args.country
  • end

(the third line included simply for clarity)

Or maybe another country display type is needed here?

MapReader (talk) 08:45, 13 June 2020 (UTC)Reply

Fix the rating edit

@Alex 21: In the ratings table here, the y-axis shows up weirdly since all of the viewers per episode are almost equal,. I get three 0s, five 1s, five 2s, and one 3. Also can we get the option of not choosing a color if it is a 1 season series, having a default color show up and no color box next to season 1. CherryPie94 🍒🥧 (talk) 20:58, 23 August 2020 (UTC)Reply

CherryPie94,  C Working on it for you. Thanks for the post. -- /Alex/21 04:08, 24 August 2020 (UTC)Reply
Alex 21, thank you so much. I noticed another issue. In the table below, the viewership numbers are only available for seasons 2 because Nielsen did not provide the numbers until January 2018 in South Korea; so no data for season 1. The color I chose for season 2 doesn't show up on the graph, instead I get season 1's color. This needs fixing. CherryPie94 🍒🥧 (talk) 18:21, 25 August 2020 (UTC)Reply
Stranger : South Korea viewers per episode (millions)
SeasonEpisode numberAverage
12345678910111213141516
1-
21.9151.6761.7591.690TBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBD
Source: Audience measurement performed nationwide by Nielsen Media Research.
CherryPie94, I had to file a report at Template talk:Graph:Chart#Repeated y-values, which was fixed at the graph module, and I added your initial default colour request.  C Taking a look at your second post. -- /Alex/21 23:50, 1 September 2020 (UTC)Reply
Alex 21, thank you so much and I'm sorry for asking too much, but can we name the seasons? It would be the best in the cases of long series, for example, When the_Camellia Blooms#Viewership has 40 episodes and the table is very long stretching out of the page. If we could instead of having season 1, 2, 3, have the ability to renamed them to Ep.1-10 and then Ep.11-20, etc. it would really help. Maybe have the default be 1, 2, 3, but have parameters for season name if they don't want it 1, 2, 3. It would help in the table above, instead of having season 1 all empty, we can have it start from season 2 if we rename it. CherryPie94 🍒🥧 (talk) 10:45, 2 September 2020 (UTC)Reply
CherryPie94, no worries, happy to help! And luckily, that's already a thing: see List of Teen Wolf episodes#Ratings. -- /Alex/21 11:01, 2 September 2020 (UTC)Reply
CherryPie94, I was in the middle of making updates for the empty season row, but then I thought, why not just present the graph this way? There's no need for the Season 1 row at all. -- /Alex/21 02:13, 7 September 2020 (UTC)Reply
Stranger : South Korea viewers per episode (millions)
SeasonEpisode numberAverage
12345678910111213141516
21.9151.6761.7591.690TBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBDTBD
Source: Audience measurement performed nationwide by Nielsen Media Research.
Yes, I did when you told me I could do that in your last reply. CherryPie94 🍒🥧 (talk) 11:27, 7 September 2020 (UTC)Reply
CherryPie94, ah, okay, my apologies. I've only just come to realize that the missing season and the split season are basically the same situation. -- /Alex/21 13:32, 7 September 2020 (UTC)Reply

Full stop edit

According to Wikipedia:Featured list candidates/List of The Good Place episodes/archive1, "Audience measurement performed by Nielsen Media Research" is not a full sentence, therefore the full stop should be removed. Would this be able to be done? Thanks. Pamzeis (talk) 07:43, 19 May 2021 (UTC)Reply

@Pamzeis: I removed the periods. Heartfox (talk) 15:40, 27 May 2021 (UTC)Reply

Missing barlines edit

@Alex 21:, I was creating a new table for Omniscient Interfering View and notice that there are 2 bar lines missing for the column Ep. 25 — 34 as it suppose to have 10 bars, not 8 bars, ie the last column always have missing 2 bar lines. I have the same problem for the subsequent charts for 2019 and 2020. I hope that this can be fixed. Thanks. Flipchip73 (talk) 13:27, 15 August 2021 (UTC)Reply

Omniscient Interfering View : South Korea viewers per episode (millions)
Episode (2018)Episode number
123456789101112
Ep 1 – 121.1541.0041.1881.0971.0141.4331.1601.1741.7971.5071.2851.345
Ep 13 – 241.6301.5901.7461.9881.7502.1031.7301.7371.4751.7022.0361.560
Ep 25 – 341.5691.6311.7831.9181.8061.9582.2712.2792.1712.142
Source: Audience measurement performed nationwide by Nielsen Media Research
@Flipchip73: Removed the averages, problem fixed. Averages are only meant to be used for rows when a full row represents a full season, else "skipping" them results in issues with displaying further episodes (like here). -- /Alex/21 14:00, 15 August 2021 (UTC)Reply
@Alex 21:, Ok. I guess this is the only workaround. Thanks. Flipchip73 (talk) 14:35, 15 August 2021 (UTC)Reply

Special episodes that are stand-alone and not part of preceding or following series/season edit

It looks like the above is only possible by using the parameter number of the following series e.g. a special episode after series 6 would have to be coded as S07, even though it isn't series 7. That would lead to series 7 having to be coded as S08. If there's then another special followed by a series, the special would be S09 and series 8 would have to be coded as S10

<!-- S06E01 -->| 7.94
<!-- S06E02 -->| 7.29
<!-- S06E03 -->| 7.28
<!-- S06E04 -->| 7.82 (This and above is Series 6)
|-
<!-- S07E01 -->| 10.11 (Stand-alone special)
|-
<!-- S08E01 -->| 10.11 (This is series 7)
<!-- S08E02 -->| 9.27
<!-- S08E03 -->| 9.25
<!-- S08E04 -->| 10.17

Could the template be changed to handle special episodes like {{Series overview}} does? - X201 (talk) 10:46, 3 March 2022 (UTC)Reply