ggmap

What's going on with get_map?

十年热恋 提交于 2019-12-20 03:36:07
问题 I started off today with about 230 map requests to googlemaps with get_map before I got an error (lost the original error). My first assumption was just that I used it beyond the limits of the api but I've tried using the open street maps api as a source an the error message I get still looks like get_map is using googlemaps. What's going on? I restarted my computer and tried to recreate the error. When I go to the url listed in the source I don't get my map, I get an small image that looks

ggmap::get_map doesn't allow the exact specification of my map's corners?

≯℡__Kan透↙ 提交于 2019-12-18 14:57:51
问题 I am using R package ggmap. ?get_map says: location: an address, longitude/latitude pair (in that order), or left/bottom/right/top bounding box My code: library(ggmap) library(mapproj) lat_bottom = 52.33 # bottom latitude of Berlin lat_top = 52.5 # top latitude of Berlin lon_left = 13.0 # left longitude of Berlin lon_rigth = 13.95 # right longitude of Berlin mymap <- get_map(location = c(lon_left,lat_bottom,lon_rigth,lat_top), source="google") ggmap(mymap) Why is it giving me a warning:

How to have widescreen resolution with ggmap

亡梦爱人 提交于 2019-12-18 13:35:36
问题 I have a data like this: YEAR-STORM-DATETIME-NORTH-WEST-PRESSURE-WIND-SPEED-TRACKDATE 2011-arlene-6/28/2011 6:00-19.9-92.8-1007-30-NA-6/28/2011 2011-arlene-6/28/2011 12:00-20.3-93.1-1006-35-4-6/28/2011 2011-arlene-6/28/2011 18:00-20.7-93.5-1006-40-5-6/28/2011 so on.. I am new to R and I am plotting a density-plot over ggmap . I am also using shiny R to display them in website. The problem is the output are all non-widescreen (squared) maps. I want to have a rectangular map, like google maps

Determining the distance between two ZIP codes (alternatives to mapdist)

好久不见. 提交于 2019-12-18 10:36:16
问题 I want to calculate the distance between approx. 100,000 different ZIP codes. I know about the mapdist function in the ggmap package mapdist works perfectly: library(ggmap) mapdist('Washington', 'New York', mode = 'driving') # from to m km miles seconds minutes hours # 1 Washington New York 366284 366.284 227.6089 13997 233.2833 3.888056 mapdist('20001', '10001', mode = 'driving') # from to m km miles seconds minutes hours # 1 20001 10001 363119 363.119 225.6421 13713 228.55 3.809167 However,

gmmap with zoom=1 not displaying

两盒软妹~` 提交于 2019-12-18 09:32:12
问题 I am trying to plot a world map using zoom=1 in the code below and it is not displaying, but when I put any other zoom number (for example 4) it is working perfectly... Any idea why it is not working with zoom=1 ? library(ggmap) map <- qmap('world', zoom = 1) map 回答1: according to the documentation here http://cran.r-project.org/web/packages/ggmap/ggmap.pdf "Map zoom, an integer from 3 (continent) to 21 (building), default value 10 (city).Openstreetmaps limits a zoom of 18, and the limit on

Applying revgeocode to a list of longitude-latitude coordinates

痞子三分冷 提交于 2019-12-18 03:34:17
问题 I'm trying to get the Zip codes of a (long) list of Longitude Latitude coordinates by using the revgeodcode function in the ggmap library. My question & data are the same as here: Using revgeocode function in a FOR loop. Help required but the accepted answer does not work for me. My data (.csv): ID, Longitude, Latitude 311175, 41.298437, -72.929179 292058, 41.936943, -87.669838 12979, 37.580956, -77.471439 I follow the same steps: data <- read.csv(file.choose()) dset <- as.data.frame(data[,2

Polygons nicely cropping ggplot2/ggmap at different zoom levels

不羁的心 提交于 2019-12-17 17:45:14
问题 I am playing with a spatial data set (mostly polygons over an area of a city) and I would like to produce different views, based on different levels of zoom. Everything is fine when I have the plot boundary box larger than the area that contains the polygons. But on a zoom in, some polygons get parts that are outside the boundary box and the output for those polygons is problematic : the points of the polygon outside the boundary box are not displayed, resulting in polygons that are not

Barplots on a Map

我们两清 提交于 2019-12-17 09:45:36
问题 I am trying to plot vertical bar plots over a map. I went through examples online but somehow not being able to. My data is currently in this format: University| Count | Category | lat | long Here is the code that I am trying execute: library(ggplot2) library(ggmap) library(ggsubplot) df1 <- data.frame( University = c(rep("University1", 4), rep("University2", 4), rep("University3", 4), rep("University4", 4)), Count = sample(1:10, 16, replace = T), Category = rep(c("A", "B", "C", "D")), lat =

get_map not passing the API key (HTTP status was '403 Forbidden')

烈酒焚心 提交于 2019-12-17 06:45:47
问题 I have been facing this issue in the get_map() function ( ggmap library) in R. My code was running without the need to specify an API key (for source = "google" ) for several months. However, the code stopped working a couple of weeks back. I understood that Google has made the API key mandatory (or maybe they allowed a certain no of calls without the api key which I exhausted). However, even after specifying the API key (obtained from Google Cloud Platform) my code continued behaving the

R - ggplot - How to automatically set point color based on values?

不想你离开。 提交于 2019-12-13 23:07:35
问题 My question is similar to this question. But I can't transfer it to my own data. I have a dataframe like this (over 1400 rows): Code Stationsname Startdatum LAT LON Höhe Area Mean 1 AT0ENK1 Enzenkirchen im Sauwald 03.06.1998 48.39167 13.67111 525 rural 55.76619 2 AT0ILL1 Illmitz 01.05.1978 47.77000 16.76640 117 rural 58.98511 3 AT0PIL1 Pillersdorf bei Retz 01.02.1992 48.72111 15.94223 315 rural 59.47489 4 AT0SON1 Sonnblick 01.09.1986 47.05444 12.95834 3106 rural 97.23856 5 AT0VOR1 Vorhegg bei