Wouldn't it be great to quickly get answers about players stats, team stats, and general stats for the NFL?
If you missed a game, wouldn't it be nice to just ask a bot for specific player or team stats? Wouldn't it be nice if the bot was smart enough to answer detailed questions too, like successful 4th down plays or team rushing percentages inside the redzone? The NFL Nerd was built to provides answers to these questions and more.
Simply ask the NFL Nerd about a player, team, or football stat and you'll get responses.
The NFL Nerd can give you career stats on players or teams, or week by week stats. The NFL Nerd can also provide leader list if no player or team is provided and just a stat is offered.
How It Works
The NFL Nerd uses an AWS API Gateway to accept POST requests from Slack. The requests are forwarded to an AWS Lambda bot function. The bot function uses nlp libraries and string similarity logic to parse requests and map them to a query for Sportradar's proprietary stats analysis too. The resulting stats data is then mapped into a formatted Slack message inside the Lambda function.
Parsing bot requests and mapping to an existing query interface was challenging. Extracting player names and teams, then separating them from the stat and week or season was also challenging.
The NFL Nerd is planning a public release, as well as the ability to answer streaks, comparisons, and more complex stat questions.