Skip to content

Commit

Permalink
fixed link
Browse files Browse the repository at this point in the history
  • Loading branch information
schochastics committed Jan 16, 2025
1 parent 042b68e commit 3eb65f7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
22 changes: 11 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ output: github_document

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

Expand All @@ -35,7 +35,7 @@ More general information on URL parsing can be found in the introductory vignett

`adaR` is part of a series of R packages to analyse webtracking data:

- [webtrackR](https://github.com/schochastics/webtrackR): preprocess raw webtracking data
- [webtrackR](https://github.com/gesistsa/webtrackR): preprocess raw webtracking data
- [domainator](https://github.com/schochastics/domainator): classify domains
- [adaR](https://github.com/gesistsa/adaR): parse urls

Expand Down Expand Up @@ -92,9 +92,9 @@ practical circumstances.

```{r faster}
bench::mark(
ada = ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag", decode = FALSE),
urltools = urltools::url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag"),
check = FALSE
ada = ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag", decode = FALSE),
urltools = urltools::url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag"),
check = FALSE
)
```

Expand All @@ -113,9 +113,9 @@ There are four more groups of functions available to work with url parsing:

```{r public_suffix}
urls <- c(
"https://subsub.sub.domain.co.uk",
"https://domain.api.gov.uk",
"https://thisisnotpart.butthisispartoftheps.kawasaki.jp"
"https://subsub.sub.domain.co.uk",
"https://domain.api.gov.uk",
"https://thisisnotpart.butthisispartoftheps.kawasaki.jp"
)
public_suffix(urls)
```
Expand Down
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ vignette via `vignette("adaR")`.

`adaR` is part of a series of R packages to analyse webtracking data:

- [webtrackR](https://github.com/schochastics/webtrackR): preprocess raw
- [webtrackR](https://github.com/gesistsa/webtrackR): preprocess raw
webtracking data
- [domainator](https://github.com/schochastics/domainator): classify
domains
Expand Down Expand Up @@ -61,12 +61,10 @@ URL.
``` r
library(adaR)
ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag")
#> href protocol
#> 1 https://user_1:[email protected]:8080/api?q=1#frag https:
#> username password host hostname port pathname
#> 1 user_1 password_1 example.org:8080 example.org 8080 /api
#> search hash
#> 1 ?q=1 #frag
#> href protocol username
#> 1 https://user_1:[email protected]:8080/api?q=1#frag https: user_1
#> password host hostname port pathname search hash
#> 1 password_1 example.org:8080 example.org 8080 /api ?q=1 #frag
```

``` cpp
Expand Down Expand Up @@ -116,15 +114,15 @@ practical circumstances.

``` r
bench::mark(
ada = ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag", decode = FALSE),
urltools = urltools::url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag"),
check = FALSE
ada = ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag", decode = FALSE),
urltools = urltools::url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag"),
check = FALSE
)
#> # A tibble: 2 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 ada 160µs 171µs 5757. 0B 13.3
#> 2 urltools 103µs 109µs 9071. 0B 15.5
#> 1 ada 158µs 165µs 5913. 0B 45.3
#> 2 urltools 104µs 108µs 8488. 0B 42.6
```

For further benchmark results, see `benchmark.md` in `data_raw`.
Expand All @@ -144,13 +142,12 @@ suffix list](https://publicsuffix.org/), **excluding** private domains.

``` r
urls <- c(
"https://subsub.sub.domain.co.uk",
"https://domain.api.gov.uk",
"https://thisisnotpart.butthisispartoftheps.kawasaki.jp"
"https://subsub.sub.domain.co.uk",
"https://domain.api.gov.uk",
"https://thisisnotpart.butthisispartoftheps.kawasaki.jp"
)
public_suffix(urls)
#> [1] "co.uk"
#> [2] "gov.uk"
#> [1] "co.uk" "gov.uk"
#> [3] "butthisispartoftheps.kawasaki.jp"
```

Expand Down

0 comments on commit 3eb65f7

Please sign in to comment.