Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Since Covid-19 emerged many sports matches have moved behind closed doors without any fans in attendance Many people have suggested that has meoved the phenomenon

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Since Covid-19 emerged many sports matches have moved behind closed doors without any fans in attendance Many people have suggested that has meoved the phenomenon of home advantage where the home team (Team 1) wins more than the visting team (Team_2)) Investigate whether or not the suggestion is supported by this dataset by comparing the apparent home advantage in 2018 and 2019 to that in 2020 and 2021? (Note: Make the simplifying assumption that all matches played in 2020 or 2021 were behind closed doors and all other matches had tans in attendance In Crite code to determine and print the answer here The details of a specific match are accessed by tirst selecting an element from the matches list and then accessing specific pieces of data about that match from the dictionary. For example the year and teams involved in the third match in the list could be accessed as follows In [8]: matches [olt "Tean 1"} Out [8] TING In 1: matches Colt "Tean 2] In [ ]: matches[e]"Year"] . Weekday The day of the week on which the match was played Day. The day of the month on which the match was played Month The month in which the match was played Year The year in which the match was played Team 1 The home team (three letter country code, eg IRL #Ireland NZL - New Zealand) Team 2 The away team (three letter country code, eg IRL - Ireland, NZL * New Zealand) Team 1 Score The score achieved by the home team Team 2_Score. The score achieved by the away team Team 1 Tries. The number of tries scored by the home team Team 2 Tries The number of tres scored by the away team Neutral Was the match played at a neutral venue? Since Covid-19 emerged many sports matches have moved behind closed doors without any fans in attendance. Many people have suggested that rias mmeoved the phenomenon of home advantage (where the home team (Team_1) wins more than the visting team (Team 2)) Investigate whether or not this suggestion is supported by this dataset by comparing the apparent home advantage in 2018 and 2019 to that in 2020 and 2021? (Note: Make the simplifying assumption that all matches played in 2020 2021 were behind closed doors and all other matches had tans in attendance) In 1: Write code to determine and print the answer here in [1]: #The following code reads in the data matches list) count - @ with open('RugbyResultsData.csv') as f: for line in f: words - line.split('') match - {"weekday":words0],"day":int(words [1]}, Months words[2], "Year"zint(words (31). Tese_1":words[4]. matches.append(match) count count + 1 print(str(count) matches loaded") 3512 matches loaded The details of a specific match are accessed by first selecting an element from the matches list and then accessing specific pieces of data do from the dictionary. For example the year and teams involved in the third match in the list could be accessed as follows: to search [4]." Yean_2":words[5],"Team 1 Score'sint (words[6]). Team 2_Scoreint(ords[?]), Teatrless Int (words [8]), 2. tries to 3512 matches loaded 2_Score":int (words [7]). "Team_1_Tries" int(words [8]), "Tean_2_Tries"int(words [91). Neutral swords[10][1] 1 Ich are accessed by test selecting an element from the matches list and then accessing specific pieces of data about that match mple the year and teams involved in the third match in the list could be accessed as follows i SUS Since Covid-19 emerged many sports matches have moved behind closed doors without any fans in attendance Many people have suggested that has meoved the phenomenon of home advantage where the home team (Team 1) wins more than the visting team (Team_2)) Investigate whether or not the suggestion is supported by this dataset by comparing the apparent home advantage in 2018 and 2019 to that in 2020 and 2021? (Note: Make the simplifying assumption that all matches played in 2020 or 2021 were behind closed doors and all other matches had tans in attendance In Crite code to determine and print the answer here The details of a specific match are accessed by tirst selecting an element from the matches list and then accessing specific pieces of data about that match from the dictionary. For example the year and teams involved in the third match in the list could be accessed as follows In [8]: matches [olt "Tean 1"} Out [8] TING In 1: matches Colt "Tean 2] In [ ]: matches[e]"Year"] . Weekday The day of the week on which the match was played Day. The day of the month on which the match was played Month The month in which the match was played Year The year in which the match was played Team 1 The home team (three letter country code, eg IRL #Ireland NZL - New Zealand) Team 2 The away team (three letter country code, eg IRL - Ireland, NZL * New Zealand) Team 1 Score The score achieved by the home team Team 2_Score. The score achieved by the away team Team 1 Tries. The number of tries scored by the home team Team 2 Tries The number of tres scored by the away team Neutral Was the match played at a neutral venue? Since Covid-19 emerged many sports matches have moved behind closed doors without any fans in attendance. Many people have suggested that rias mmeoved the phenomenon of home advantage (where the home team (Team_1) wins more than the visting team (Team 2)) Investigate whether or not this suggestion is supported by this dataset by comparing the apparent home advantage in 2018 and 2019 to that in 2020 and 2021? (Note: Make the simplifying assumption that all matches played in 2020 2021 were behind closed doors and all other matches had tans in attendance) In 1: Write code to determine and print the answer here in [1]: #The following code reads in the data matches list) count - @ with open('RugbyResultsData.csv') as f: for line in f: words - line.split('') match - {"weekday":words0],"day":int(words [1]}, Months words[2], "Year"zint(words (31). Tese_1":words[4]. matches.append(match) count count + 1 print(str(count) matches loaded") 3512 matches loaded The details of a specific match are accessed by first selecting an element from the matches list and then accessing specific pieces of data do from the dictionary. For example the year and teams involved in the third match in the list could be accessed as follows: to search [4]." Yean_2":words[5],"Team 1 Score'sint (words[6]). Team 2_Scoreint(ords[?]), Teatrless Int (words [8]), 2. tries to 3512 matches loaded 2_Score":int (words [7]). "Team_1_Tries" int(words [8]), "Tean_2_Tries"int(words [91). Neutral swords[10][1] 1 Ich are accessed by test selecting an element from the matches list and then accessing specific pieces of data about that match mple the year and teams involved in the third match in the list could be accessed as follows i SUS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions