API documentation
kennerspiel
make_transformer(list_columns: Iterable[str] | str, player_count_columns: Iterable[str] | str = ('min_players', 'max_players'), min_df: float = 0.01) -> ColumnTransformer
Game transformer.
Source code in src/spiel_des_jahres/kennerspiel/__init__.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
predictions
fetch_candidates(year: int, *, main_user: str = 's_d_j', jury_member_prefix: str = 's_d_j_', kennerspiel_cutoff_score: float = 0.5, max_results: int | None = 25, base_url: str = BASE_URL, timeout: float = 60, max_exclude_games: int = 250, progress_bar: bool = False) -> tuple[list[str], pl.LazyFrame]
Fetch all candidates from the recommendation API.
Source code in src/spiel_des_jahres/predictions.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
recommend_games(*, base_url: str = BASE_URL, max_results: int | None = 25, timeout: float = 60, request_params: dict[str, Any] | None = None, progress_bar: bool = False) -> Generator[dict[str, Any]]
Call to a Recommend.Games instance.
Source code in src/spiel_des_jahres/predictions.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
sdj_predictions(year: int, *, fetch_from_api: bool = False, main_user: str = 's_d_j', main_user_weights: Mapping[str, float] | None = None, jury_member_prefix: str = 's_d_j_', jury_member_weights: Mapping[str, float] | None = None, kennerspiel_cutoff_score: float = 0.5, games_path: Path | str = SCRAPED_DIR / 'bgg_GameItem.csv', kennerspiel_model: BaseEstimator | Path | str | None = None, recommender_model: BaseGamesRecommender[int, str] | Path | str | None = None, max_results: int | None = 25, base_url: str = BASE_URL, timeout: float = 60, max_exclude_games: int = 250, progress_bar: bool = False) -> pl.LazyFrame
Predict the Spiel des Jahres winner.
Source code in src/spiel_des_jahres/predictions.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | |
update_reviews
find_bgg_ids(df: pl.DataFrame, bgg_games_path: Path) -> pl.DataFrame
Try to find BGG IDs for games with missing IDs using exact and fuzzy matching.
Source code in src/spiel_des_jahres/update_reviews.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |