Giter Site home page Giter Site logo

quickmapr's Introduction

quickmapr

travis_status AppVeyor Build Status

There are many packages that already exist or are in active development that support the visualization of spatial data in R. However, there seems to be a gap for those that need to quickly view, compare, and explore the results of a given spatial analysis. The current thinking for quickmapr is to allow for quick visualization of sp and raster objects.

Planned functionality for the first release is for easy mapping of multiple layers, simple zooming, panning, and labelling. These tools are intended for use within an active spatial analysis workflow and not for production quality maps.

quickmapr is built as a series of wrapper functions for the default sp plotting functions and currently utilizes either the zoom packages for zooming and panning or simply re-plots the maps with new x and y limits. Currently there are 8 commands planned. As the idea behind this is to quickly map data, an emphasis was given to brevity of function names. The commands are:

  • qmap(): creates the map
  • zi(): zooms in
  • zo(): zooms out
  • ze(): zoom in to an extent
  • p(): pans
  • l(): adds labels
  • i(): identify features
  • f(): returns to extent of originally created map

Example data are available via:

  • data(lake)

##Installation This package is not yet on CRAN. To install

install.packages("devtools")
library("devtools")
install_github("jhollist/quickmapr")
library("quickmapr")

##Using Quickmapr (work in progress) Basic usage of quickmapr is built around a qmap object which is simply a list of sp or raster objects and a recorded plot. Most of the other quickmpar functions will work with a qmap object.

To create a qmap object:

#First some data
data(lake)
#Create your first quick map and object
qm <- qmap(elev,samples,buffer,width)

plot of chunk unnamed-chunk-2

There are some other options on qmap that let you change the draw order, coloring of vectors, extent of the map, and whether or not to preform a basic projection check (data are assumed to be in the same coordinate reference system).

So for instance, if you want to zoom in to the extent of one of your layers you could do something like:

#Zoom to the extent of the layer named width
qmap(qm,extent=width)

plot of chunk unnamed-chunk-3

## qm.elev

## qm.samples

## qm.buffer

## qm.width

Currently this is only working with object in memory and not pulling from the qmap object.

You can change colors (this is still a bit clunky).

#draw samples and width in red and buffer with blue fill
qmap(qm,order = c(2,4,3), colors = c("red","red","blue"), fill=TRUE)

plot of chunk unnamed-chunk-4

## qm.elev

## qm.samples

## qm.buffer

## qm.width
## red

## red

## blue

## red

quickmapr's People

Contributors

jhollist avatar

Watchers

James Cloos avatar beyond avatar

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.