NAME

Sport::Analytics::NHL::Populator - populates the Mongo DB from the normalized boxscores - see Sport::Analytics::NHL::Normalizer for that and from other sources.

SYNOPSYS

Populates the Mongo DB from the normalized boxscores - see Sport::Analytics::NHL::Normalizer for that and from other sources.

This module serves as a buffer between the external parts and the Sport::Analytics::NHL::DB MongoDB interface.

    use Sport::Analytics::NHL::Populator;
    my @db_game_ids = populate_db($boxscore, $opts)

FUNCTIONS

populate_db

Creates and/or updates all the entries in the MongoDB related to the given normalized boxscore. If necessary, and if enabled, the player files from the NHL website are crawled for each participating player. Additional entries are created for:

 * game events
 * team coaches
 * game location

See the documentation for Sport::Analytics::NHL::DB for more details.

 Arguments:
 * the normalized boxscore
 * options hashref:
   - crawl_players - whether to crawl for playerfiles
   - force - overwrite previous data

 Returns: the id of the inserted boxscore.
populate_injured_players

Work in progress. Do not use yet.

AUTHOR

More Hockey Stats, <contact at morehockeystats.com>

BUGS

Please report any bugs or feature requests to contact at morehockeystats.com, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sport::Analytics::NHL::Populator. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Sport::Analytics::NHL::Populator

You can also look for information at: