Giter Site home page Giter Site logo

tmap-workshop's People

Contributors

mtennekes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tmap-workshop's Issues

Bathymetry data

Hi Martijn, I am trying to work out how to add bathymetry lines to a tmap, I have tried converting a marmot bathymetry map of the area I specifically would like to use, as.raster but I am unable to use so far in tmap. The maps are for a species of shearwater I am researching showing their habitat use. Can I add bathymetry data to tmap?

or is there a better way to do it in tmap by not using marmap, I am getting a lot of errors and wandering if tmap and marmap are not compatible?

Kind regards
Penny
tmap wedgies.pdf
marmap1-bathy.pdf

#Create the bathymetry map using marmap

library(marmap)
papoue <- getNOAA.bathy(lon1 = 100, lon2 = 180, lat1 = -60, lat2 = 40, resolution = 15)
plot(papoue, land = TRUE, deep = c(-9000, -3000, 0),
     shallow = c(-3000, -10, 0),
     step = c(1000, 1000, 0),
     lwd = c(0.8, 0.8, 1), lty = c(1, 1, 1),
     col = c("lightgrey", "darkgrey","black"),
     drawlabel = c(FALSE, FALSE, FALSE))

bathy<-marmap::as.raster(papoue)
class(bathy)

#Create a map using data from wedgetailed shearwaters from Muttonbid Island

library(tmap)
library(tmaptools)
data(World)
tmap_mode("plot")
library(raster)

#add it to tmap maps?
tmap::tm_shape(mtnr)+tm_raster(palette = "YlGnBu", legend.show = FALSE)+tm_shape(World)+tm_borders()+
  tm_grid(col ="gray80", alpha = 0.3)+tm_fill(col = "black")+
  tm_xlab("Longitude", size = 0.8)+tm_ylab("Latitude", size = 0.8)+
  tm_layout(title = "(a) n = 19", scale = 0.7, main.title.size = 0.8,title.position = c('left','bottom'))+
  tm_shape(siteMT)+tm_dots(size = 0.2, shape = 8, col = "red")+
  tm_shape(siteMG)+tm_dots(size = 0.2, shape = 8, col = "green")+
  tm_shape(siteGI)+tm_dots(size = 0.2, shape = 8, col = "green")

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.