-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* get cleaned wordmarks from the data repo * Increase version and add script for cleaned wordmarks
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
library(dplyr) | ||
|
||
teams <- nflfastR::teams_colors_logos %>% | ||
dplyr::filter(!team_abbr %in% c("LAR", "OAK", "SD", "STL")) | ||
|
||
purrr::walk(teams$team_abbr, function(x){ | ||
|
||
image <- magick::image_trim(magick::image_read(glue::glue( | ||
"https://static.www.nfl.com/league/apps/clubs/wordmarks/{x}_fullcolor.png" | ||
))) | ||
|
||
magick::image_write(image, path = glue::glue("wordmarks/{x}.png"), format = "png") | ||
|
||
if(x == "LA") { | ||
magick::image_write(image, path = "wordmarks/LAR.png", format = "png") | ||
magick::image_write(image, path = "wordmarks/STL.png", format = "png") | ||
} else if(x == "LAC"){ | ||
magick::image_write(image, path = "wordmarks/SD.png", format = "png") | ||
} else if(x == "LV"){ | ||
magick::image_write(image, path = "wordmarks/OAK.png", format = "png") | ||
} | ||
|
||
}) |
Binary file not shown.