commit 08a9041257e88ce9ec1035fd563688788160c825 Author: r0r-5chach Date: Thu May 16 17:22:58 2024 +0100 resit diff --git a/brief.pdf b/brief.pdf new file mode 100644 index 0000000..d21349c Binary files /dev/null and b/brief.pdf differ diff --git a/import_data.csv b/import_data.csv new file mode 100644 index 0000000..ba00fcc --- /dev/null +++ b/import_data.csv @@ -0,0 +1,381 @@ +Round,Date,Team1,FT,HT,Team2 +1,(Sat) 12 Aug 2017 (32),Watford FC,03-03,02-01,Liverpool FC +1,(Fri) 11 Aug 2017 (32),Arsenal FC,04-03,02-02,Leicester City FC +1,(Sat) 12 Aug 2017 (32),Southampton FC,0-0,0-0,Swansea City AFC +1,(Sat) 12 Aug 2017 (32),Brighton & Hove Albion FC,0-2,0-0,Manchester City FC +1,(Sun) 13 Aug 2017 (32),Newcastle United FC,0-2,0-0,Tottenham Hotspur FC +1,(Sat) 12 Aug 2017 (32),Crystal Palace FC,0-3,0-2,Huddersfield Town AFC +1,(Sat) 12 Aug 2017 (32),Chelsea FC,02-03,0-3,Burnley FC +1,(Sat) 12 Aug 2017 (32),Everton FC,1-0,1-0,Stoke City FC +1,(Sat) 12 Aug 2017 (32),West Bromwich Albion FC,1-0,1-0,AFC Bournemouth +1,(Sun) 13 Aug 2017 (32),Manchester United FC,4-0,1-0,West Ham United FC +2,(Sat) 19 Aug 2017 (33),Southampton FC,03-02,02-01,West Ham United FC +2,(Sat) 19 Aug 2017 (33),Burnley FC,0-1,0-0,West Bromwich Albion FC +2,(Sat) 19 Aug 2017 (33),AFC Bournemouth,0-2,0-0,Watford FC +2,(Sat) 19 Aug 2017 (33),Liverpool FC,1-0,0-0,Crystal Palace FC +2,(Sat) 19 Aug 2017 (33),Stoke City FC,1-0,0-0,Arsenal FC +2,(Sun) 20 Aug 2017 (33),Huddersfield Town AFC,1-0,0-0,Newcastle United FC +2,(Mon) 21 Aug 2017 (34),Manchester City FC,01-01,0-1,Everton FC +2,(Sun) 20 Aug 2017 (33),Tottenham Hotspur FC,01-02,0-1,Chelsea FC +2,(Sat) 19 Aug 2017 (33),Swansea City AFC,0-4,0-1,Manchester United FC +2,(Sat) 19 Aug 2017 (33),Leicester City FC,2-0,1-0,Brighton & Hove Albion FC +3,(Sat) 26 Aug 2017 (34),AFC Bournemouth,01-02,01-01,Manchester City FC +3,(Sun) 27 Aug 2017 (34),Tottenham Hotspur FC,01-01,0-0,Burnley FC +3,(Sun) 27 Aug 2017 (34),West Bromwich Albion FC,01-01,0-0,Stoke City FC +3,(Sat) 26 Aug 2017 (34),Huddersfield Town AFC,0-0,0-0,Southampton FC +3,(Sat) 26 Aug 2017 (34),Watford FC,0-0,0-0,Brighton & Hove Albion FC +3,(Sat) 26 Aug 2017 (34),Manchester United FC,2-0,0-0,Leicester City FC +3,(Sat) 26 Aug 2017 (34),Crystal Palace FC,0-2,0-1,Swansea City AFC +3,(Sat) 26 Aug 2017 (34),Newcastle United FC,3-0,1-0,West Ham United FC +3,(Sun) 27 Aug 2017 (34),Chelsea FC,2-0,2-0,Everton FC +3,(Sun) 27 Aug 2017 (34),Liverpool FC,4-0,2-0,Arsenal FC +4,(Sat) 9 Sep 2017 (36),Stoke City FC,02-02,01-01,Manchester United FC +4,(Sun) 10 Sep 2017 (36),Swansea City AFC,0-1,0-0,Newcastle United FC +4,(Mon) 11 Sep 2017 (37),West Ham United FC,2-0,0-0,Huddersfield Town AFC +4,(Sat) 9 Sep 2017 (36),Leicester City FC,01-02,0-1,Chelsea FC +4,(Sat) 9 Sep 2017 (36),Southampton FC,0-2,0-1,Watford FC +4,(Sat) 9 Sep 2017 (36),Everton FC,0-3,0-2,Tottenham Hotspur FC +4,(Sat) 9 Sep 2017 (36),Brighton & Hove Albion FC,03-01,1-0,West Bromwich Albion FC +4,(Sun) 10 Sep 2017 (36),Burnley FC,1-0,1-0,Crystal Palace FC +4,(Sat) 9 Sep 2017 (36),Arsenal FC,3-0,2-0,AFC Bournemouth +4,(Sat) 9 Sep 2017 (36),Manchester City FC,5-0,2-0,Liverpool FC +5,(Sat) 16 Sep 2017 (37),Liverpool FC,01-01,01-01,Burnley FC +5,(Sat) 16 Sep 2017 (37),Huddersfield Town AFC,01-01,0-0,Leicester City FC +5,(Fri) 15 Sep 2017 (37),AFC Bournemouth,02-01,0-0,Brighton & Hove Albion FC +5,(Sat) 16 Sep 2017 (37),Tottenham Hotspur FC,0-0,0-0,Swansea City AFC +5,(Sat) 16 Sep 2017 (37),West Bromwich Albion FC,0-0,0-0,West Ham United FC +5,(Sun) 17 Sep 2017 (37),Chelsea FC,0-0,0-0,Arsenal FC +5,(Sat) 16 Sep 2017 (37),Crystal Palace FC,0-1,0-1,Southampton FC +5,(Sat) 16 Sep 2017 (37),Watford FC,0-6,0-3,Manchester City FC +5,(Sat) 16 Sep 2017 (37),Newcastle United FC,02-01,1-0,Stoke City FC +5,(Sun) 17 Sep 2017 (37),Manchester United FC,4-0,1-0,Everton FC +6,(Sat) 23 Sep 2017 (38),Leicester City FC,02-03,01-02,Liverpool FC +6,(Sat) 23 Sep 2017 (38),Everton FC,02-01,0-0,AFC Bournemouth +6,(Sat) 23 Sep 2017 (38),Burnley FC,0-0,0-0,Huddersfield Town AFC +6,(Sun) 24 Sep 2017 (38),Brighton & Hove Albion FC,1-0,0-0,Newcastle United FC +6,(Sat) 23 Sep 2017 (38),Swansea City AFC,01-02,0-1,Watford FC +6,(Sat) 23 Sep 2017 (38),Southampton FC,0-1,0-1,Manchester United FC +6,(Sat) 23 Sep 2017 (38),West Ham United FC,02-03,0-2,Tottenham Hotspur FC +6,(Sat) 23 Sep 2017 (38),Stoke City FC,0-4,0-2,Chelsea FC +6,(Mon) 25 Sep 2017 (39),Arsenal FC,2-0,1-0,West Bromwich Albion FC +6,(Sat) 23 Sep 2017 (38),Manchester City FC,5-0,1-0,Crystal Palace FC +7,(Sun) 1 Oct 2017 (39),Newcastle United FC,01-01,01-01,Liverpool FC +7,(Sat) 30 Sep 2017 (39),West Bromwich Albion FC,02-02,02-01,Watford FC +7,(Sat) 30 Sep 2017 (39),AFC Bournemouth,0-0,0-0,Leicester City FC +7,(Sat) 30 Sep 2017 (39),Chelsea FC,0-1,0-0,Manchester City FC +7,(Sat) 30 Sep 2017 (39),West Ham United FC,1-0,0-0,Swansea City AFC +7,(Sun) 1 Oct 2017 (39),Everton FC,0-1,0-1,Burnley FC +7,(Sat) 30 Sep 2017 (39),Huddersfield Town AFC,0-4,0-3,Tottenham Hotspur FC +7,(Sat) 30 Sep 2017 (39),Stoke City FC,02-01,1-0,Southampton FC +7,(Sun) 1 Oct 2017 (39),Arsenal FC,2-0,1-0,Brighton & Hove Albion FC +7,(Sat) 30 Sep 2017 (39),Manchester United FC,4-0,2-0,Crystal Palace FC +8,(Sat) 14 Oct 2017 (41),Crystal Palace FC,02-01,02-01,Chelsea FC +8,(Sat) 14 Oct 2017 (41),Manchester City FC,07-02,03-01,Stoke City FC +8,(Sun) 15 Oct 2017 (41),Brighton & Hove Albion FC,01-01,0-0,Everton FC +8,(Mon) 16 Oct 2017 (41),Leicester City FC,01-01,0-0,West Bromwich Albion FC +8,(Sat) 14 Oct 2017 (41),Liverpool FC,0-0,0-0,Manchester United FC +8,(Sat) 14 Oct 2017 (41),Tottenham Hotspur FC,1-0,0-0,AFC Bournemouth +8,(Sat) 14 Oct 2017 (41),Burnley FC,01-01,0-1,West Ham United FC +8,(Sat) 14 Oct 2017 (41),Watford FC,02-01,0-1,Arsenal FC +8,(Sun) 15 Oct 2017 (41),Southampton FC,02-02,0-1,Newcastle United FC +8,(Sat) 14 Oct 2017 (41),Swansea City AFC,2-0,1-0,Huddersfield Town AFC +9,(Sat) 21 Oct 2017 (42),Chelsea FC,04-02,01-01,Watford FC +9,(Sun) 22 Oct 2017 (42),Everton FC,02-05,01-01,Arsenal FC +9,(Sun) 22 Oct 2017 (42),Tottenham Hotspur FC,04-01,03-01,Liverpool FC +9,(Sat) 21 Oct 2017 (42),Newcastle United FC,1-0,0-0,Crystal Palace FC +9,(Sat) 21 Oct 2017 (42),Southampton FC,1-0,0-0,West Bromwich Albion FC +9,(Sat) 21 Oct 2017 (42),Swansea City AFC,01-02,0-1,Leicester City FC +9,(Sat) 21 Oct 2017 (42),Stoke City FC,01-02,0-2,AFC Bournemouth +9,(Fri) 20 Oct 2017 (42),West Ham United FC,0-3,0-2,Brighton & Hove Albion FC +9,(Sat) 21 Oct 2017 (42),Manchester City FC,3-0,1-0,Burnley FC +9,(Sat) 21 Oct 2017 (42),Huddersfield Town AFC,02-01,2-0,Manchester United FC +10,(Sat) 28 Oct 2017 (43),West Bromwich Albion FC,02-03,01-02,Manchester City FC +10,(Sat) 28 Oct 2017 (43),AFC Bournemouth,0-1,0-0,Chelsea FC +10,(Sat) 28 Oct 2017 (43),Manchester United FC,1-0,0-0,Tottenham Hotspur FC +10,(Mon) 30 Oct 2017 (43),Burnley FC,1-0,0-0,Newcastle United FC +10,(Sat) 28 Oct 2017 (43),Liverpool FC,3-0,0-0,Huddersfield Town AFC +10,(Sun) 29 Oct 2017 (43),Brighton & Hove Albion FC,01-01,0-1,Southampton FC +10,(Sat) 28 Oct 2017 (43),Arsenal FC,02-01,0-1,Swansea City AFC +10,(Sat) 28 Oct 2017 (43),Watford FC,0-1,0-1,Stoke City FC +10,(Sat) 28 Oct 2017 (43),Crystal Palace FC,02-02,0-2,West Ham United FC +10,(Sun) 29 Oct 2017 (43),Leicester City FC,2-0,2-0,Everton FC +11,(Sat) 4 Nov 2017 (44),Stoke City FC,02-02,01-01,Leicester City FC +11,(Sun) 5 Nov 2017 (44),Everton FC,03-02,0-0,Watford FC +11,(Sat) 4 Nov 2017 (44),Newcastle United FC,0-1,0-0,AFC Bournemouth +11,(Sat) 4 Nov 2017 (44),Southampton FC,0-1,0-0,Burnley FC +11,(Sun) 5 Nov 2017 (44),Chelsea FC,1-0,0-0,Manchester United FC +11,(Sun) 5 Nov 2017 (44),Tottenham Hotspur FC,1-0,0-0,Crystal Palace FC +11,(Sat) 4 Nov 2017 (44),Swansea City AFC,0-1,0-1,Brighton & Hove Albion FC +11,(Sat) 4 Nov 2017 (44),West Ham United FC,01-04,0-2,Liverpool FC +11,(Sun) 5 Nov 2017 (44),Manchester City FC,03-01,1-0,Arsenal FC +11,(Sat) 4 Nov 2017 (44),Huddersfield Town AFC,1-0,1-0,West Bromwich Albion FC +12,(Sat) 18 Nov 2017 (46),Manchester United FC,04-01,02-01,Newcastle United FC +12,(Mon) 20 Nov 2017 (47),Brighton & Hove Albion FC,02-02,01-02,Stoke City FC +12,(Sat) 18 Nov 2017 (46),Crystal Palace FC,02-02,02-02,Everton FC +12,(Sat) 18 Nov 2017 (46),Leicester City FC,0-2,0-1,Manchester City FC +12,(Sat) 18 Nov 2017 (46),West Bromwich Albion FC,0-4,0-3,Chelsea FC +12,(Sun) 19 Nov 2017 (46),Watford FC,2-0,1-0,West Ham United FC +12,(Sat) 18 Nov 2017 (46),Arsenal FC,2-0,2-0,Tottenham Hotspur FC +12,(Sat) 18 Nov 2017 (46),Burnley FC,2-0,2-0,Swansea City AFC +12,(Sat) 18 Nov 2017 (46),Liverpool FC,3-0,2-0,Southampton FC +12,(Sat) 18 Nov 2017 (46),AFC Bournemouth,4-0,2-0,Huddersfield Town AFC +13,(Fri) 24 Nov 2017 (47),West Ham United FC,01-01,01-01,Leicester City FC +13,(Sun) 26 Nov 2017 (47),Southampton FC,04-01,01-01,Everton FC +13,(Sat) 25 Nov 2017 (47),Liverpool FC,01-01,0-0,Chelsea FC +13,(Sat) 25 Nov 2017 (47),Crystal Palace FC,02-01,0-0,Stoke City FC +13,(Sat) 25 Nov 2017 (47),Swansea City AFC,0-0,0-0,AFC Bournemouth +13,(Sun) 26 Nov 2017 (47),Burnley FC,0-1,0-0,Arsenal FC +13,(Sat) 25 Nov 2017 (47),Manchester United FC,1-0,0-0,Brighton & Hove Albion FC +13,(Sat) 25 Nov 2017 (47),Tottenham Hotspur FC,01-01,0-1,West Bromwich Albion FC +13,(Sat) 25 Nov 2017 (47),Newcastle United FC,0-3,0-2,Watford FC +13,(Sun) 26 Nov 2017 (47),Huddersfield Town AFC,01-02,1-0,Manchester City FC +14,(Wed) 29 Nov 2017 (48),Manchester City FC,02-01,0-0,Southampton FC +14,(Tue) 28 Nov 2017 (48),Brighton & Hove Albion FC,0-0,0-0,Crystal Palace FC +14,(Wed) 29 Nov 2017 (48),Chelsea FC,1-0,0-0,Swansea City AFC +14,(Wed) 29 Nov 2017 (48),AFC Bournemouth,01-02,0-1,Burnley FC +14,(Wed) 29 Nov 2017 (48),Stoke City FC,0-3,0-1,Liverpool FC +14,(Tue) 28 Nov 2017 (48),Watford FC,02-04,0-3,Manchester United FC +14,(Tue) 28 Nov 2017 (48),West Bromwich Albion FC,02-02,1-0,Newcastle United FC +14,(Wed) 29 Nov 2017 (48),Arsenal FC,5-0,1-0,Huddersfield Town AFC +14,(Tue) 28 Nov 2017 (48),Leicester City FC,02-01,2-0,Tottenham Hotspur FC +14,(Wed) 29 Nov 2017 (48),Everton FC,4-0,2-0,West Ham United FC +15,(Sat) 2 Dec 2017 (48),Watford FC,01-01,01-01,Tottenham Hotspur FC +15,(Sat) 2 Dec 2017 (48),Stoke City FC,02-01,02-01,Swansea City AFC +15,(Sat) 2 Dec 2017 (48),Chelsea FC,03-01,02-01,Newcastle United FC +15,(Sat) 2 Dec 2017 (48),West Bromwich Albion FC,0-0,0-0,Crystal Palace FC +15,(Sat) 2 Dec 2017 (48),Everton FC,2-0,0-0,Huddersfield Town AFC +15,(Sun) 3 Dec 2017 (48),Manchester City FC,02-01,0-1,West Ham United FC +15,(Sat) 2 Dec 2017 (48),Arsenal FC,01-03,0-2,Manchester United FC +15,(Sat) 2 Dec 2017 (48),Brighton & Hove Albion FC,01-05,0-2,Liverpool FC +15,(Sun) 3 Dec 2017 (48),AFC Bournemouth,01-01,1-0,Southampton FC +15,(Sat) 2 Dec 2017 (48),Leicester City FC,1-0,1-0,Burnley FC +16,(Sun) 10 Dec 2017 (49),Manchester United FC,01-02,01-01,Manchester City FC +16,(Sat) 9 Dec 2017 (49),Newcastle United FC,02-03,01-01,Leicester City FC +16,(Sat) 9 Dec 2017 (49),Crystal Palace FC,02-02,02-02,AFC Bournemouth +16,(Sat) 9 Dec 2017 (49),Swansea City AFC,1-0,0-0,West Bromwich Albion FC +16,(Sun) 10 Dec 2017 (49),Liverpool FC,01-01,1-0,Everton FC +16,(Sun) 10 Dec 2017 (49),Southampton FC,01-01,1-0,Arsenal FC +16,(Sat) 9 Dec 2017 (49),Tottenham Hotspur FC,05-01,1-0,Stoke City FC +16,(Sat) 9 Dec 2017 (49),Burnley FC,1-0,1-0,Watford FC +16,(Sat) 9 Dec 2017 (49),West Ham United FC,1-0,1-0,Chelsea FC +16,(Sat) 9 Dec 2017 (49),Huddersfield Town AFC,2-0,2-0,Brighton & Hove Albion FC +17,(Wed) 13 Dec 2017 (50),Liverpool FC,0-0,0-0,West Bromwich Albion FC +17,(Wed) 13 Dec 2017 (50),West Ham United FC,0-0,0-0,Arsenal FC +17,(Tue) 12 Dec 2017 (50),Burnley FC,1-0,0-0,Stoke City FC +17,(Tue) 12 Dec 2017 (50),Crystal Palace FC,02-01,0-1,Watford FC +17,(Wed) 13 Dec 2017 (50),Newcastle United FC,0-1,0-1,Everton FC +17,(Tue) 12 Dec 2017 (50),Huddersfield Town AFC,01-03,0-2,Chelsea FC +17,(Wed) 13 Dec 2017 (50),Swansea City AFC,0-4,0-2,Manchester City FC +17,(Wed) 13 Dec 2017 (50),Southampton FC,01-04,0-3,Leicester City FC +17,(Wed) 13 Dec 2017 (50),Manchester United FC,1-0,1-0,AFC Bournemouth +17,(Wed) 13 Dec 2017 (50),Tottenham Hotspur FC,2-0,1-0,Brighton & Hove Albion FC +18,(Mon) 18 Dec 2017 (51),Everton FC,03-01,01-01,Swansea City AFC +18,(Sat) 16 Dec 2017 (50),Brighton & Hove Albion FC,0-0,0-0,Burnley FC +18,(Sat) 16 Dec 2017 (50),Stoke City FC,0-3,0-1,West Ham United FC +18,(Sun) 17 Dec 2017 (50),West Bromwich Albion FC,01-02,0-2,Manchester United FC +18,(Sat) 16 Dec 2017 (50),Watford FC,01-04,0-2,Huddersfield Town AFC +18,(Sat) 16 Dec 2017 (50),Leicester City FC,0-3,0-2,Crystal Palace FC +18,(Sun) 17 Dec 2017 (50),AFC Bournemouth,0-4,0-3,Liverpool FC +18,(Sat) 16 Dec 2017 (50),Manchester City FC,04-01,1-0,Tottenham Hotspur FC +18,(Sat) 16 Dec 2017 (50),Arsenal FC,1-0,1-0,Newcastle United FC +18,(Sat) 16 Dec 2017 (50),Chelsea FC,1-0,1-0,Southampton FC +19,(Sat) 23 Dec 2017 (51),Leicester City FC,02-02,01-01,Manchester United FC +19,(Sat) 23 Dec 2017 (51),West Ham United FC,02-03,01-01,Newcastle United FC +19,(Sat) 23 Dec 2017 (51),Swansea City AFC,01-01,0-0,Crystal Palace FC +19,(Sat) 23 Dec 2017 (51),Everton FC,0-0,0-0,Chelsea FC +19,(Sat) 23 Dec 2017 (51),Brighton & Hove Albion FC,1-0,0-0,Watford FC +19,(Fri) 22 Dec 2017 (51),Arsenal FC,03-03,0-1,Liverpool FC +19,(Sat) 23 Dec 2017 (51),Burnley FC,0-3,0-1,Tottenham Hotspur FC +19,(Sat) 23 Dec 2017 (51),Southampton FC,01-01,1-0,Huddersfield Town AFC +19,(Sat) 23 Dec 2017 (51),Manchester City FC,4-0,1-0,AFC Bournemouth +19,(Sat) 23 Dec 2017 (51),Stoke City FC,03-01,2-0,West Bromwich Albion FC +20,(Tue) 26 Dec 2017 (52),Watford FC,02-01,01-01,Leicester City FC +20,(Tue) 26 Dec 2017 (52),AFC Bournemouth,03-03,01-01,West Ham United FC +20,(Tue) 26 Dec 2017 (52),West Bromwich Albion FC,0-0,0-0,Everton FC +20,(Tue) 26 Dec 2017 (52),Chelsea FC,2-0,0-0,Brighton & Hove Albion FC +20,(Thu) 28 Dec 2017 (52),Crystal Palace FC,02-03,0-1,Arsenal FC +20,(Wed) 27 Dec 2017 (52),Newcastle United FC,0-1,0-1,Manchester City FC +20,(Tue) 26 Dec 2017 (52),Manchester United FC,02-02,0-2,Burnley FC +20,(Tue) 26 Dec 2017 (52),Huddersfield Town AFC,01-01,1-0,Stoke City FC +20,(Tue) 26 Dec 2017 (52),Liverpool FC,5-0,1-0,Swansea City AFC +20,(Tue) 26 Dec 2017 (52),Tottenham Hotspur FC,05-02,2-0,Southampton FC +21,(Sun) 31 Dec 2017 (52),West Bromwich Albion FC,01-01,0-0,Arsenal FC +21,(Sat) 30 Dec 2017 (52),Huddersfield Town AFC,0-0,0-0,Burnley FC +21,(Sat) 30 Dec 2017 (52),Manchester United FC,0-0,0-0,Southampton FC +21,(Sat) 30 Dec 2017 (52),Newcastle United FC,0-0,0-0,Brighton & Hove Albion FC +21,(Sun) 31 Dec 2017 (52),Crystal Palace FC,0-0,0-0,Manchester City FC +21,(Sat) 30 Dec 2017 (52),Liverpool FC,02-01,0-1,Leicester City FC +21,(Sat) 30 Dec 2017 (52),AFC Bournemouth,02-01,1-0,Everton FC +21,(Sat) 30 Dec 2017 (52),Watford FC,01-02,1-0,Swansea City AFC +21,(Sat) 30 Dec 2017 (52),Chelsea FC,5-0,3-0,Stoke City FC +22,(Mon) 1 Jan 2018 (1),Brighton & Hove Albion FC,02-02,01-01,AFC Bournemouth +22,(Thu) 4 Jan 2018 (1),Tottenham Hotspur FC,01-01,0-0,West Ham United FC +22,(Mon) 1 Jan 2018 (1),Burnley FC,01-02,0-0,Liverpool FC +22,(Wed) 3 Jan 2018 (1),Arsenal FC,02-02,0-0,Chelsea FC +22,(Mon) 1 Jan 2018 (1),Stoke City FC,0-1,0-0,Newcastle United FC +22,(Mon) 1 Jan 2018 (1),Everton FC,0-2,0-0,Manchester United FC +22,(Mon) 1 Jan 2018 (1),Leicester City FC,3-0,0-0,Huddersfield Town AFC +22,(Tue) 2 Jan 2018 (1),West Ham United FC,02-01,0-1,West Bromwich Albion FC +22,(Tue) 2 Jan 2018 (1),Swansea City AFC,0-2,0-1,Tottenham Hotspur FC +22,(Tue) 2 Jan 2018 (1),Southampton FC,01-02,1-0,Crystal Palace FC +22,(Tue) 2 Jan 2018 (1),Manchester City FC,03-01,2-0,Watford FC +23,(Sun) 14 Jan 2018 (2),Liverpool FC,04-03,01-01,Manchester City FC +23,(Sat) 13 Jan 2018 (2),Huddersfield Town AFC,01-04,01-01,West Ham United FC +23,(Sat) 13 Jan 2018 (2),Newcastle United FC,01-01,0-0,Swansea City AFC +23,(Sun) 14 Jan 2018 (2),AFC Bournemouth,02-01,0-0,Arsenal FC +23,(Sat) 13 Jan 2018 (2),Chelsea FC,0-0,0-0,Leicester City FC +23,(Sat) 13 Jan 2018 (2),Watford FC,02-02,0-2,Southampton FC +23,(Sat) 13 Jan 2018 (2),Crystal Palace FC,1-0,1-0,Burnley FC +23,(Sat) 13 Jan 2018 (2),West Bromwich Albion FC,2-0,1-0,Brighton & Hove Albion FC +23,(Sat) 13 Jan 2018 (2),Tottenham Hotspur FC,4-0,1-0,Everton FC +23,(Mon) 15 Jan 2018 (3),Manchester United FC,3-0,2-0,Stoke City FC +24,(Sun) 21 Jan 2018 (3),Southampton FC,01-01,01-01,Tottenham Hotspur FC +24,(Sat) 20 Jan 2018 (3),West Ham United FC,01-01,0-0,AFC Bournemouth +24,(Sat) 20 Jan 2018 (3),Burnley FC,0-1,0-0,Manchester United FC +24,(Sat) 20 Jan 2018 (3),Stoke City FC,2-0,0-0,Huddersfield Town AFC +24,(Sat) 20 Jan 2018 (3),Everton FC,01-01,0-1,West Bromwich Albion FC +24,(Sat) 20 Jan 2018 (3),Brighton & Hove Albion FC,0-4,0-2,Chelsea FC +24,(Sat) 20 Jan 2018 (3),Manchester City FC,03-01,1-0,Newcastle United FC +24,(Mon) 22 Jan 2018 (4),Swansea City AFC,1-0,1-0,Liverpool FC +24,(Sat) 20 Jan 2018 (3),Leicester City FC,2-0,1-0,Watford FC +24,(Sat) 20 Jan 2018 (3),Arsenal FC,04-01,4-0,Crystal Palace FC +25,(Tue) 30 Jan 2018 (5),West Ham United FC,01-01,01-01,Crystal Palace FC +25,(Tue) 30 Jan 2018 (5),Swansea City AFC,03-01,01-01,Arsenal FC +25,(Wed) 31 Jan 2018 (5),Newcastle United FC,01-01,0-0,Burnley FC +25,(Wed) 31 Jan 2018 (5),Stoke City FC,0-0,0-0,Watford FC +25,(Wed) 31 Jan 2018 (5),Chelsea FC,0-3,0-0,AFC Bournemouth +25,(Wed) 31 Jan 2018 (5),Southampton FC,01-01,0-1,Brighton & Hove Albion FC +25,(Tue) 30 Jan 2018 (5),Huddersfield Town AFC,0-3,0-2,Liverpool FC +25,(Wed) 31 Jan 2018 (5),Manchester City FC,3-0,1-0,West Bromwich Albion FC +25,(Wed) 31 Jan 2018 (5),Everton FC,02-01,2-0,Leicester City FC +25,(Wed) 31 Jan 2018 (5),Tottenham Hotspur FC,2-0,2-0,Manchester United FC +26,(Sat) 3 Feb 2018 (5),Brighton & Hove Albion FC,03-01,01-01,West Ham United FC +26,(Sat) 3 Feb 2018 (5),West Bromwich Albion FC,02-03,01-02,Southampton FC +26,(Sat) 3 Feb 2018 (5),Manchester United FC,2-0,0-0,Huddersfield Town AFC +26,(Sat) 3 Feb 2018 (5),Burnley FC,01-01,0-1,Manchester City FC +26,(Sun) 4 Feb 2018 (5),Crystal Palace FC,01-01,0-1,Newcastle United FC +26,(Sat) 3 Feb 2018 (5),AFC Bournemouth,02-01,0-1,Stoke City FC +26,(Sat) 3 Feb 2018 (5),Leicester City FC,01-01,1-0,Swansea City AFC +26,(Mon) 5 Feb 2018 (6),Watford FC,04-01,1-0,Chelsea FC +26,(Sun) 4 Feb 2018 (5),Liverpool FC,02-02,1-0,Tottenham Hotspur FC +26,(Sat) 3 Feb 2018 (5),Arsenal FC,05-01,4-0,Everton FC +27,(Sat) 10 Feb 2018 (6),Manchester City FC,05-01,01-01,Leicester City FC +27,(Sun) 11 Feb 2018 (6),Huddersfield Town AFC,04-01,02-01,AFC Bournemouth +27,(Sat) 10 Feb 2018 (6),Everton FC,03-01,0-0,Crystal Palace FC +27,(Sat) 10 Feb 2018 (6),Swansea City AFC,1-0,0-0,Burnley FC +27,(Sat) 10 Feb 2018 (6),Tottenham Hotspur FC,1-0,0-0,Arsenal FC +27,(Sun) 11 Feb 2018 (6),Newcastle United FC,1-0,0-0,Manchester United FC +27,(Sat) 10 Feb 2018 (6),Stoke City FC,01-01,0-1,Brighton & Hove Albion FC +27,(Sun) 11 Feb 2018 (6),Southampton FC,0-2,0-2,Liverpool FC +27,(Sat) 10 Feb 2018 (6),West Ham United FC,2-0,1-0,Watford FC +27,(Mon) 12 Feb 2018 (7),Chelsea FC,3-0,1-0,West Bromwich Albion FC +28,(Sun) 25 Feb 2018 (8),Manchester United FC,02-01,01-01,Chelsea FC +28,(Sat) 24 Feb 2018 (8),Burnley FC,01-01,0-0,Southampton FC +28,(Sat) 24 Feb 2018 (8),West Bromwich Albion FC,01-02,0-0,Huddersfield Town AFC +28,(Sun) 25 Feb 2018 (8),Crystal Palace FC,0-1,0-0,Tottenham Hotspur FC +28,(Sat) 24 Feb 2018 (8),Watford FC,1-0,0-0,Everton FC +28,(Sat) 24 Feb 2018 (8),Leicester City FC,01-01,0-1,Stoke City FC +28,(Sat) 24 Feb 2018 (8),AFC Bournemouth,02-02,0-2,Newcastle United FC +28,(Thu) 1 Mar 2018 (9),Arsenal FC,0-3,0-3,Manchester City FC +28,(Sat) 24 Feb 2018 (8),Brighton & Hove Albion FC,04-01,1-0,Swansea City AFC +28,(Sat) 24 Feb 2018 (8),Liverpool FC,04-01,1-0,West Ham United FC +29,(Sun) 4 Mar 2018 (9),Brighton & Hove Albion FC,02-01,02-01,Arsenal FC +29,(Sat) 3 Mar 2018 (9),Southampton FC,0-0,0-0,Stoke City FC +29,(Sat) 3 Mar 2018 (9),Watford FC,1-0,0-0,West Bromwich Albion FC +29,(Sun) 4 Mar 2018 (9),Manchester City FC,1-0,0-0,Chelsea FC +29,(Sat) 3 Mar 2018 (9),Leicester City FC,01-01,0-1,AFC Bournemouth +29,(Sat) 3 Mar 2018 (9),Burnley FC,02-01,0-1,Everton FC +29,(Mon) 5 Mar 2018 (10),Crystal Palace FC,02-03,1-0,Manchester United FC +29,(Sat) 3 Mar 2018 (9),Liverpool FC,2-0,1-0,Newcastle United FC +29,(Sat) 3 Mar 2018 (9),Tottenham Hotspur FC,2-0,1-0,Huddersfield Town AFC +29,(Sat) 3 Mar 2018 (9),Swansea City AFC,04-01,2-0,West Ham United FC +30,(Sat) 10 Mar 2018 (10),West Bromwich Albion FC,01-04,01-01,Leicester City FC +30,(Sun) 11 Mar 2018 (10),AFC Bournemouth,01-04,01-01,Tottenham Hotspur FC +30,(Sat) 10 Mar 2018 (10),Huddersfield Town AFC,0-0,0-0,Swansea City AFC +30,(Sat) 10 Mar 2018 (10),West Ham United FC,0-3,0-0,Burnley FC +30,(Sat) 10 Mar 2018 (10),Everton FC,2-0,0-0,Brighton & Hove Albion FC +30,(Mon) 12 Mar 2018 (11),Stoke City FC,0-2,0-1,Manchester City FC +30,(Sun) 11 Mar 2018 (10),Arsenal FC,3-0,1-0,Watford FC +30,(Sat) 10 Mar 2018 (10),Chelsea FC,02-01,2-0,Crystal Palace FC +30,(Sat) 10 Mar 2018 (10),Manchester United FC,02-01,2-0,Liverpool FC +30,(Sat) 10 Mar 2018 (10),Newcastle United FC,3-0,2-0,Southampton FC +31,(Sat) 31 Mar 2018 (13),Watford FC,02-02,01-01,AFC Bournemouth +31,(Sun) 1 Apr 2018 (13),Chelsea FC,01-03,01-01,Tottenham Hotspur FC +31,(Sat) 17 Mar 2018 (11),AFC Bournemouth,02-01,0-0,West Bromwich Albion FC +31,(Sat) 17 Mar 2018 (11),Stoke City FC,0-1,0-0,Everton FC +31,(Sat) 31 Mar 2018 (13),Brighton & Hove Albion FC,0-2,0-0,Leicester City FC +31,(Sat) 31 Mar 2018 (13),Newcastle United FC,1-0,0-0,Huddersfield Town AFC +31,(Sun) 1 Apr 2018 (13),Arsenal FC,3-0,0-0,Stoke City FC +31,(Sat) 31 Mar 2018 (13),West Bromwich Albion FC,01-02,0-1,Burnley FC +31,(Sat) 17 Mar 2018 (11),Huddersfield Town AFC,0-2,0-1,Crystal Palace FC +31,(Sat) 31 Mar 2018 (13),Everton FC,01-03,0-3,Manchester City FC +31,(Sat) 31 Mar 2018 (13),Crystal Palace FC,01-02,1-0,Liverpool FC +31,(Sat) 31 Mar 2018 (13),Manchester United FC,2-0,2-0,Swansea City AFC +31,(Sat) 17 Mar 2018 (11),Liverpool FC,5-0,2-0,Watford FC +31,(Sat) 31 Mar 2018 (13),West Ham United FC,3-0,3-0,Southampton FC +32,(Sat) 7 Apr 2018 (14),Brighton & Hove Albion FC,01-01,01-01,Huddersfield Town AFC +32,(Sun) 8 Apr 2018 (14),Arsenal FC,03-02,02-01,Southampton FC +32,(Sat) 7 Apr 2018 (14),West Bromwich Albion FC,01-01,0-0,Swansea City AFC +32,(Sat) 7 Apr 2018 (14),Stoke City FC,01-02,0-0,Tottenham Hotspur FC +32,(Sat) 7 Apr 2018 (14),Watford FC,01-02,0-0,Burnley FC +32,(Sat) 7 Apr 2018 (14),AFC Bournemouth,02-02,0-0,Crystal Palace FC +32,(Sat) 7 Apr 2018 (14),Everton FC,0-0,0-0,Liverpool FC +32,(Sat) 7 Apr 2018 (14),Leicester City FC,01-02,0-1,Newcastle United FC +32,(Sun) 8 Apr 2018 (14),Chelsea FC,01-01,1-0,West Ham United FC +32,(Sat) 7 Apr 2018 (14),Manchester City FC,02-03,2-0,Manchester United FC +33,(Sun) 15 Apr 2018 (15),Newcastle United FC,02-01,01-01,Arsenal FC +33,(Sat) 14 Apr 2018 (15),Tottenham Hotspur FC,01-03,01-02,Manchester City FC +33,(Sat) 14 Apr 2018 (15),Crystal Palace FC,03-02,03-02,Brighton & Hove Albion FC +33,(Mon) 16 Apr 2018 (16),West Ham United FC,01-01,0-0,Stoke City FC +33,(Sun) 15 Apr 2018 (15),Manchester United FC,0-1,0-0,West Bromwich Albion FC +33,(Sat) 14 Apr 2018 (15),Huddersfield Town AFC,1-0,0-0,Watford FC +33,(Sat) 14 Apr 2018 (15),Swansea City AFC,01-01,0-1,Everton FC +33,(Sat) 14 Apr 2018 (15),Southampton FC,02-03,1-0,Chelsea FC +33,(Sat) 14 Apr 2018 (15),Liverpool FC,3-0,1-0,AFC Bournemouth +33,(Sat) 14 Apr 2018 (15),Burnley FC,02-01,2-0,Leicester City FC +34,(Tue) 17 Apr 2018 (16),Brighton & Hove Albion FC,01-01,0-0,Tottenham Hotspur FC +34,(Sun) 22 Apr 2018 (16),Arsenal FC,04-01,0-0,West Ham United FC +34,(Thu) 19 Apr 2018 (16),Leicester City FC,0-0,0-0,Southampton FC +34,(Sat) 21 Apr 2018 (16),Watford FC,0-0,0-0,Crystal Palace FC +34,(Mon) 23 Apr 2018 (17),Everton FC,1-0,0-0,Newcastle United FC +34,(Thu) 19 Apr 2018 (16),Burnley FC,01-02,0-1,Chelsea FC +34,(Sat) 21 Apr 2018 (16),West Bromwich Albion FC,02-02,0-1,Liverpool FC +34,(Wed) 18 Apr 2018 (16),AFC Bournemouth,0-2,0-1,Manchester United FC +34,(Sun) 22 Apr 2018 (16),Stoke City FC,01-01,1-0,Burnley FC +34,(Sun) 22 Apr 2018 (16),Manchester City FC,5-0,2-0,Swansea City AFC +35,(Sat) 28 Apr 2018 (17),Southampton FC,02-01,01-01,AFC Bournemouth +35,(Sun) 29 Apr 2018 (17),West Ham United FC,01-04,01-02,Manchester City FC +35,(Sat) 28 Apr 2018 (17),Burnley FC,0-0,0-0,Brighton & Hove Albion FC +35,(Sat) 28 Apr 2018 (17),Liverpool FC,0-0,0-0,Stoke City FC +35,(Sat) 28 Apr 2018 (17),Newcastle United FC,0-1,0-1,West Bromwich Albion FC +35,(Sat) 28 Apr 2018 (17),Swansea City AFC,0-1,0-1,Chelsea FC +35,(Sat) 28 Apr 2018 (17),Huddersfield Town AFC,0-2,0-1,Everton FC +35,(Sun) 29 Apr 2018 (17),Manchester United FC,02-01,1-0,Arsenal FC +35,(Mon) 30 Apr 2018 (18),Tottenham Hotspur FC,2-0,1-0,Watford FC +35,(Sat) 28 Apr 2018 (17),Crystal Palace FC,5-0,2-0,Leicester City FC +36,(Sun) 6 May 2018 (18),Manchester City FC,0-0,0-0,Huddersfield Town AFC +36,(Sat) 5 May 2018 (18),Everton FC,0-1,0-0,Southampton FC +36,(Fri) 4 May 2018 (18),Brighton & Hove Albion FC,1-0,0-0,Manchester United FC +36,(Sat) 5 May 2018 (18),West Bromwich Albion FC,1-0,0-0,Tottenham Hotspur FC +36,(Sat) 5 May 2018 (18),Leicester City FC,0-2,0-1,West Ham United FC +36,(Sat) 5 May 2018 (18),Stoke City FC,01-02,1-0,Crystal Palace FC +36,(Sat) 5 May 2018 (18),AFC Bournemouth,1-0,1-0,Swansea City AFC +36,(Sun) 6 May 2018 (18),Chelsea FC,1-0,1-0,Liverpool FC +36,(Sat) 5 May 2018 (18),Watford FC,02-01,2-0,Newcastle United FC +36,(Sun) 6 May 2018 (18),Arsenal FC,5-0,2-0,Burnley FC +37,(Wed) 9 May 2018 (19),Manchester City FC,03-01,02-01,Brighton & Hove Albion FC +37,(Wed) 9 May 2018 (19),Chelsea FC,01-01,0-0,Huddersfield Town AFC +37,(Thu) 10 May 2018 (19),West Ham United FC,0-0,0-0,Manchester United FC +37,(Tue) 8 May 2018 (19),Swansea City AFC,0-1,0-0,Southampton FC +37,(Wed) 9 May 2018 (19),Tottenham Hotspur FC,1-0,0-0,Newcastle United FC +37,(Wed) 9 May 2018 (19),Leicester City FC,03-01,1-0,Arsenal FC +38,(Sun) 13 May 2018 (19),Swansea City AFC,01-02,01-02,Stoke City FC +38,(Sun) 13 May 2018 (19),Tottenham Hotspur FC,05-04,01-02,Leicester City FC +38,(Sun) 13 May 2018 (19),Southampton FC,0-1,0-0,Manchester City FC +38,(Sun) 13 May 2018 (19),Crystal Palace FC,2-0,0-0,West Bromwich Albion FC +38,(Sun) 13 May 2018 (19),Huddersfield Town AFC,0-1,0-1,Arsenal FC +38,(Sun) 13 May 2018 (19),West Ham United FC,03-01,1-0,Everton FC +38,(Sun) 13 May 2018 (19),Burnley FC,01-02,1-0,AFC Bournemouth +38,(Sun) 13 May 2018 (19),Manchester United FC,1-0,1-0,Watford FC +38,(Sun) 13 May 2018 (19),Newcastle United FC,3-0,1-0,Chelsea FC +38,(Sun) 13 May 2018 (19),Liverpool FC,4-0,2-0,Brighton & Hove Albion FC \ No newline at end of file diff --git a/portfolio.odt b/portfolio.odt new file mode 100644 index 0000000..20a07c8 Binary files /dev/null and b/portfolio.odt differ diff --git a/relate.project.json b/relate.project.json new file mode 100644 index 0000000..906426d --- /dev/null +++ b/relate.project.json @@ -0,0 +1,12 @@ +{ + "name": "graph-db 5983247e", + "description": "", + "tags": [ + "neo4j-desktop-id-project-5983247e-d179-4214-8b1b-c6ed1516b80e", + "neo4j-desktop-id-project-fae68a42-5fd0-4364-9f5f-273e17593d8a", + "neo4j-desktop-id-project-07910e88-98a3-44ed-a517-038bf20a6c09" + ], + "id": "26ad4f9e-5027-4df2-9b22-1da37fac213f", + "metadata": {}, + "dbmss": [] +} diff --git a/report.odt b/report.odt new file mode 100644 index 0000000..da01883 Binary files /dev/null and b/report.odt differ diff --git a/scripts/create.cyp b/scripts/create.cyp new file mode 100644 index 0000000..23647ad --- /dev/null +++ b/scripts/create.cyp @@ -0,0 +1,58 @@ +//Loads data to be imported +LOAD CSV WITH HEADERS FROM 'http://localhost:11001/project-fae68a42-5fd0-4364-9f5f-273e17593d8a/import_data.csv' AS line + +WITH line, + +//Splits the String from the Date column into it's components +SPLIT(line.Date, ' ') AS date_attributes, + +//Splits the String from the FT column into it's components +SPLIT(line.FT, '-') AS full_time_score, + +//Splits the String from the HT column into it's components +SPLIT(line.HT, '-') AS half_time_score + +WITH line, date_attributes, full_time_score, half_time_score, +CASE date_attributes[2] + WHEN 'Jan' THEN '01' + WHEN 'Feb' THEN '02' + WHEN 'Mar' THEN '03' + WHEN 'Apr' THEN '04' + WHEN 'May' THEN '05' + WHEN 'Jun' THEN '06' + WHEN 'Jul' THEN '07' + WHEN 'Aug' THEN '08' + WHEN 'Sep' THEN '09' + WHEN 'Oct' THEN '10' + WHEN 'Nov' THEN '11' + WHEN 'Dec' THEN '12' +END AS month_number + + +//Creates the Round Nodes from the Round column in the import data +MERGE (r:Round {id: TOINTEGER(line.Round)}) +//Creates the Team Nodes from the Team1 column in the import data +MERGE (t1:Team {name: line.Team1}) +//Creates the Team Nodes from the Team2 column in the import data +MERGE (t2:Team {name: line.Team2}) + +//Creates the Match Nodes from the FT and HT columns in the import data +CREATE (m:Match { + date: date(date_attributes[3] + '-' + month_number + '-' + date_attributes[1]), + half_time_scores: [TOINTEGER(half_time_score[0]), TOINTEGER(half_time_score[1])], + full_time_scores: [TOINTEGER(full_time_score[0]), TOINTEGER(full_time_score[1])] +}) + +CREATE (r)-[:FIXTURE]->(m) +CREATE (t1)-[:PLAYED_IN {played: "Home"}]->(m)<-[:PLAYED_IN {played: "Away"}]-(t2); + +MATCH (t:Team)-[p:PLAYED_IN]->(m:Match) +WITH p, m, +CASE + WHEN p.played = "Home" AND m.full_time_scores[0] > m.full_time_scores[1] THEN "Won" + WHEN p.played = "Home" AND m.full_time_scores[0] < m.full_time_scores[1] THEN "Lost" + WHEN p.played = "Away" AND m.full_time_scores[0] < m.full_time_scores[1] THEN "Won" + WHEN p.played = "Away" AND m.full_time_scores[0] > m.full_time_scores[1] THEN "Lost" + WHEN m.full_time_scores[0] = m.full_time_scores[1] THEN "Drew" +END AS result +SET p.result = result diff --git a/scripts/delete.cyp b/scripts/delete.cyp new file mode 100644 index 0000000..b9833d4 --- /dev/null +++ b/scripts/delete.cyp @@ -0,0 +1,3 @@ +//Deletes all Nodes and Relationships +MATCH (node) +DETACH DELETE node diff --git a/scripts/queries/query1.cyp b/scripts/queries/query1.cyp new file mode 100644 index 0000000..c3ff09b --- /dev/null +++ b/scripts/queries/query1.cyp @@ -0,0 +1,3 @@ +//Display total number of matches played +MATCH (m:Match) +RETURN count(m) AS total_matches diff --git a/scripts/queries/query10.cyp b/scripts/queries/query10.cyp new file mode 100644 index 0000000..06a1fed --- /dev/null +++ b/scripts/queries/query10.cyp @@ -0,0 +1,17 @@ +//Display the team with the most consecutive losses +MATCH (t:Team)-[p:PLAYED_IN]->(m:Match) + +WITH t, p, m +ORDER BY t, m.date ASC + +WITH t, collect({match: m, result: p.result}) AS matches + +WITH t, reduce(count = 0, match IN matches | +CASE + WHEN match.result = "Lost" THEN count + 1 + ELSE 0 +END) AS loss_streak + +RETURN t.name AS most_consecutive_losses, loss_streak +ORDER BY loss_streak DESC +LIMIT 1 diff --git a/scripts/queries/query2.cyp b/scripts/queries/query2.cyp new file mode 100644 index 0000000..5ac5103 --- /dev/null +++ b/scripts/queries/query2.cyp @@ -0,0 +1,3 @@ +//Display details of all matches involving "Chelsea FC" +MATCH (t:Team {name: "Chelsea FC"})-[:PLAYED_IN]->(m:Match) +RETURN m as chelsea_matches, t as team diff --git a/scripts/queries/query3.cyp b/scripts/queries/query3.cyp new file mode 100644 index 0000000..d4fa898 --- /dev/null +++ b/scripts/queries/query3.cyp @@ -0,0 +1,3 @@ +//Display all the teams that played the EPL matches in the season +MATCH (t:Team)-[:PLAYED_IN]->(m:Match) +RETURN t.name as team_names, count(m) as total_games diff --git a/scripts/queries/query4.cyp b/scripts/queries/query4.cyp new file mode 100644 index 0000000..610e36c --- /dev/null +++ b/scripts/queries/query4.cyp @@ -0,0 +1,7 @@ +//Display the team with the most draws in January +MATCH (t:Team)-[:PLAYED_IN {result: "Drew"}]->(m:Match) +WHERE m.date >= date("2018-01-01") AND m.date <= date("2018-01-31") +WITH t, count(m) as drawn_matches +ORDER BY drawn_matches DESC +RETURN t.name AS most_draws_in_january, drawn_matches +LIMIT 1 diff --git a/scripts/queries/query5.cyp b/scripts/queries/query5.cyp new file mode 100644 index 0000000..afc9c30 --- /dev/null +++ b/scripts/queries/query5.cyp @@ -0,0 +1,12 @@ +//DIsplay the team that has the best scoring power +MATCH (t:Team)-[:PLAYED_IN {played: "Home"}]->(m:Match) + +WITH t, sum(m.full_time_scores[0]) AS home_goals +MATCH (t)-[:PLAYED_IN {played: "Away"}]->(m:Match) + +WITH t, home_goals, sum(m.full_time_scores[1]) AS away_goals + +WITH t, home_goals + away_goals AS total_goals +ORDER BY total_goals DESC +RETURN t.name as best_scoring_power, total_goals +LIMIT 1 diff --git a/scripts/queries/query6.cyp b/scripts/queries/query6.cyp new file mode 100644 index 0000000..b473666 --- /dev/null +++ b/scripts/queries/query6.cyp @@ -0,0 +1,11 @@ +//Display the team that has the worst defending +MATCH (t:Team)-[:PLAYED_IN {played: "Home"}]->(m:Match) + +WITH t, sum(m.full_time_scores[1]) AS home_conceded_goals +MATCH (t)-[:PLAYED_IN {played: "Away"}]->(m:Match) + +WITH t, home_conceded_goals, sum(m.full_time_scores[0]) AS away_conceded_goals + +WITH t, home_conceded_goals + away_conceded_goals AS total_conceded_goals +ORDER BY total_conceded_goals DESC +RETURN t.name AS worst_defending, total_conceded_goals diff --git a/scripts/queries/query7.cyp b/scripts/queries/query7.cyp new file mode 100644 index 0000000..9ff5e0a --- /dev/null +++ b/scripts/queries/query7.cyp @@ -0,0 +1,6 @@ +//Display the top 5 teams that have the best away winning records +MATCH (t:Team)-[:PLAYED_IN {played: "Away", result: "Won"}]->(m:Match) +WITH t, count(m) AS away_matches_won +ORDER BY away_matches_won DESC +RETURN t.name AS best_away_winning_record, away_matches_won +LIMIT 5 diff --git a/scripts/queries/query8.cyp b/scripts/queries/query8.cyp new file mode 100644 index 0000000..f71d71c --- /dev/null +++ b/scripts/queries/query8.cyp @@ -0,0 +1,7 @@ +//Display the top 5 teams with the best half time result +MATCH (t:Team)-[p:PLAYED_IN]->(m:Match) +WHERE m.half_time_scores[0] > m.half_time_scores[1] AND p.played = "Home" +OR m.half_time_scores[0] < m.half_time_scores[1] AND p.played = "Away" +RETURN t.name AS best_half_time_result, m.half_time_scores[0] AS home_score, m.half_time_scores[1] AS away_score, ABS(m.half_time_scores[0] - m.half_time_scores[1]) AS score_difference +ORDER BY score_difference DESC +LIMIT 5 diff --git a/scripts/queries/query9.cyp b/scripts/queries/query9.cyp new file mode 100644 index 0000000..61ff4ba --- /dev/null +++ b/scripts/queries/query9.cyp @@ -0,0 +1,5 @@ +//Which teams had the most draws +MATCH (t:Team)-[:PLAYED_IN {result: "Drew"}]->(m:Match) +WITH t, count(m) AS drawn_matches +ORDER BY drawn_matches DESC +RETURN t.name as most_draws, drawn_matches