Skip to content

Commit

Permalink
adjusting readme figures
Browse files Browse the repository at this point in the history
  • Loading branch information
dhersz committed Nov 24, 2023
1 parent 43628a5 commit 06f94b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ output: github_document
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
fig.path = "man/figures/README-"
)
```

Expand Down Expand Up @@ -48,7 +47,7 @@ website](https://osmcode.org/osmium-tool/#download).
The package currently includes only three entrypoints to Osmium's API. To
demonstrate them, we will use some sample data bundled with the package.

```{r}
```{r, eval = requireNamespace("ggplot2", quietly = TRUE), fig.width = 6, fig.height = 5.5}
library(rosmium)
library(ggplot2)
Expand All @@ -69,7 +68,7 @@ Additionally, the function can also take the strategy to be used when creating
the extract, which defaults to `"complete_ways"`. Please check the function
documentation for details on the available strategies and their behavior.

```{r}
```{r, eval = requireNamespace("ggplot2", quietly = TRUE), fig.width = 6, fig.height = 4.5}
# buffering the pbf bounding box 4000 meters inward and using the result
# extent to extract the osm data inside it. transforming the crs because
# inward buffers only work with projected crs
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cur_pbf_lines <- sf::st_read(cur_pbf, layer = "lines", quiet = TRUE)
ggplot(cur_pbf_lines) + geom_sf()
```

<img src="man/figures/README-unnamed-chunk-2-1.png" width="100%" />
![](man/figures/README-unnamed-chunk-2-1.png)<!-- -->

### `extract()`

Expand Down Expand Up @@ -86,7 +86,7 @@ ggplot() +
geom_sf(data = smaller_bbox_poly, color = "red", fill = NA)
```

<img src="man/figures/README-unnamed-chunk-3-1.png" width="100%" />
![](man/figures/README-unnamed-chunk-3-1.png)<!-- -->

### `tags_filter()`

Expand Down Expand Up @@ -154,10 +154,10 @@ or the most appropriate application, depending on the output format.
``` r
# displays the content of the previous tags_filter() output in html format
show_content(output, spinner = FALSE)
#> [1] "/tmp/RtmpHTYZ4f/osm_content36271afb6bcd.html"
#> [1] "/tmp/RtmpcvrR7F/osm_content72fa21d39d4b.html"
```

<img src="man/figures/filtered_file_content.png" width="100%" />
<img src="man/figures/filtered_file_content.png" width="721" />

## Acknowledgement

Expand Down
Binary file modified man/figures/README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 06f94b9

Please sign in to comment.