Skip to content

Commit

Permalink
docs: alt text for images and package help file
Browse files Browse the repository at this point in the history
  • Loading branch information
jkennedyie committed Jul 18, 2024
1 parent 3789d94 commit 32fd8d4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ st_igr_as_sf(igrs_df, "igr")
#> 7 W POINT (1e+05 0)
```

<img src="man/figures/README-example-igr-points-1.png" width="100%" />
<img src="man/figures/README-example-igr-points-1.png" alt="A map of Ireland with a dot at the south-west corner of each sample grid reference." width="100%" />

``` r
# Converting to an sf object of POLYGON features
Expand All @@ -145,7 +145,7 @@ st_igr_as_sf(igrs_df, "igr", polygon = TRUE)
#> 7 W POLYGON ((2e+05 1e+05, 2e+0...
```

<img src="man/figures/README-example-igr-polygons-1.png" width="100%" />
<img src="man/figures/README-example-igr-polygons-1.png" alt="A map of Ireland with polygons spanning each sample grid reference. The polygons range in size from 100 km square to 1 m square." width="100%" />

### Convert to Irish grid references

Expand Down
31 changes: 31 additions & 0 deletions man/igr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/igr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ points_sf

These points can be plotted by the [tmap](https://r-tmap.github.io/tmap/) package. A basic outline of Ireland and the United Kingdom can be retrieved from the [maps](https://cran.r-project.org/package=maps) package.

```{r example-igr-poi-plot, fig.height=4, message=FALSE, eval=plot_maps, fig.alt="A map of Ireland with a dot at the south-west corner of each sample grid reference"}
```{r example-igr-poi-plot, fig.height=4, message=FALSE, eval=plot_maps, fig.alt="A map of Ireland with a dot at the south-west corner of each sample grid reference."}
library(maps)
library(tmap)
Expand Down Expand Up @@ -126,7 +126,7 @@ polygons_sf

Plotting these polygons:

```{r example-igr-pol-plot, fig.height=4, eval=plot_maps, fig.alt="A map of Ireland with polygons spanning each sample grid reference. The polygons range in size from 100 km square to 1 m square"}
```{r example-igr-pol-plot, fig.height=4, eval=plot_maps, fig.alt="A map of Ireland with polygons spanning each sample grid reference. The polygons range in size from 100 km square to 1 m square."}
tm_shape(ie_uk_sf, bbox = points_sf, ext = 1.4) +
tm_borders() +
tm_shape(polygons_sf, ext = 1.2) +
Expand Down

0 comments on commit 32fd8d4

Please sign in to comment.