Coder Social home page Coder Social logo

landscapetools 0.5 about landscapetools HOT 16 CLOSED

ropensci avatar ropensci commented on May 30, 2024
landscapetools 0.5

from landscapetools.

Comments (16)

marcosci avatar marcosci commented on May 30, 2024 2

Down to:

Imports: 
    classInt,
    ggplot2,
    raster,
    tibble

from landscapetools.

mhesselbarth avatar mhesselbarth commented on May 30, 2024 1

Currently, basically all funcitions have the prefix util_ no matter if they are e.g. for visualization or to convert data, right? I think it would make sense, to come up with a bit more detailed nameing scheme similar to landscapemetrics.

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024 1

Perfect, will do that :)
show_landscapes is roughly done, needs a bit of tweaking still.

from landscapetools.

Nowosad avatar Nowosad commented on May 30, 2024 1

Impressive!

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024 1

classInt can be taken of the list by implementing:

https://github.com/macroevolution/bammtools/blob/master/BAMMtools/src/jenksBrks.c

from landscapetools.

Nowosad avatar Nowosad commented on May 30, 2024

Talking about the landscapetools, is that expected behavior?

library(landscapetools)
l1 <- NLMR::nlm_fbm(64, 64)
l2 <- NLMR::nlm_planargradient(64, 64)
l3 <- NLMR::nlm_randomrectangularcluster(ncol = 60, nrow = 60, minl = 5, maxl = 10)
l4 <- NLMR::nlm_random(64, 64)

lst1 <- list(layer1 = l1,
             layer2 = l2,
             layer3 = l3,
             layer4 = l4)
util_facetplot(lst1, div_scales = FALSE)

util_facetplot(lst1, div_scales = TRUE)

Created on 2018-12-07 by the reprex package (v0.2.1)

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

Sure, do we want to keep show as prefix for the visualisation functions? Any ideas for merge, classify, rescale? 🤔 I think util could stay for raster2tibble for example, or?

And Jakub this was pretty much WIP 😆 I think util_facetplot will either way end up in util_plot as method and the idea with div_scales was to have a seperate color scale for each facet - to show spatial variables like pH, land use, ... at the moment the coloring works fine, but cowplot has to be replaced with grid.

from landscapetools.

mhesselbarth avatar mhesselbarth commented on May 30, 2024

For util_classify() I would suggest something as get_classes() or get_discrete() if we want to somehow stick to the naming style of landscapemetrics. As said before, all plot functions would get the show_-prefix. For the rest, I actually like the util_-prefix (e.g. util_merge() and util_rescale()).

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

Just found this, may be helpful for show_landscapes: https://github.com/clauswilke/relayer

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

util_writeESRI needs to be a bit faster, have to check how writeRaster makes that in raster.

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

So, both of you now also have write access here.

I condensed it down to 6 dependencies, fonts are gone etc. and it should be ready for the merge with landscapemetrics 👍

from landscapetools.

mhesselbarth avatar mhesselbarth commented on May 30, 2024

Wait... did we decide to merge the two? Or do you mean to move some functions from landscapemetrics here?

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

from landscapetools.

Nowosad avatar Nowosad commented on May 30, 2024

@marcosci Would it be possible (and desired) to remove one or two more dependencies?

# devtools::install_github("jimhester/itdepends")
library(dplyr)
library(itdepends)

lst_dep = dep_usage_pkg("landscapetools")

lst_dep %>%
    group_by(pkg) %>% 
    count(sort = TRUE)
#> # A tibble: 9 x 2
#> # Groups:   pkg [9]
#>   pkg                n
#>   <chr>          <int>
#> 1 base             408
#> 2 ggplot2          154
#> 3 raster            40
#> 4 landscapetools    15
#> 5 grid               4
#> 6 dplyr              3
#> 7 tibble             3
#> 8 classInt           1
#> 9 tidyr              1

Created on 2019-01-22 by the reprex package (v0.2.1)

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

You mean dplyr. tibble or tidyr?
Sure, I can try that :-)
If we find an c++ implementation of the fisher algorithm, we could also get rid of classint.

from landscapetools.

marcosci avatar marcosci commented on May 30, 2024

all done, if there is anything you would like to see before the merger let me know!

from landscapetools.

Related Issues (20)

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.