| download_party_logo | R Documentation |
Downloads a party logo image from a URL and saves it to a file.
download_party_logo(logo_url, destfile, overwrite = FALSE)
logo_url |
A character string with the logo URL (from [get_party_logo()]). |
destfile |
Path where the image should be saved. |
overwrite |
Logical. If 'TRUE', overwrite existing files. |
Invisible 'TRUE' if successful, 'FALSE' otherwise.
if (curl::has_internet()) {
logo_url <- get_party_logo(
"https://en.wikipedia.org/wiki/Democratic_Party_(United_States)"
)
tmp_file <- tempfile(fileext = ".png")
download_party_logo(logo_url, tmp_file)
unlink(tmp_file)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.