dkahle / dkahle/ggmap

Update README re. what it looks like when Stamen has poor tile data

Open
#273 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
778
Forks
234
PR merge metrics
No merged PRs in 30d

Description

- ggmap_3.0.0.900
- ggplot2_3.1.0
- R 3.5.2

---

I was wondering why a map I was building would sometimes get errors in some `maptype`s, and return a completely blank plot (i.e. a completely white background except for points) with other map types. Eventually I found that it's because Stamen does not have good tiles for that region.

It would be good if the readme could show users what happens in these cases, and what it looks like.

I will submit a PR for this later.

```
dat <-
data.frame(
lat = c(-17.46915, -17.46915, -17.46915, -17.46915, -17.46963,
-17.46963, -17.46963, -17.46963, -17.46896, -17.46896,
-17.46896, -17.46896, -17.470533, -17.470533, -17.470533, -17.470533,
-17.4703, -17.4703, -17.4703, -17.4703, -17.469583, -17.469583,
-17.469583, -17.469583, -17.469938, -17.469938, -17.471302,
-17.470467, -17.470467, -17.470467, -17.470832),
lon = c(140.79945, 140.79945, 140.79945, 140.79945, 140.79967,
140.79967, 140.79967, 140.79967, 140.79927, 140.79927,
140.79927, 140.79927, 140.796717, 140.796717, 140.796717, 140.796717,
140.796683, 140.796683, 140.796683, 140.796683, 140.796367,
140.796367, 140.796367, 140.796367, 140.793741, 140.793741,
140.794474, 140.795435, 140.795435, 140.795435, 140.795601)
)

qmplot(lon, lat, data = dat, maptype = "terrain", zoom = 18)

## Using zoom = 18...
## Source : http://tile.stamen.com/terrain/18/233594/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233594/143994.png.
## Source : http://tile.stamen.com/terrain/18/233595/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233595/143994.png.
## Source : http://tile.stamen.com/terrain/18/233596/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233596/143994.png.
## Source : http://tile.stamen.com/terrain/18/233597/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233597/143994.png.
## Source : http://tile.stamen.com/terrain/18/233598/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233598/143994.png.
## Source : http://tile.stamen.com/terrain/18/233599/143994.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233599/143994.png.
## Source : http://tile.stamen.com/terrain/18/233594/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233594/143995.png.
## Source : http://tile.stamen.com/terrain/18/233595/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233595/143995.png.
## Source : http://tile.stamen.com/terrain/18/233596/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233596/143995.png.
## Source : http://tile.stamen.com/terrain/18/233597/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233597/143995.png.
## Source : http://tile.stamen.com/terrain/18/233598/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233598/143995.png.
## Source : http://tile.stamen.com/terrain/18/233599/143995.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233599/143995.png.
## Source : http://tile.stamen.com/terrain/18/233594/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233594/143996.png.
## Source : http://tile.stamen.com/terrain/18/233595/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233595/143996.png.
## Source : http://tile.stamen.com/terrain/18/233596/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233596/143996.png.
## Source : http://tile.stamen.com/terrain/18/233597/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233597/143996.png.
## Source : http://tile.stamen.com/terrain/18/233598/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233598/143996.png.
## Source : http://tile.stamen.com/terrain/18/233599/143996.png
## Not Found (HTTP 404). Failed to aquire tile /terrain/18/233599/143996.png.

qmplot(lon, lat, data = dat, maptype = "terrain-background", zoom = 18)

## A white plot with points superimposed.

qmplot(lon, lat, data = dat, maptype = "watercolor", zoom = 18)

## A plot that shows the sea and the land

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.