dkahle / dkahle/ggmap

alternative to get_openstreetmap (source: Wickham's ggplot2 book)

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

Description

Hi, I'm teaching a course using Hadley Wickham's 'ggplot2' book, and in [the section on raster maps](https://ggplot2-book.org/maps.html#rastermaps), he uses the following code:
```
mi_counties <- map_data("county", "michigan") %>%
select(lon = long, lat, group, id = subregion)

if (file.exists("mi_raster.rds")) {
mi_raster <- readRDS("mi_raster.rds")
} else {
bbox <- c(
min(mi_counties$lon), min(mi_counties$lat),
max(mi_counties$lon), max(mi_counties$lat)
)
mi_raster <- ggmap::get_openstreetmap(bbox, scale = 8735660)
saveRDS(mi_raster, "mi_raster.rds")
}
```
I'm not familiar with the subject, and was just wondering what -- if any -- appropriate alternative may exist.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the raster maps example in the linked ggplot2 book section and checking the current documentation for ggmap::get_openstreetmap. Determine whether the function still has a supported replacement for the shown Michigan bounding-box workflow. Done means documenting a confirmed alternative and verifying that it can produce the raster map used by the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.