Skip to content

Commit

Permalink
update readme for ggplot2 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dkahle committed Dec 5, 2015
1 parent 2acfabb commit c7f0723
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
Binary file modified README-maptypes-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 README-maptypes-2.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 README-maptypes-3.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 README-qmplot-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 README-qmplot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ ggmap makes it easy to retrieve raster map tiles from popular online mapping ser
```{r maptypes, message = FALSE}
library(ggmap)
ggmap(get_googlemap())
ggmap(get_stamenmap())
ggmap(get_stamenmap(maptype = "toner-background"))
(map <- get_map("pat neff hall", zoom = 15))
ggmap(map)
(extent <- bb2bbox(attr(map, "bb")))
ggmap(get_stamenmap(extent, zoom = 15))
ggmap(get_stamenmap(extent, zoom = 15, maptype = "toner-background"))
```

Use `qmplot()` in the same way you'd use `qplot()`, but with a map automatically added in the background:
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
<!-- README.md is generated from README.Rmd. Please edit that file -->



ggmap
=====

ggmap makes it easy to retrieve raster map tiles from popular online mapping services like google maps, open street maps, cloudmade and stamen:

``` {.r}
``` r
library(ggmap)

ggmap(get_googlemap())
(map <- get_map("pat neff hall", zoom = 15))
#> 1280x1280 terrain map image from Google Maps. see ?ggmap to plot it.
ggmap(map)
```

![](README-maptypes-1.png)

``` {.r}
ggmap(get_stamenmap())
``` r

(extent <- bb2bbox(attr(map, "bb")))
#> left bottom right top
#> -97.13503 31.53403 -97.10756 31.55743
ggmap(get_stamenmap(extent, zoom = 15))
```

![](README-maptypes-2.png)

``` {.r}
ggmap(get_stamenmap(maptype = "toner-background"))
``` r
ggmap(get_stamenmap(extent, zoom = 15, maptype = "toner-background"))
```

![](README-maptypes-3.png)

Use `qmplot()` in the same way you'd use `qplot()`, but with a map automatically added in the background:

``` {.r}
``` r
downtown <- subset(crime,
-95.39681 <= lon & lon <= -95.34188 &
29.73631 <= lat & lat <= 29.78400
Expand All @@ -40,7 +43,7 @@ qmplot(lon, lat, data = downtown, maptype = "toner-background", color = I("red")

![](README-qmplot-1.png)

``` {.r}
``` r
qmplot(lon, lat, data = downtown, maptype = "toner-lite", geom = "density2d", color = I("red"))
```

Expand Down

0 comments on commit c7f0723

Please sign in to comment.