diff --git a/app/Console/Commands/Grapper/Sofascore.php b/app/Console/Commands/Grapper/Sofascore.php index 098bb6cb..8cce2c30 100644 --- a/app/Console/Commands/Grapper/Sofascore.php +++ b/app/Console/Commands/Grapper/Sofascore.php @@ -2,9 +2,12 @@ namespace App\Console\Commands\Grapper; -use App\Console\Commands\Grapper\Sportscore\Helper; +use App\Console\Commands\Grapper\Sofascore\Tournament; use App\Console\Commands\Nuh; -use App\Models\Sport; +use App\Models\SofaScoreCategorie; +use App\Models\SofaScoreDayTournament; +use App\Models\SofaScoreTournament; +use App\Utilities\Notice; class Sofascore { @@ -12,18 +15,31 @@ class Sofascore public static $base_url = ''; - public static $sport = []; + public static $sport = [1]; public static function switch() { - self::$sport = Helper::map(); - - dd(self::$sport, Nuh::$options); - $debug = Nuh::$options['d'] ?? 0; + $truncat = Nuh::$options['t'] ?? 0; - $echo_data = Nuh::$options['e'] ?? 0; + if ($truncat) { + SofaScoreDayTournament::truncate(); + SofaScoreTournament::truncate(); + SofaScoreCategorie::truncate(); + } - $sportmap = Sport::map('logi', 1, [Nuh::$options['sport_id']]); + if ($debug) { + Notice::note(Nuh::$options['sport'].' '.Nuh::$options['name'], 'b'); + } + + switch (Nuh::$options['name']) { + case 'TOURNAMENTS': + Tournament::load(); + break; + + default: + // code... + break; + } } } diff --git a/app/Console/Commands/Grapper/Sofascore/Events.php b/app/Console/Commands/Grapper/Sofascore/Events.php new file mode 100644 index 00000000..bd980571 --- /dev/null +++ b/app/Console/Commands/Grapper/Sofascore/Events.php @@ -0,0 +1,101 @@ +select('id', 'sofascore', 'ss_slug')->get(); + + $time_zone_offset = 0; + + $years_back = 7; + + $dates = Carbon::now()->subYears($years_back); + + SofaScoreTournament::truncate(); + SofaScoreCategorie::truncate(); + + foreach ($sportmap as $sport) { + + while ($dates <= Carbon::now()) { + + $day = $dates->format('Y-m-d'); + + SofaScoreDay::updateOrCreate(['day' => $day], [$sport->ss_slug => 1]); + + $page = 1; + + while ($page) { + $url = Nuh::$options['base_url']."api/v1/sport/$sport->ss_slug/scheduled-tournaments/$day/page/$page"; + + $data = Curl::load($url); + + if ($data['hasNextPage']) { + $page++; + } else { + $page = false; + } + + foreach ($data['scheduled'] as $row) { + + if (isset($row['tournament']['uniqueTournament'])) { + $tournament = $row['tournament']['uniqueTournament']; + } else { + $tournament = $row['tournament']; + } + + $category = $tournament['category']; + + /** + * CATEGORY + */ + $country_id = Country::where('name', $category['name'])->value('id'); + $call = SofaScoreCategorie::updateOrCreate([ + 'id' => (int) $category['id'], + 'country_id' => (int) $country_id, + 'slug' => $category['slug'], + ], [ + 'name' => $category['name'], + ]); + + /** + * TOURNAMENT + */ + $sofa_score_categorie_id = $call->id; + SofaScoreTournament::updateOrCreate([ + 'id' => (int) $tournament['id'], + 'day' => $day, + ], [ + 'sport_id' => (int) $sport->id, + 'sofa_score_categorie_id' => (int) $sofa_score_categorie_id, + 'name' => $tournament['name'], + 'slug' => $tournament['slug'], + ]); + } + } + + Notice::note('All day grapped', 'g', 1); + } + } + } +} diff --git a/app/Console/Commands/Grapper/Sofascore/Helper.php b/app/Console/Commands/Grapper/Sofascore/Helper.php index 240d33ed..4ada9707 100644 --- a/app/Console/Commands/Grapper/Sofascore/Helper.php +++ b/app/Console/Commands/Grapper/Sofascore/Helper.php @@ -1,38 +1,8 @@ [ - 'name' => 'Soccer', - 'slug' => 'football', - ], - 2 => [ - 'name' => 'Basketball', - 'slug' => 'basketball', - ], - 4 => [ - 'name' => 'Ice Hockey', - 'slug' => 'ice-hockey', - ], - 5 => [ - 'name' => 'Tennis', - 'slug' => 'tennis', - ], - 64 => [ - 'name' => 'Baseball', - 'slug' => 'baseball', - ], - ]; - } + public static function map() {} } diff --git a/app/Console/Commands/Grapper/Sofascore/Tournament.php b/app/Console/Commands/Grapper/Sofascore/Tournament.php new file mode 100644 index 00000000..b97d8e5e --- /dev/null +++ b/app/Console/Commands/Grapper/Sofascore/Tournament.php @@ -0,0 +1,159 @@ +value('ss_slug'); + + $dates = Carbon::now(); + + while ($dates >= Carbon::now()->subYears($YEAR_GO_BACK)) { + + $tournaments_counter = 0; + + $day = $dates->format('Y-m-d'); + + Notice::note('sport: '.Nuh::$options['sport'].' day: '.$day, 'p'); + + /** + * grap only one time/sport check + */ + if (! SofaScoreDay::where('day', $day)->where($slug, 1)->first()) { + + SofaScoreDay::updateOrCreate(['day' => $day], [$slug => 1]); + + $page = 1; + + while ($page) { + $url = Nuh::$options['base_url']."api/v1/sport/$slug/scheduled-tournaments/$day/page/$page"; + + $rand = rand(1000000, 2000000); + if ($debug) { + Notice::note("Sleep $rand msec", 'g'); + } + usleep($rand); + + $data = Curl::load($url); + + if ($data['hasNextPage']) { + $page++; + } else { + $page = false; + } + + foreach ($data['scheduled'] as $row) { + + if (isset($row['tournament']['uniqueTournament'])) { + $tournament = $row['tournament']['uniqueTournament']; + } else { + $tournament = $row['tournament']; + } + + $category = $tournament['category']; + + if ($sport_id == 5) { + $country_id = 470; + } else { + + /** + * CATEGORY + */ + $find = [ + 'Amateur', + 'Bosnia & Herzegovina', + 'Czechia', + 'DR Congo', + 'Netherlands', + 'North & Central America', + 'Bonaire', + 'Sao Tome and Principe', + 'Cape Verde', + 'Macao', + ]; + $replace = [ + '', + 'Bosnia Herzegovina', + 'Czech Republic', + 'Congo DR', + 'Holland', + 'North America', + 'Bonaire, Sint Eustatius and Saba', + 'Sao Tome e Principe', + 'Cape Verde Islands', + 'Macau', + ]; + $country_id = Country::where('name', trim(str_replace($find, $replace, $category['name'])))->value('id'); + } + + if (! $country_id) { + // platzhalter fix later sofa_score_categories => txodds countries + // CATEGORY find <-> replace + $sofa_score_categorie_id = 10000000; + } else { + $call = SofaScoreCategorie::updateOrCreate([ + 'id' => (int) $category['id'], + 'country_id' => (int) $country_id, + 'slug' => $category['slug'], + ], [ + 'name' => $category['name'], + ]); + + $sofa_score_categorie_id = $call->id; + } + + /** + * TOURNAMENT + */ + SofaScoreTournament::updateOrCreate([ + 'sport_id' => (int) $sport_id, + 'tournament_id' => (int) $tournament['id'], + 'sofa_score_categorie_id' => (int) $sofa_score_categorie_id, + ], [ + 'name' => $tournament['name'], + 'slug' => $tournament['slug'], + ]); + $tournaments_counter++; + + /** + * DAY TOURNAMENT + */ + SofaScoreDayTournament::updateOrCreate([ + 'tournament_id' => (int) $tournament['id'], + 'day' => $day, + ]); + } + + Notice::note("tournaments: $tournaments_counter", 'p'); + + } + } + $dates->subDay(); + } + } +} diff --git a/app/Filament/Clusters/Grapper/Resources/Supervisors/Tables/SupervisorsTable.php b/app/Filament/Clusters/Grapper/Resources/Supervisors/Tables/SupervisorsTable.php index 1c4646cd..d22e545c 100644 --- a/app/Filament/Clusters/Grapper/Resources/Supervisors/Tables/SupervisorsTable.php +++ b/app/Filament/Clusters/Grapper/Resources/Supervisors/Tables/SupervisorsTable.php @@ -98,6 +98,11 @@ class SupervisorsTable 'LOGIFUTURE NIGERA' => 'LOGIFUTURE NIGERA', 'LOGIFUTURE COLOMBIA' => 'LOGIFUTURE COLOMBIA', ]; + case 12: + return [ + 'TOURNAMENTS' => 'TOURNAMENTS', + 'EVENTS' => 'EVENTS', + ]; default: return []; } diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Pages/CreateSofaScoreTournament.php b/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Pages/CreateSofaScoreTournament.php new file mode 100644 index 00000000..c4bba76c --- /dev/null +++ b/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Pages/CreateSofaScoreTournament.php @@ -0,0 +1,11 @@ +count(); + // Ensure we are on the list page + if (! class_exists(Livewire::class) || Livewire::current() === null) { + return null; + } + + $livewire = Livewire::current(); + + // Check if the current component has the table filtering traits + if (method_exists($livewire, 'getFilteredTableQuery')) { + return (string) $livewire->getFilteredTableQuery()->count(); + } + + return null; + } + + public static function getPages(): array + { + return [ + 'index' => ListSofaScoreTournaments::route('/'), + ]; + } +} diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Tables/SofaScoreTournamentsTable.php b/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Tables/SofaScoreTournamentsTable.php new file mode 100644 index 00000000..5c579777 --- /dev/null +++ b/app/Filament/Clusters/StaticData/Resources/SofaScoreTournaments/Tables/SofaScoreTournamentsTable.php @@ -0,0 +1,129 @@ +columns([ + IconColumn::make('sport.icon') + ->label('') + ->grow(false) + ->width(30) + ->color(fn ($record) => $record->sport->color) + ->icon(fn ($record) => $record->sport->icon) + ->size(IconSize::Medium) + ->tooltip(fn ($record) => $record->id) + ->visibleFrom('lg'), + TextColumn::make('sport.name'), + TextColumn::make('sofascore_category.name') + ->icon(fn ($record) => $record->sofascore_category->country->icon), + TextColumn::make('name')->searchable(), + CheckboxColumn::make('grap'), + ]) + ->filters([ + Filter::make('filters') + ->columns(2)->columnSpan(2) + ->schema([ + Select::make('sport_id') + ->default(1) + ->selectablePlaceholder(false) + ->label('Sport') + ->options(Sport::where('is_active', 1)->pluck('name', 'id')) + ->afterStateUpdated(function (callable $set) { + $set('sofa_score_categorie_id', null); + }) + ->live(), + Select::make('sofa_score_categorie_id') + ->searchable() + ->multiple() + ->label('Categorie') + ->options(function (Get $get) { + $res = SofaScoreTournament::where('sport_id', $get('sport_id')) + ->groupBy('sofa_score_categorie_id') + ->pluck('sofa_score_categorie_id') + ->toArray(); + + return SofaScoreCategorie::query()->whereIn('id', $res)->orderBy('name')->pluck('name', 'id'); + }) + ->live(), + // Select::make('competition_group_id') + // ->searchable() + // ->label('Competition Group') + // ->options(function (Get $get) { + // if ($get('country_id')) { + // return CompetitionGroup::where('country_id', $get('country_id'))->orderBy('name')->pluck('name', 'id'); + // } else { + // return CompetitionGroup::orderBy('name')->pluck('name', 'id'); + // } + // }), + ]) + ->query(function (Builder $query, array $data): Builder { + return $query->when( + $data['sport_id'], + fn (Builder $query, $sport_id) => $query->where('sport_id', $sport_id) + )->when($data['sofa_score_categorie_id'], + function (Builder $query, $sofa_score_categorie_id) { + if (is_array($sofa_score_categorie_id)) { + $query->whereIn('sofa_score_categorie_id', $sofa_score_categorie_id); + } else { + $query->where('sofa_score_categorie_id', $sofa_score_categorie_id); + } + } + ); + }), + TernaryFilter::make('grap')->placeholder('All')->label('Grapping'), + ], layout: FiltersLayout::AboveContent) + ->deferFilters(false) + ->recordActions([ + // EditAction::make(), + ]) + ->toolbarActions([ + BulkActionGroup::make([ + // DeleteBulkAction::make(), + BulkAction::make('Grap On') + ->icon('phosphor-play') + ->action(function (Collection $records): void { + foreach ($records as $record) { + SofaScoreTournament::where('id', '=', $record->id) + ->update( + ['grap' => 1] + ); + } + }), + BulkAction::make('Grap Off') + ->icon('phosphor-stop') + ->action(function (Collection $records): void { + foreach ($records as $record) { + SofaScoreTournament::where('id', '=', $record->id) + ->update( + ['grap' => 0] + ); + } + }), + ]), + ]); + } +} diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScores/Pages/CreateSofaScore.php b/app/Filament/Clusters/StaticData/Resources/SofaScores/Pages/CreateSofaScore.php deleted file mode 100644 index 923b282c..00000000 --- a/app/Filament/Clusters/StaticData/Resources/SofaScores/Pages/CreateSofaScore.php +++ /dev/null @@ -1,11 +0,0 @@ -label('Download Job') - ->icon('phosphor-download'), - ]; - } -} diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScores/SofaScoreResource.php b/app/Filament/Clusters/StaticData/Resources/SofaScores/SofaScoreResource.php deleted file mode 100644 index 3e36c185..00000000 --- a/app/Filament/Clusters/StaticData/Resources/SofaScores/SofaScoreResource.php +++ /dev/null @@ -1,43 +0,0 @@ - ListSofaScores::route('/'), - ]; - } -} diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScores/Tables/SofaScoresTable.php b/app/Filament/Clusters/StaticData/Resources/SofaScores/Tables/SofaScoresTable.php deleted file mode 100644 index bd8f1c80..00000000 --- a/app/Filament/Clusters/StaticData/Resources/SofaScores/Tables/SofaScoresTable.php +++ /dev/null @@ -1,30 +0,0 @@ -columns([ - // - ]) - ->filters([ - // - ]) - ->recordActions([ - EditAction::make(), - ]) - ->toolbarActions([ - BulkActionGroup::make([ - DeleteBulkAction::make(), - ]), - ]); - } -} diff --git a/app/Filament/Clusters/StaticData/Resources/Sports/SportResource.php b/app/Filament/Clusters/StaticData/Resources/Sports/SportResource.php index 549b0aa7..45d09a3a 100644 --- a/app/Filament/Clusters/StaticData/Resources/Sports/SportResource.php +++ b/app/Filament/Clusters/StaticData/Resources/Sports/SportResource.php @@ -9,6 +9,7 @@ use Filament\Resources\Resource; use Filament\Support\Enums\IconSize; use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; +use Filament\Tables\Columns\TextInputColumn; use Filament\Tables\Columns\ToggleColumn; use Filament\Tables\Filters\TernaryFilter; use Filament\Tables\Table; @@ -42,6 +43,11 @@ class SportResource extends Resource TextColumn::make('b365')->alignCenter()->label('Bet365'), TextColumn::make('logi')->alignCenter()->label('Logifuture'), TextColumn::make('magl')->alignCenter()->label('Magloo'), + TextInputColumn::make('ss_grap_years') + ->rules(['required', 'numeric', 'min:1', 'max:20']) + ->width('1rem') + ->alignCenter() + ->label('Grap Years SS'), ToggleColumn::make('is_active'), ]) ->filters([ diff --git a/app/Models/SofaScoreCategorie.php b/app/Models/SofaScoreCategorie.php new file mode 100644 index 00000000..139677ff --- /dev/null +++ b/app/Models/SofaScoreCategorie.php @@ -0,0 +1,20 @@ +belongsTo(Country::class, 'country_id', 'id'); + } +} diff --git a/app/Models/SofaScoreDay.php b/app/Models/SofaScoreDay.php new file mode 100644 index 00000000..33730fb4 --- /dev/null +++ b/app/Models/SofaScoreDay.php @@ -0,0 +1,18 @@ +belongsTo(SofaScoreTournament::class, 'tournament_id', 'tournament_id'); + } +} diff --git a/app/Models/SofaScoreEvent.php b/app/Models/SofaScoreEvent.php deleted file mode 100644 index 9ffc50a3..00000000 --- a/app/Models/SofaScoreEvent.php +++ /dev/null @@ -1,10 +0,0 @@ -belongsTo(Sport::class); + } + + public function sofascore_category() + { + return $this->belongsTo(SofaScoreCategorie::class, 'sofa_score_categorie_id', 'id'); + } +} diff --git a/app/Models/Sport.php b/app/Models/Sport.php index ac8e7b14..c8444fae 100644 --- a/app/Models/Sport.php +++ b/app/Models/Sport.php @@ -7,6 +7,10 @@ use Illuminate\Database\Eloquent\Model; class Sport extends Model { + protected $fillable = [ + 'ss_grap_years', + ]; + public static function map(string $field, $reverse = false, $limit = []) { if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl', 'sofascore'])) { diff --git a/composer.lock b/composer.lock index 20456c29..a0f297a6 100644 --- a/composer.lock +++ b/composer.lock @@ -2960,16 +2960,16 @@ }, { "name": "laravel/framework", - "version": "v12.61.0", + "version": "v12.61.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "1124062a1ca92d290c8bcb9b7f649920fa6816bf" + "reference": "e8472ca9774452fe50841d9bdced060679f4d58d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/1124062a1ca92d290c8bcb9b7f649920fa6816bf", - "reference": "1124062a1ca92d290c8bcb9b7f649920fa6816bf", + "url": "https://api.github.com/repos/laravel/framework/zipball/e8472ca9774452fe50841d9bdced060679f4d58d", + "reference": "e8472ca9774452fe50841d9bdced060679f4d58d", "shasum": "" }, "require": { @@ -3178,7 +3178,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-05-26T23:41:33+00:00" + "time": "2026-06-04T14:22:52+00:00" }, { "name": "laravel/prompts", @@ -9809,16 +9809,16 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v4.2.8", + "version": "v4.3.0", "source": { "type": "git", "url": "https://github.com/fruitcake/laravel-debugbar.git", - "reference": "799d70c1101d3f8840dd76ff68ff6a78f9352905" + "reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/799d70c1101d3f8840dd76ff68ff6a78f9352905", - "reference": "799d70c1101d3f8840dd76ff68ff6a78f9352905", + "url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/3d76ea8d78b82225b92789de65fc630c1cd8e80c", + "reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c", "shasum": "" }, "require": { @@ -9892,7 +9892,7 @@ ], "support": { "issues": "https://github.com/fruitcake/laravel-debugbar/issues", - "source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.2.8" + "source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.3.0" }, "funding": [ { @@ -9904,7 +9904,7 @@ "type": "github" } ], - "time": "2026-04-20T13:31:29+00:00" + "time": "2026-06-04T07:54:01+00:00" }, { "name": "brianium/paratest", @@ -10543,16 +10543,16 @@ }, { "name": "laravel/sail", - "version": "v1.61.0", + "version": "v1.62.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "68ef35015630fe510432e63e11e21749006df688" + "reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/68ef35015630fe510432e63e11e21749006df688", - "reference": "68ef35015630fe510432e63e11e21749006df688", + "url": "https://api.github.com/repos/laravel/sail/zipball/3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e", + "reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e", "shasum": "" }, "require": { @@ -10602,7 +10602,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2026-05-23T23:33:57+00:00" + "time": "2026-05-27T04:02:01+00:00" }, { "name": "mockery/mockery", @@ -11752,11 +11752,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.2.1", + "version": "2.2.2", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dea9c8f2d25cc849391042b71e429c1a4bf82660", - "reference": "dea9c8f2d25cc849391042b71e429c1a4bf82660", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5cc34d491a90e79c216d824f60fe21fd4d93bd6", + "reference": "e5cc34d491a90e79c216d824f60fe21fd4d93bd6", "shasum": "" }, "require": { @@ -11812,7 +11812,7 @@ "type": "github" } ], - "time": "2026-05-28T14:44:12+00:00" + "time": "2026-06-05T09:00:01+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/database/migrations/2026_06_05_144038_mongo_sofascore_events.php b/database/migrations/2026_06_05_144038_mongo_sofascore_events.php deleted file mode 100644 index 943988ff..00000000 --- a/database/migrations/2026_06_05_144038_mongo_sofascore_events.php +++ /dev/null @@ -1,28 +0,0 @@ -index('match_id'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('sofascore_events'); - } -}; diff --git a/database/migrations/2026_06_06_134913_create_sofa_score_tournaments_table.php b/database/migrations/2026_06_06_134913_create_sofa_score_tournaments_table.php new file mode 100644 index 00000000..0e8ea359 --- /dev/null +++ b/database/migrations/2026_06_06_134913_create_sofa_score_tournaments_table.php @@ -0,0 +1,33 @@ +id(); + $table->integer('sport_id')->index()->references('id')->on('sports'); + $table->integer('tournament_id')->index(); + $table->integer('sofa_score_categorie_id')->index(); + $table->string('slug')->index(); + $table->string('name'); + $table->boolean('grap')->index()->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sofa_score_tournaments'); + } +}; diff --git a/database/migrations/2026_06_06_134919_create_sofa_score_days_table.php b/database/migrations/2026_06_06_134919_create_sofa_score_days_table.php new file mode 100644 index 00000000..7e8de05f --- /dev/null +++ b/database/migrations/2026_06_06_134919_create_sofa_score_days_table.php @@ -0,0 +1,33 @@ +id(); + $table->date('day')->index(); + $table->boolean('football')->default(0); + $table->boolean('basketball')->default(0); + $table->boolean('tennis')->default(0); + $table->boolean('ice-hockey')->default(0); + $table->boolean('handball')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sofa_score_days'); + } +}; diff --git a/database/migrations/2026_06_06_135147_create_sofa_score_categories_table.php b/database/migrations/2026_06_06_135147_create_sofa_score_categories_table.php new file mode 100644 index 00000000..13c91ba0 --- /dev/null +++ b/database/migrations/2026_06_06_135147_create_sofa_score_categories_table.php @@ -0,0 +1,30 @@ +id(); + $table->string('name'); + $table->string('slug')->index(); + $table->integer('country_id')->nullable()->index(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sofa_score_categories'); + } +}; diff --git a/database/migrations/2026_06_07_051551_create_sofa_score_day_tournaments_table.php b/database/migrations/2026_06_07_051551_create_sofa_score_day_tournaments_table.php new file mode 100644 index 00000000..970bc198 --- /dev/null +++ b/database/migrations/2026_06_07_051551_create_sofa_score_day_tournaments_table.php @@ -0,0 +1,30 @@ +id(); + $table->integer('tournament_id')->index(); + $table->date('day')->index(); + $table->boolean('grapped')->index()->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sofa_score_day_tournaments'); + } +}; diff --git a/example2.json b/example2.json new file mode 100644 index 00000000..69d4b13a --- /dev/null +++ b/example2.json @@ -0,0 +1,1638 @@ +{ + "statistics": [ + { + "period": "ALL", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "49%", + "away": "51%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 49, + "awayValue": 51, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "1.94", + "away": "0.88", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1.94, + "awayValue": 0.88, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "22", + "away": "11", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 22, + "awayValue": 11, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "2", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 5, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "7", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 4, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "13", + "away": "12", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 13, + "awayValue": 12, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "428", + "away": "469", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 428, + "awayValue": 469, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "16", + "away": "10", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 16, + "awayValue": 10, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "12", + "away": "13", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 12, + "awayValue": 13, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "2", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 1, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "22", + "away": "11", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 22, + "awayValue": 11, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "5", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 5, + "awayValue": 1, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "12", + "away": "5", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 12, + "awayValue": 5, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "5", + "away": "5", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 5, + "awayValue": 5, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "12", + "away": "6", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 12, + "awayValue": 6, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "10", + "away": "5", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 10, + "awayValue": 5, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances missed", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Through balls", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "accurateThroughBall" + }, + { + "name": "Touches in penalty area", + "home": "42", + "away": "14", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 42, + "awayValue": 14, + "renderType": 1, + "key": "touchesInOppBox" + }, + { + "name": "Fouled in final third", + "home": "2", + "away": "3", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 3, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "374", + "away": "408", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 374, + "awayValue": 408, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "13", + "away": "11", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 13, + "awayValue": 11, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "48", + "away": "46", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 48, + "awayValue": 46, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Final third phase", + "home": "114/142 (80%)", + "away": "82/120 (68%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 114, + "awayValue": 82, + "homeTotal": 142, + "awayTotal": 120, + "renderType": 3, + "key": "finalThirdPhaseStatistic" + }, + { + "name": "Long balls", + "home": "20/36 (56%)", + "away": "17/39 (44%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 20, + "awayValue": 17, + "homeTotal": 36, + "awayTotal": 39, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "7/26 (27%)", + "away": "4/8 (50%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 7, + "awayValue": 4, + "homeTotal": 26, + "awayTotal": 8, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "58%", + "away": "42%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 58, + "awayValue": 42, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "2", + "away": "9", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 9, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "38/59 (64%)", + "away": "21/59 (36%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 38, + "awayValue": 21, + "homeTotal": 59, + "awayTotal": 59, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Aerial duels", + "home": "7/18 (39%)", + "away": "11/18 (61%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 7, + "awayValue": 11, + "homeTotal": 18, + "awayTotal": 18, + "renderType": 3, + "key": "aerialDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "10/18 (56%)", + "away": "1/7 (14%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 10, + "awayValue": 1, + "homeTotal": 18, + "awayTotal": 7, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "69%", + "away": "60%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 11, + "awayValue": 6, + "homeTotal": 16, + "awayTotal": 10, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "16", + "away": "10", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 16, + "awayValue": 10, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "3", + "away": "7", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 7, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "36", + "away": "41", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 36, + "awayValue": 41, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "14", + "away": "26", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 14, + "awayValue": 26, + "renderType": 1, + "key": "totalClearance" + }, + { + "name": "Errors lead to a shot", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "errorsLeadToShot" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "2", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 5, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goals prevented", + "home": "0.45", + "away": "0.66", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0.4464, + "awayValue": 0.6605, + "renderType": 1, + "key": "goalsPrevented" + }, + { + "name": "Big saves", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "diveSaves" + }, + { + "name": "High claims", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "highClaims" + }, + { + "name": "Goal kicks", + "home": "7", + "away": "9", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 9, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + }, + { + "period": "1ST", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "52%", + "away": "48%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 52, + "awayValue": 48, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "1.07", + "away": "0.23", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1.07, + "awayValue": 0.23, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "2", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 0, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "11", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 11, + "awayValue": 4, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "4", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 1, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "8", + "away": "4", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 8, + "awayValue": 4, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "240", + "away": "229", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 240, + "awayValue": 229, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "6", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 4, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "4", + "away": "8", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 8, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "11", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 11, + "awayValue": 4, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "7", + "away": "3", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 7, + "awayValue": 3, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "8", + "away": "3", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 3, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances missed", + "home": "2", + "away": "0", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 0, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Through balls", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "accurateThroughBall" + }, + { + "name": "Fouled in final third", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "212", + "away": "199", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 212, + "awayValue": 199, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "5", + "away": "6", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 5, + "awayValue": 6, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "24", + "away": "18", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 24, + "awayValue": 18, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Long balls", + "home": "12/19 (63%)", + "away": "7/20 (35%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 12, + "awayValue": 7, + "homeTotal": 19, + "awayTotal": 20, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "4/13 (31%)", + "away": "2/4 (50%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 4, + "awayValue": 2, + "homeTotal": 13, + "awayTotal": 4, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "51%", + "away": "49%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 51, + "awayValue": 49, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "2", + "away": "5", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 5, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "14/25 (56%)", + "away": "11/25 (44%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 14, + "awayValue": 11, + "homeTotal": 25, + "awayTotal": 25, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Aerial duels", + "home": "4/10 (40%)", + "away": "6/10 (60%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 4, + "awayValue": 6, + "homeTotal": 10, + "awayTotal": 10, + "renderType": 3, + "key": "aerialDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "4/6 (67%)", + "away": "0/1 (0%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 4, + "awayValue": 0, + "homeTotal": 6, + "awayTotal": 1, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "67%", + "away": "50%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 4, + "awayValue": 2, + "homeTotal": 6, + "awayTotal": 4, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "6", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 4, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "2", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 5, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "18", + "away": "17", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 18, + "awayValue": 17, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "6", + "away": "14", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 14, + "renderType": 1, + "key": "totalClearance" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goal kicks", + "home": "4", + "away": "6", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 6, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + }, + { + "period": "2ND", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "45%", + "away": "55%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 45, + "awayValue": 55, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "0.87", + "away": "0.65", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0.87, + "awayValue": 0.65, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "11", + "away": "7", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 11, + "awayValue": 7, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "1", + "away": "4", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 4, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "3", + "away": "3", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 3, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "5", + "away": "8", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 5, + "awayValue": 8, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "188", + "away": "240", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 188, + "awayValue": 240, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "10", + "away": "6", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 10, + "awayValue": 6, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "8", + "away": "5", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 5, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "11", + "away": "7", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 11, + "awayValue": 7, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "4", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 1, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "5", + "away": "2", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 5, + "awayValue": 2, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "2", + "away": "4", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 4, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "4", + "away": "3", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 3, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "7", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 4, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances missed", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Through balls", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "accurateThroughBall" + }, + { + "name": "Fouled in final third", + "home": "1", + "away": "2", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 2, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "162", + "away": "209", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 162, + "awayValue": 209, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "8", + "away": "5", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 5, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "24", + "away": "28", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 24, + "awayValue": 28, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Long balls", + "home": "8/17 (47%)", + "away": "10/19 (53%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 8, + "awayValue": 10, + "homeTotal": 17, + "awayTotal": 19, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "3/13 (23%)", + "away": "2/4 (50%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 3, + "awayValue": 2, + "homeTotal": 13, + "awayTotal": 4, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "64%", + "away": "36%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 64, + "awayValue": 36, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "0", + "away": "4", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 4, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "24/34 (71%)", + "away": "10/34 (29%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 24, + "awayValue": 10, + "homeTotal": 34, + "awayTotal": 34, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Aerial duels", + "home": "3/8 (38%)", + "away": "5/8 (63%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 3, + "awayValue": 5, + "homeTotal": 8, + "awayTotal": 8, + "renderType": 3, + "key": "aerialDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "6/12 (50%)", + "away": "1/6 (17%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 6, + "awayValue": 1, + "homeTotal": 12, + "awayTotal": 6, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "70%", + "away": "67%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 7, + "awayValue": 4, + "homeTotal": 10, + "awayTotal": 6, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "10", + "away": "6", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 10, + "awayValue": 6, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "1", + "away": "2", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 2, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "18", + "away": "24", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 18, + "awayValue": 24, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "8", + "away": "12", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 12, + "renderType": 1, + "key": "totalClearance" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "1", + "away": "4", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 4, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goal kicks", + "home": "3", + "away": "3", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 3, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/example_results.json b/example_results.json new file mode 100644 index 00000000..5e4c1c08 --- /dev/null +++ b/example_results.json @@ -0,0 +1,1612 @@ +{ + "statistics": [ + { + "period": "ALL", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "42%", + "away": "58%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 42, + "awayValue": 58, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "1.76", + "away": "0.56", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1.76, + "awayValue": 0.56, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "1", + "away": "2", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 2, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "21", + "away": "9", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 21, + "awayValue": 9, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "3", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 5, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "6", + "away": "3", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 3, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "13", + "away": "13", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 13, + "awayValue": 13, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "278", + "away": "388", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 278, + "awayValue": 388, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "15", + "away": "15", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 15, + "awayValue": 15, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "12", + "away": "13", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 12, + "awayValue": 13, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "3", + "away": "5", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 3, + "awayValue": 5, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "21", + "away": "9", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 21, + "awayValue": 9, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "8", + "away": "3", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 3, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "6", + "away": "5", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 6, + "awayValue": 5, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "7", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 7, + "awayValue": 1, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "8", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 4, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "13", + "away": "5", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 13, + "awayValue": 5, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances scored", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "bigChanceScored" + }, + { + "name": "Big chances missed", + "home": "0", + "away": "2", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 2, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Touches in penalty area", + "home": "19", + "away": "18", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 19, + "awayValue": 18, + "renderType": 1, + "key": "touchesInOppBox" + }, + { + "name": "Fouled in final third", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "222", + "away": "329", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 222, + "awayValue": 329, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "14", + "away": "16", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 14, + "awayValue": 16, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "43", + "away": "66", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 43, + "awayValue": 66, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Final third phase", + "home": "67\/95 (71%)", + "away": "81\/123 (66%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 67, + "awayValue": 81, + "homeTotal": 95, + "awayTotal": 123, + "renderType": 3, + "key": "finalThirdPhaseStatistic" + }, + { + "name": "Long balls", + "home": "35\/58 (60%)", + "away": "26\/48 (54%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 35, + "awayValue": 26, + "homeTotal": 58, + "awayTotal": 48, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "0\/8 (0%)", + "away": "3\/10 (30%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 0, + "awayValue": 3, + "homeTotal": 8, + "awayTotal": 10, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "54%", + "away": "46%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 54, + "awayValue": 46, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "4", + "away": "6", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 4, + "awayValue": 6, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "31\/58 (53%)", + "away": "27\/58 (47%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 31, + "awayValue": 27, + "homeTotal": 58, + "awayTotal": 58, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Aerial duels", + "home": "2\/3 (67%)", + "away": "1\/3 (33%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 2, + "awayValue": 1, + "homeTotal": 3, + "awayTotal": 3, + "renderType": 3, + "key": "aerialDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "5\/16 (31%)", + "away": "0\/9 (0%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 5, + "awayValue": 0, + "homeTotal": 16, + "awayTotal": 9, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "80%", + "away": "87%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 12, + "awayValue": 13, + "homeTotal": 15, + "awayTotal": 15, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "15", + "away": "15", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 15, + "awayValue": 15, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "2", + "away": "6", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 6, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "42", + "away": "45", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 42, + "awayValue": 45, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "16", + "away": "17", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 16, + "awayValue": 17, + "renderType": 1, + "key": "totalClearance" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "3", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 5, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goals prevented", + "home": "0.07", + "away": "-1.21", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0.0704, + "awayValue": -1.2093, + "renderType": 1, + "key": "goalsPrevented" + }, + { + "name": "High claims", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "highClaims" + }, + { + "name": "Punches", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "punches" + }, + { + "name": "Goal kicks", + "home": "10", + "away": "7", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 10, + "awayValue": 7, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + }, + { + "period": "1ST", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "40%", + "away": "60%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 40, + "awayValue": 60, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "0.70", + "away": "0.16", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0.7, + "awayValue": 0.16, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "13", + "away": "2", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 13, + "awayValue": 2, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "1", + "away": "3", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 3, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "4", + "away": "2", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 4, + "awayValue": 2, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "5", + "away": "5", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 5, + "awayValue": 5, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "140", + "away": "220", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 140, + "awayValue": 220, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "7", + "away": "7", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 7, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "5", + "away": "5", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 5, + "awayValue": 5, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "1", + "away": "2", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 2, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "13", + "away": "2", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 13, + "awayValue": 2, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "5", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 5, + "awayValue": 1, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "5", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 5, + "awayValue": 1, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "3", + "away": "0", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 3, + "awayValue": 0, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "6", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 1, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "7", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 1, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances scored", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "bigChanceScored" + }, + { + "name": "Big chances missed", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Fouled in final third", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "112", + "away": "191", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 112, + "awayValue": 191, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "7", + "away": "6", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 6, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "20", + "away": "36", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 20, + "awayValue": 36, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Long balls", + "home": "14\/27 (52%)", + "away": "18\/27 (67%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 14, + "awayValue": 18, + "homeTotal": 27, + "awayTotal": 27, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "0\/6 (0%)", + "away": "2\/5 (40%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 0, + "awayValue": 2, + "homeTotal": 6, + "awayTotal": 5, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "52%", + "away": "48%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 52, + "awayValue": 48, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "3", + "away": "2", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 3, + "awayValue": 2, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "13\/25 (52%)", + "away": "12\/25 (48%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 13, + "awayValue": 12, + "homeTotal": 25, + "awayTotal": 25, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "3\/7 (43%)", + "away": "0\/5 (0%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 3, + "awayValue": 0, + "homeTotal": 7, + "awayTotal": 5, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "100%", + "away": "100%", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 7, + "awayValue": 7, + "homeTotal": 7, + "awayTotal": 7, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "7", + "away": "7", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 7, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "2", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 5, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "22", + "away": "20", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 22, + "awayValue": 20, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "8", + "away": "14", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 14, + "renderType": 1, + "key": "totalClearance" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "1", + "away": "3", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 3, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goal kicks", + "home": "1", + "away": "5", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 5, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + }, + { + "period": "2ND", + "groups": [ + { + "groupName": "Match overview", + "statisticsItems": [ + { + "name": "Ball possession", + "home": "45%", + "away": "55%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 45, + "awayValue": 55, + "renderType": 2, + "key": "ballPossession" + }, + { + "name": "Expected goals", + "home": "1.05", + "away": "0.41", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1.05, + "awayValue": 0.41, + "renderType": 1, + "key": "expectedGoals" + }, + { + "name": "Big chances", + "home": "1", + "away": "1", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceCreated" + }, + { + "name": "Total shots", + "home": "8", + "away": "7", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 7, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Goalkeeper saves", + "home": "2", + "away": "2", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 2, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Corner kicks", + "home": "2", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 1, + "renderType": 1, + "key": "cornerKicks" + }, + { + "name": "Fouls", + "home": "8", + "away": "8", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 8, + "awayValue": 8, + "renderType": 1, + "key": "fouls" + }, + { + "name": "Passes", + "home": "138", + "away": "168", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 138, + "awayValue": 168, + "renderType": 1, + "key": "passes" + }, + { + "name": "Tackles", + "home": "8", + "away": "8", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 8, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Free kicks", + "home": "7", + "away": "8", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 8, + "renderType": 1, + "key": "freeKicks" + }, + { + "name": "Yellow cards", + "home": "2", + "away": "3", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 2, + "awayValue": 3, + "renderType": 1, + "key": "yellowCards" + } + ] + }, + { + "groupName": "Shots", + "statisticsItems": [ + { + "name": "Total shots", + "home": "8", + "away": "7", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 7, + "renderType": 1, + "key": "totalShotsOnGoal" + }, + { + "name": "Shots on target", + "home": "3", + "away": "2", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 2, + "renderType": 1, + "key": "shotsOnGoal" + }, + { + "name": "Hit woodwork", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "hitWoodwork" + }, + { + "name": "Shots off target", + "home": "1", + "away": "4", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 4, + "renderType": 1, + "key": "shotsOffGoal" + }, + { + "name": "Blocked shots", + "home": "4", + "away": "1", + "compareCode": 1, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 4, + "awayValue": 1, + "renderType": 1, + "key": "blockedScoringAttempt" + }, + { + "name": "Shots inside box", + "home": "2", + "away": "3", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 3, + "renderType": 1, + "key": "totalShotsInsideBox" + }, + { + "name": "Shots outside box", + "home": "6", + "away": "4", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 6, + "awayValue": 4, + "renderType": 1, + "key": "totalShotsOutsideBox" + } + ] + }, + { + "groupName": "Attack", + "statisticsItems": [ + { + "name": "Big chances scored", + "home": "1", + "away": "0", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 1, + "awayValue": 0, + "renderType": 1, + "key": "bigChanceScored" + }, + { + "name": "Big chances missed", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "bigChanceMissed" + }, + { + "name": "Fouled in final third", + "home": "3", + "away": "1", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 3, + "awayValue": 1, + "renderType": 1, + "key": "fouledFinalThird" + }, + { + "name": "Offsides", + "home": "0", + "away": "0", + "compareCode": 3, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 0, + "awayValue": 0, + "renderType": 1, + "key": "offsides" + } + ] + }, + { + "groupName": "Passes", + "statisticsItems": [ + { + "name": "Accurate passes", + "home": "110", + "away": "138", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 110, + "awayValue": 138, + "renderType": 1, + "key": "accuratePasses" + }, + { + "name": "Throw-ins", + "home": "7", + "away": "10", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 7, + "awayValue": 10, + "renderType": 1, + "key": "throwIns" + }, + { + "name": "Final third entries", + "home": "23", + "away": "30", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 23, + "awayValue": 30, + "renderType": 1, + "key": "finalThirdEntries" + }, + { + "name": "Long balls", + "home": "21\/31 (68%)", + "away": "8\/21 (38%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 21, + "awayValue": 8, + "homeTotal": 31, + "awayTotal": 21, + "renderType": 3, + "key": "accurateLongBalls" + }, + { + "name": "Crosses", + "home": "0\/2 (0%)", + "away": "1\/5 (20%)", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 0, + "awayValue": 1, + "homeTotal": 2, + "awayTotal": 5, + "renderType": 3, + "key": "accurateCross" + } + ] + }, + { + "groupName": "Duels", + "statisticsItems": [ + { + "name": "Duels", + "home": "56%", + "away": "44%", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 56, + "awayValue": 44, + "renderType": 2, + "key": "duelWonPercent" + }, + { + "name": "Dispossessed", + "home": "1", + "away": "4", + "compareCode": 2, + "statisticsType": "negative", + "valueType": "event", + "homeValue": 1, + "awayValue": 4, + "renderType": 1, + "key": "dispossessed" + }, + { + "name": "Ground duels", + "home": "18\/33 (55%)", + "away": "15\/33 (45%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 18, + "awayValue": 15, + "homeTotal": 33, + "awayTotal": 33, + "renderType": 3, + "key": "groundDuelsPercentage" + }, + { + "name": "Aerial duels", + "home": "2\/3 (67%)", + "away": "1\/3 (33%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 2, + "awayValue": 1, + "homeTotal": 3, + "awayTotal": 3, + "renderType": 3, + "key": "aerialDuelsPercentage" + }, + { + "name": "Dribbles", + "home": "2\/9 (22%)", + "away": "0\/4 (0%)", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 2, + "awayValue": 0, + "homeTotal": 9, + "awayTotal": 4, + "renderType": 3, + "key": "dribblesPercentage" + } + ] + }, + { + "groupName": "Defending", + "statisticsItems": [ + { + "name": "Tackles won", + "home": "63%", + "away": "75%", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "team", + "homeValue": 5, + "awayValue": 6, + "homeTotal": 8, + "awayTotal": 8, + "renderType": 4, + "key": "wonTacklePercent" + }, + { + "name": "Total tackles", + "home": "8", + "away": "8", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 8, + "renderType": 1, + "key": "totalTackle" + }, + { + "name": "Interceptions", + "home": "0", + "away": "1", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 0, + "awayValue": 1, + "renderType": 1, + "key": "interceptionWon" + }, + { + "name": "Recoveries", + "home": "20", + "away": "25", + "compareCode": 2, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 20, + "awayValue": 25, + "renderType": 1, + "key": "ballRecovery" + }, + { + "name": "Clearances", + "home": "8", + "away": "3", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 8, + "awayValue": 3, + "renderType": 1, + "key": "totalClearance" + } + ] + }, + { + "groupName": "Goalkeeping", + "statisticsItems": [ + { + "name": "Total saves", + "home": "2", + "away": "2", + "compareCode": 3, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 2, + "awayValue": 2, + "renderType": 1, + "key": "goalkeeperSaves" + }, + { + "name": "Goal kicks", + "home": "9", + "away": "2", + "compareCode": 1, + "statisticsType": "positive", + "valueType": "event", + "homeValue": 9, + "awayValue": 2, + "renderType": 1, + "key": "goalKicks" + } + ] + } + ] + } + ] +} \ No newline at end of file