1- # -*- coding: utf-8 -*-
2- """
3- Created on Mon Jun 1 22:25:10 2020
4-
5- @author: sothfulwave612
6-
7- Modules Used(2):-
8- 1. utility_function_io -- module where i/o functions are defined.
9- 2. utility_function_viz -- module where visualization functions are defined.
10- """
11- import utility_function_io as ufio
12- import utility_function_viz as ufvz
13-
14- ## making dataframe for competitions
15- comp_df = ufio .get_competitions ()
16-
17- ## La Liga Competition
18- comp_id = 11
19- season_id = 23
20-
21- ## getting all the matches
22- match_df = ufio .get_matches (comp_id , season_id )
23-
24- ## listing all the match ids
25- match_ids = list (match_df ['match_id' ].unique ())
26-
27- ## shot dataframe
28- shot_df = ufio .make_shots_event (match_ids , player = 'Lionel Andrés Messi Cuccittini' )
1+ # -*- coding: utf-8 -*-
2+ """
3+ Created on Mon Jun 1 22:25:10 2020
4+
5+ @author: sothfulwave612
6+
7+ Modules Used(2):-
8+ 1. utility_function_io -- module where i/o functions are defined.
9+ 2. utility_function_viz -- module where visualization functions are defined.
10+ """
11+ import utility_function_io as ufio
12+ import utility_function_viz as ufvz
13+
14+ ## making dataframe for competitions
15+ comp_df = ufio .get_competitions ()
16+
17+ ## La Liga Competition
18+ comp_id = 11
19+ season_id = 23
20+
21+ ## getting all the matches
22+ match_df = ufio .get_matches (comp_id , season_id )
23+
24+ ## listing all the match ids
25+ match_ids = list (match_df ['match_id' ].unique ())
26+
27+ ## event dataframe for the whole season
28+ team = 'Barcelona'
29+ event_df = ufio .full_season_events (match_ids , team )
30+
31+ ## making shot dataframe for a particular player
32+ player_name = 'Lionel Andrés Messi Cuccittini'
33+ shot_df = event_df .loc [
34+ (event_df ['player_name' ] == player_name ) &
35+ (event_df ['type_name' ] == 'Shot' )
36+ ]
37+
38+ ## getting through ball pass ids from event dataframe
39+ through_ids = ufio .get_through_balls_id (event_df )
40+
41+ f = shot_df .loc [ ]
0 commit comments