{"$schema":"https://vega.github.io/schema/vega-lite/v3.json","width":700,"height":500,"config":{"view":{"stroke":""},"axis":{"ticks":false,"domain":false,"labelAngle":0}},"data":{"url":"https://raw.githubusercontent.com/shikhar-madhavdas/Cricket/master/T20Is%20-%20Partnerships%20Final.json"},"title":"|A| - Relationship between Average Partnership Runs and Total Runs categorised by Countries","transform":[{"filter":"datum.Number_of_Partnerships >= minValue_Number_of_Partnerships && maxValue_Number_of_Partnerships >= datum.Number_of_Partnerships"}],"encoding":{"x":{"field":"Total_Runs","type":"quantitative","axis":{"grid":false,"title":"Total Runs Scored","values":[250,500,750,1000]}},"y":{"field":"Avg_Runs_Per_Dismissal","type":"quantitative","aggregate":"sum","axis":{"grid":false,"title":"Average Partnership Runs","values":[30,75]}},"color":{"condition":{"selection":"mySelection","field":"Country","type":"ordinal","scale":{"domain":["Afghanistan","Australia","Bangladesh","England","Hong Kong","India","Ireland","Netherlands","New Zealand","Oman","Pakistan","P.N.G.","Scotland","South Africa","Sri Lanka","U.A.E.","West Indies","Zimbabwe"],"range":["rgb(39, 107, 216)","rgb(243, 247, 9)","rgb(67, 163, 8)","rgb(15, 28, 81)","rgb(229, 34, 34)","rgb(42, 182, 237)","rgb(94, 224, 120)","rgb(252, 150, 17)","rgb(0,0,0)","rgb(229, 6, 6)","rgb(4, 163, 81)","rgb(255, 242, 0)","rgb(1, 85, 158)","rgb(33, 145, 15)","rgb(39, 111, 244)","rgb(65, 66, 68)","rgb(153, 33, 33)","rgb(239, 26, 26)"]}},"value":"darkred"},"opacity":{"condition":{"selection":"mySelection","value":1},"value":0.03},"size":{"field":"Number_of_Partnerships","type":"quantitative","title":"No of Partnership Innings","scale":{"range":[15,800],"type":"pow","exponent":1}},"tooltip":[{"field":"Player_1","title":"Player 1","type":"ordinal"},{"field":"Player_2","title":"Player 2","type":"ordinal"},{"field":"Avg_Runs_Per_Dismissal","title":"Avg Partnership Runs","type":"ordinal"},{"field":"Number_of_Partnerships","title":"Number of Partnerships","type":"ordinal"},{"field":"Innings_Span","title":"Partnership Span","type":"ordinal"},{"field":"Country","type":"ordinal"},{"field":"Highest_Runs","title":"Highest Partnership Runs","type":"ordinal"},{"field":"Total_Runs","title":"Total Partnership Runs","type":"ordinal"},{"field":"Unbroken","type":"quantitative"},{"field":"50Runs_Partnerships","title":"50+ Runs Scored","type":"quantitative"}]},"selection":{"myGrid":{"type":"interval","bind":"scales"},"mySelection":{"type":"single","fields":["Country"],"nearest":false,"bind":{"Country":{"input":"radio","name":"Select Country:","options":["Afghanistan","Australia","Bangladesh","England","Hong Kong","India","Ireland","Netherlands","New Zealand","Oman","Pakistan","P.N.G.","Scotland","South Africa","Sri Lanka","U.A.E.","West Indies","Zimbabwe"]}}},"maxValue":{"type":"single","fields":["Number_of_Partnerships"],"init":{"Number_of_Partnerships":41},"bind":{"Number_of_Partnerships":{"input":"range","name":"No of Partnerships - Max ","min":5,"max":41}}},"minValue":{"type":"single","fields":["Number_of_Partnerships"],"init":{"Number_of_Partnerships":3},"bind":{"Number_of_Partnerships":{"input":"range","name":"No of Partnerships - Min","min":3,"max":36}}}},"mark":{"type":"circle","interpolate":"monotone","point":[]}}
{"$schema":"https://vega.github.io/schema/vega-lite/v3.json","width":700,"height":247.2187886279357,"config":{"view":{"stroke":""}},"data":{"url":"https://raw.githubusercontent.com/shikhar-madhavdas/Cricket/master/T20Is%20-%20Partnerships%20Final.json"},"title":"|B| Most Successful Batting Partnerships by Country","transform":[{"window":[{"as":"Rank","op":"rank"}],"groupby":["Country"],"sort":[{"field":"Total_Runs","order":"descending"}]},{"filter":"datum.Rank <= 5"}],"selection":{"myGrid":{"type":"interval","bind":"scales","encodings":["x"]},"mySelection":{"type":"single","fields":["Country"],"nearest":false,"bind":{"Country":{"input":"radio","name":"Select Country:","options":["Afghanistan","Australia","Bangladesh","England","Hong Kong","India","Ireland","Netherlands","New Zealand","Oman","Pakistan","P.N.G.","Scotland","South Africa","Sri Lanka","U.A.E.","West Indies","Zimbabwe"]}}}},"mark":"bar","encoding":{"x":{"field":"Player_Pairs","type":"ordinal","sort":{"field":"Country","op":"count","order":"ascending"},"axis":{"title":" ","grid":false}},"y":{"field":"Total_Runs","type":"quantitative","aggregate":"sum","axis":{"grid":false,"title":"Total Runs Scored","values":[500,850,1000]}},"color":{"condition":{"selection":"mySelection","field":"Country","type":"ordinal","scale":{"domain":["Afghanistan","Australia","Bangladesh","England","Hong Kong","India","Ireland","Netherlands","New Zealand","Oman","Pakistan","P.N.G.","Scotland","South Africa","Sri Lanka","U.A.E.","West Indies","Zimbabwe"],"range":["rgb(39, 107, 216)","rgb(243, 247, 9)","rgb(67, 163, 8)","rgb(15, 28, 81)","rgb(229, 34, 34)","rgb(42, 182, 237)","rgb(94, 224, 120)","rgb(252, 150, 17)","rgb(0,0,0)","rgb(229, 6, 6)","rgb(4, 163, 81)","rgb(255, 242, 0)","rgb(1, 85, 158)","rgb(33, 145, 15)","rgb(39, 111, 244)","rgb(65, 66, 68)","rgb(153, 33, 33)","rgb(239, 26, 26)"]}},"value":"black"},"opacity":{"condition":{"selection":"mySelection","value":1},"value":0.2},"tooltip":[{"field":"Avg_Runs_Per_Dismissal","title":"Avg Partnership Runs","type":"ordinal"},{"field":"Number_of_Partnerships","title":"Number of Partnerships","type":"ordinal"},{"field":"Innings_Span","title":"Partnership Span","type":"ordinal"},{"field":"Highest_Runs","title":"Highest Runs Scored","type":"ordinal"},{"field":"Total_Runs","title":"Total Partnership Runs","type":"ordinal"},{"field":"Unbroken","title":"Not Out Innings","type":"quantitative"},{"field":"50Runs_Partnerships","title":"50+ Runs Scored","type":"quantitative"},{"field":"Century_Partnerships","title":"100+ Runs Scored","type":"ordinal"}]}}