Code Monkey home page Code Monkey logo

bingmapr's Introduction

bingmapr

Lifecycle: experimental Project Status: Active – The project has reached a stable, usable state and is being actively developed. License: MIT

bingmapr is an R packge for retrieving and plotting maps from the Bing Static Maps API. I created this package in May 2021 primarily to to access Bing’s Bird’s Eye (oblique-angle) imagery so the routes and traffic features of the API are not currently supported. There are no immediate plans to add these features to the package but pull requests are welcome.

This package is inspired by the snapbox package that allows the use of the maps from the Mapbox static map API in ggplot maps. I hope to integrate bingmapr with ggplot in the future.

You can also explore the static map API in the browser using the Bing Static Map Maker made by Katy DeCorah.

Installation

You can install the development version of bingmapr from GitHub with:

# install.packages("pak")
pak::pkg_install("elipousson/bingmapr")

Example

This package requires a Bing Maps API Key which you can get here: https://www.bingmapsportal.com/

bing_maps_api_key(key = "put your key here", install = TRUE)

Here are examples you can run with an installed key:

# Get request URL centered on Washington Square Park in New York, NY
get_request_url(location = c(40.7308349, -73.99746074), orientation = "W")

# Get an sf object to show how bingmapr can use sf objects for locations
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"))

# Plot a static map showing the center of Wake County, North Carolina
get_map_image(location = nc[nc$NAME == "Wake", ], orientation = 180)

# Plot static map centered 300 meters north and 500 meters west of the center
get_map_image(location = nc[nc$NAME == "Wake", ], orientation = 180, nudge = c(300, 500))

bingmapr's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bingmapr's Issues

Add spatial objects on top of bing maps

Hello,

I found this package very interesting for me. However, it is possible to use the resulting map as a base map for other spatial objects. I need to plot sf objects (points/polygons) on top of the resulting map. Is it possible?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.