Skip to content

Commit

Permalink
density2d qmplot example
Browse files Browse the repository at this point in the history
  • Loading branch information
dkahle committed Dec 10, 2014
1 parent 8b2def8 commit 19d5fd1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 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 added 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.
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ downtown <- subset(crime,
)
qmplot(lon, lat, data = downtown, maptype = "toner-background", color = I("red"))
qmplot(lon, lat, data = downtown, maptype = "toner-lite", geom = "density2d")
```

## Installation
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
<!-- 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())
```

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

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

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

``` r
``` {.r}
ggmap(get_stamenmap(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 @@ -37,6 +40,12 @@ qmplot(lon, lat, data = downtown, maptype = "toner-background", color = I("red")

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

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

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

Installation
------------

Expand Down

0 comments on commit 19d5fd1

Please sign in to comment.