dkahle / ggmap

A package for plotting maps in R with ggplot2
766 stars 231 forks source link

Stamen migration to Stadia Maps (+ add new styles) #351

Closed ianthetechie closed 11 months ago

ianthetechie commented 1 year ago

Before you open your PR

Description

Reflects that Stamen map tiles are now hosted by Stadia Maps. The old endpoints will start showing warning tiles sometime in September before being shut off on October 31, 2023.

Closes #350.

ianthetechie commented 1 year ago

Just a quick bump on this, as we plan to start brownouts toward the end of September to let people know to switch over. It would be great to have ggmap updated.

ianthetechie commented 1 year ago

Bump @dkahle?

dkahle commented 12 months ago

This is great, thanks @ianthetechie. Is there a reason why you removed get_stamenmap() completely instead of just adding get_stadiamap()? I would think it preferable to simply make the latter in addition to the former, .Deprecated() it (if that's still relevant at this point, which it appears to be), and when the former stops working .Defunct() it and point to get_stadiamap(). Thoughts?

ianthetechie commented 12 months ago

Good question @dkahle. To be completely honest this is the first time I've written anything in R in like 8 years, so I don't know what the generally accepted practices are around deprecation in the R community. Since it's already a breaking change (API keys are required so that's a semantically breaking change) and the Stamen function would only make sense with a subset of styles, I thought it was easier to just remove it as that's what both OpenLayers and Leaflet Providers opted for, but I'm open to your suggestions on this. Feel free to suggest / make edits directly (I think those are enabled).

jimr1603 commented 11 months ago

I installed Ian's version to give it a try after finding the brownout in my pipeline.

Works smooth enough once I've got the API key, and the auto messages got me on the right pages to get an API key quickly.

Unfortunately it looks like Stadia is inheriting the brownout at this stage. The following snippet has brownout tiles:


get_stadiamap(bbox = c(left = -1.56, bottom = 53.78, right = -1.5,top = 53.82),
              zoom = 14) %>%
  ggmap()

For backwards-compatibility I'd suggest leaving in get_stamen but replacing the function with a message to change to the new function.

ianthetechie commented 11 months ago

Unfortunately it looks like Stadia is inheriting the brownout at this stage. The following snippet has brownout tiles:

@jimr1603 Quick clarification request: did you add an API key? We still allow unauthenticated requests during the brownout, but you will have to invoke register_stadiamaps("YOUR-API-KEY") to keep using the tiles after October 31st.

jimr1603 commented 11 months ago

I did, but I'll see if this still happens after the computer's had a couple of reboot cycles, later today.

On Mon, 16 Oct 2023 at 05:29, Ian Wagner @.***> wrote:

Unfortunately it looks like Stadia is inheriting the brownout at this stage. The following snippet has brownout tiles:

@jimr1603 https://github.com/jimr1603 Quick clarification request: did you add an API key? We still allow unauthenticated requests during the brownout, but you will have to invoke register_stadiamaps("YOUR-API-KEY") to keep using the tiles after October 31st.

— Reply to this email directly, view it on GitHub https://github.com/dkahle/ggmap/pull/351#issuecomment-1763707020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKKVDNVZVQXKQJLSCVZZPDX7SZ2NAVCNFSM6AAAAAA4BZZAJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTG4YDOMBSGA . You are receiving this because you were mentioned.Message ID: @.***>

jimr1603 commented 11 months ago

Tested it just now and can't replicate. Maybe the session needed restarting after loading the API key the first time, maybe I did something wrong 🤷

ianthetechie commented 11 months ago

Just a quick bump on this @dkahle. The total shutoff date is this week for the old Stamen URLs.

dkahle commented 11 months ago

Got it. Thanks @ianthetechie!