Code Monkey home page Code Monkey logo

r-maps's Introduction

Mapping techniques in R

This is a collection of R code for that I have been using for visualizing spatial data. Each of the different types of mapping techniques are briefly discussed below. As I explore more techniques, they will be added to the list.

Simple country map with point data added

In this example, point data is mapped onto a country map.

https://github.com/asheshwor/R-maps/blob/master/01_simple-map.R

Great circle map

Points across the globe are connected using great circle arcs in this example. An excellent way to visualize global inter-connections. In the first example, tourist arrival data for Nepal is visualized with colours representing the number of arrivales. The arrival figures have been extracted from pdf file at http://www.tourism.gov.np/uploaded/TourrismStat2012.pdf with a few edits on the name of countires to match the ones on the map.

https://github.com/asheshwor/R-maps/blob/master/02_great-circle-map.R

R plot

Another example of great circle map with international work permits data for Nepal. The figures have been extracted from pdf file at www.dofe.gov.np (in Nepali language) with minor edits on the name of countries.

R plot

Dynamic heatmap using leaflet and leafletheat plugin

See example at http://asheshwor.com.np/host/heatmap.html Dynamic heatmap plot

Interactive maps using Cartographer package

See example at http://asheshwor.com.np/host/workpermits2011.html Scaled circles showing number of international work permits issued by Department of Foreign Employment, Nepal in 2011

Code:

  1. Interactive maps using Shiny - Leaflet integration

Leaflet map in a Shiny app for visualizing Nepal earthquake data https://github.com/asheshwor/np-quake See live example at: https://asheshwor.shinyapps.io/np-quake Leaflet man in Shiny to visualize Nepal earthquake data

  1. ggmap square map plots

Code example: https://github.com/asheshwor/R-maps/blob/master/05_ggmap_google_location.R ggmap plot example

r-maps's People

Contributors

asheshwor avatar

Watchers

James Cloos avatar  avatar

Forkers

libardo1

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.