pc_combine: Combine whitelisted sources and referrers with additional...

Description Usage Arguments Value Examples

View source: R/pc_combine.R

Description

Combine whitelisted sources and referrers with additional data extracted from a website

Usage

1
pc_combine(..., url_column = "landingPagePath", sheet = "combine", wait = 0.1)

Arguments

...

Named functions

url_column

Name of the column to be used for the input url.

wait

Seconds to wait between each write call. Used to prevent Google Drive API errors.

Value

Nothing, used for its side effects (fills relevant column in the 'combine' spreadsheet)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
pc_combine(url = "https://www.europeandatajournalism.eu/eng/News/Data-news/The-price-of-coastal-flood-mitigation-in-Europe",
           title = function(url) {
             pc_extract_from_web(url = url,
                                 container = "h1")
           },
           date = function(url) {
             pc_extract_from_web(url = url,
                                 container = "div",
                                 container_class = "date") %>%
               stringr::str_remove(pattern = "[[:alpha:]]+") %>%
               anytime::anydate()}
)

## End(Not run)

giocomai/popularitycheckr documentation built on Aug. 1, 2020, 11:50 a.m.