Description Usage Arguments Value Examples
Returns a summary of all price values from the price list
in the detailed product description page. Currently,
this summary contains the 3 lowest prices (or NA
if
there aren't enough prices on that page), and the median
of all prices.
1 | calc_price_summary(detailpagehtml)
|
detailpagehtml |
html structure from a single geizhals page listing details of a specific item. |
A tibble (data.frame) with two columns (key and value),
containing the price summary results (key being a descriptive
key like price_min
, value being the respective summary
measure of the prices). The value column is of type
character
, in order to be row-binded to the categories
and their values (which are also of type character
).
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
## get data from multiple geizhals category pages:
url_geizhals <- "https://geizhals.at/?cat=acam35"
listpagehtml_list <- fetch_all_listpages(url_geizhals, max_pages = 2)
dat_listpage <- parse_all_listpages(listpagehtml_list)
## get url of a single detail page and read html:
url_detailpage <- dat_listpage[["detailpage_url"]][1]
detailpagehtml <- xml2::read_html(url_detailpage)
## get prices summary:
calc_price_summary(detailpagehtml)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.