Group
Extension

Matches 10

Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL.pm ( view source; MetaCPAN )
se Storable qw(store retrieve dclone);
use POSIX qw(strftime);

use List::MoreUtils qw(uniq);
use JSON -convert_blessed_universally;

use Sport::Analytics::NHL::Vars qw(:all);
use Sport::Analytics::NH

 * force - override the already present files and data

=item C<compile_file>

Compiles a single JSON or HTML report into a parsed hashref and stores it in a Storable file
Arguments:
 * The options h
 from the boxscore data structure. Saves the normalized boxscore both as a Perl storable and as a JSON. This is the highest level of integration that this package provides without a database (Mongo) i
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Report/BS.pm ( view source; MetaCPAN )
 => 'all';
use utf8;

use experimental qw(smartmatch);

use Encode;
use Storable qw(dclone);

use JSON;
use Try::Tiny;
use Text::Unidecode;

use parent 'Sport::Analytics::NHL::Report';

use Sport::Ana
r the Boxscore JSON report

=head1 SYNOPSYS

Class for the Boxscore JSON report.

    use Sport::Analytics::NHL::Report::BS;
    my $report = Sport::Analytics::NHL::Report::BS->new($json)
    $report-
>process();

=head1 METHODS

=over 2

=item C<new>

Create the Boxscore object with the JSON.

=item C<process>

Process the Boxscore into the object compatible with further processing, etc.

=item C<
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Merger.pm ( view source; MetaCPAN )
erger - Merge the extra (HTML) reports into the master one (JSON).

=head1 SYNOPSYS

Merge the extra (HTML) reports into the master one (JSON).

These are methods that match the data in the extra repo
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/LocalConfig.pm ( view source; MetaCPAN )
ED_FILE    => 'merged.storable',
	NORMALIZED_FILE => 'normalized.storable',
	NORMALIZED_JSON => 'normalized.json',
	SUMMARIZED_FILE => 'SUMMARIZED',
	DEFAULT_PLAYERFILE_EXPIRATION => 0.5,
	ROTOFILE_EX
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Scraper.pm ( view source; MetaCPAN )
use File::Copy;
use File::Basename;
use Time::HiRes qw(time usleep);
use POSIX qw(strftime);

use JSON;
use LWP::Simple;
use HTML::TableExtract;

use Sport::Analytics::NHL::Vars qw(:scrape);
use Sport
n to crawl

Returns: hash reference of seasonal schedules where seasons are the keys, and decoded JSONs are the values.

=item C<get_game_url_args>

Sets the arguments to populate the game URL for a g
he JSON is retrieved. Unfortunately, the JSON does not contain the draft information, so another call to the HTML page is made to complete the information. The merged information is stored in a json f
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Vars.pm ( view source; MetaCPAN )
IS_AUTHOR LOG_DIR MAIN_LOG MERGED_FILE MONGO_DB
	MONGO_HOST MONGO_PORT NORMALIZED_FILE NORMALIZED_JSON
	REDIRECT_STDERR REPORTS_DIR	SCRAPED_GAMES SQL_COMMIT_RATE
	STDERR_LOG SQLNAME SQLUSER SUMMARIZED
ASON, $CURRENT_STAGE

=item :scrape

:basic, $DEFAULT_PLAYERFILE_EXPIRATION - when the playerfile json is considered stale and needs to be re-scraped

=item :test

:basic, $IS_AUTHOR - you shouldn't s
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Report/Player.pm ( view source; MetaCPAN )
ll';
use experimental qw(smartmatch);

use Encode;
use Storable qw(dclone);

use Date::Parse;
use JSON;
use Try::Tiny;
use Text::Unidecode;

use Sport::Analytics::NHL::Util qw(:format :utils :times);
the Player JSON report

=head1 SYNOPSYS

Class for the Boxscore JSON report.

    use Sport::Analytics::NHL::Report::Player;
    my $report = Sport::Analytics::NHL::Report::Player->new($json)
    $rep
ort->process();

=head1 METHODS

=over 2

=item C<new>

Create the Player object with the JSON.

=item C<process>

Process the Player into the object compatible with further processing, etc.

=item C<
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Tools.pm ( view source; MetaCPAN )
w(time2str);
use JSON;
use List::MoreUtils qw(any part firstval);

use Sport::Analytics::NHL::Vars	qw(
	:globals :web
	$DATA_DIR $REPORTS_DIR $CURRENT_SEASON $MONGO_DB $NORMALIZED_JSON
);
use Sport::A
refers to
 Arguments: the YYYYMMDD date
 Returns: the YYYY or YYYY-1 season

=item C<get_schedule_json_file>

 Returns the path to the schedule file in the filesystem
 Arguments: the season and the ro
e_ids
	get_game_files_by_id get_schedule_json_file
);

our @web = qw(
);

our @schedule = qw(
	convert_schedule_game arrange_schedule_by_date get_schedule_json_file
	read_schedules get_games_from_sche
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Config.pm ( view source; MetaCPAN )
S => 1999,
	TV => 2007,
	TH => 2007,
	PL => 2002,
	RO => 2005,
);

our $MAIN_GAME_FILE      = 'BS.json';
our $SECONDARY_GAME_FILE = 'BS.html';

our $REGULAR = 2;
our $PLAYOFF = 3;

our $UNKNOWN_PLAYER
> 2010, source => 'json', descr => 'Event Coordinates' },
	location    => {season => 1997, source => 'json', descr => 'Game Venue' },
	officials   => {season => 1923, source => 'json', descr => 'Game 
rce => 'json', descr => 'Penalty Box'},
	periods     => {season => 2010, source => 'json', descr => 'Period data, inconsistent before that' },
	severity    => { season => 2010, source => 'json', descr
Sport-Analytics-NHL ( R/RO/ROMM/Sport-Analytics-NHL-1.53.tar.gz, ROMM, 2019; MetaCPAN )
Sport-Analytics-NHL/lib/Sport/Analytics/NHL/Report.pm ( view source; MetaCPAN )


Common constructor wrapper. Assigns the report plugin, and initializes the report object. For a json report usually an overloaded constructor is required. For an HTML report, the generic html_new (q
ts in the object.

=back

=cut

use Data::Dumper;

our %REPORT_TYPES = (
	BS => 'json',
	PB => 'json',
	Player => 'json',
	PL => 'html',
	RO => 'html',
	GS => 'html',
	BH => 'html',
	ES => 'html',
	TV
nknown report type $args->{type}\n";
		return undef;
	}
	$self = $REPORT_TYPES{$args->{type}} eq 'json'
		? $plugin->new($args->{data})
		: $plugin->html_new($args);
	$self->{type} = $args->{type};
	$

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.