osmplotr | Data visualisation using OpenStreetMap objects | Map library

 by   ropensci R Version: v0.3.3 License: No License

kandi X-RAY | osmplotr Summary

kandi X-RAY | osmplotr Summary

osmplotr is a R library typically used in Geo, Map applications. osmplotr has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Data visualisation using OpenStreetMap objects
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              osmplotr has a low active ecosystem.
              It has 129 star(s) with 22 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 15 open issues and 28 have been closed. On average issues are closed in 51 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of osmplotr is v0.3.3

            kandi-Quality Quality

              osmplotr has 0 bugs and 0 code smells.

            kandi-Security Security

              osmplotr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              osmplotr code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              osmplotr does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              osmplotr releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 310 lines of code, 0 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of osmplotr
            Get all kandi verified functions for this library.

            osmplotr Key Features

            No Key Features are available at this moment for osmplotr.

            osmplotr Examples and Code Snippets

            No Code Snippets are available at this moment for osmplotr.

            Community Discussions

            QUESTION

            In Leaflet for R, can column variables be used to vary size of labelOption size, colour, etc.?
            Asked 2019-Aug-02 at 20:49

            I am trying to create a high-quality map of a small part of the UK, without any distortions caused by the use of projections, and with the addition of markers consisting of text and symbols. Ultimately the goal is to write out a png or pdf file. An earlier, related question can be found here.

            Having not used R in anger for several years, I have been wading through a morass of packages trying to find something suitable. Leaflet for R is promising, but although I can create a decent-looking map, add markers, and vary the colour of markers and so on using columns from a data frame, I have not been able to vary the size, colour, and text offsets used in the labelOptions argument.

            The following reproducible example shows what I can achieve, and also where I am not succeeding. I would like the size of text label to vary according to the df.data$textsizes column. Given that the style argument takes a list of value pairs, that would seem difficult, and nothing has worked so far.

            If am hoping that somebody can either suggest either a way to bend the wily labelOptions to my will, or a completely different approach to try.

            ...

            ANSWER

            Answered 2019-Aug-02 at 20:49
              df.entrynames <- c("Entry 1: Some text","Entry 2: More text")
              df.lat <- c(51.509898,51.510736)
              df.lon <- c(-0.1345093,-0.135190)
              df.colors <-c("Blue","Red")
              df.sizes <-c(36,2)
              df.data <- data.frame(entrynames=df.entrynames,lat=df.lat,lon=df.lon,colors=df.colors,textsizes=df.sizes)
              df.data$entrynames <- as.character(df.data$entrynames)
              df.data$colors <- as.character(df.data$colors)
              df.data$textsizes <- paste(df.data$textsizes,"px",sep="")
              #Add a vector to split the data by     
              df.data$place<-seq(1:nrow(df.data))
            
            
              library(purrr)    
            
            #split the data
              ob_place <- df.data %>% 
                split(., .$place)
            #make a map
              m <- leaflet() %>% 
                addTiles() 
            
            #Add layers
              names(ob_place) %>%
                purrr::walk(function(df.data) {
                  m<<-m %>% #seems like there's supposed to be two carrots here, i had problems without one
                    addCircleMarkers(data=ob_place[[df.data]],fillColor=~colors,
                                     fillOpacity = 0.6,
                                     weight=1,
                                     radius=13,
                                     color="white",
                                     opacity = .6,
                                     lng=~lon, lat=~lat,
                                     group = "Show All",
                                     label = ~entrynames,
                                     labelOptions = labelOptions(noHide = T,
                                                                 #direction = ~MyDirection, #https://rstudio.github.io/leaflet/popups.html
                                                                 textsize = ~textsizes,
                                                                 #opacity=~opacity,
                                                                 style = list(
                                                                   "color"="black",
                                                                   "font-family" ="sans-serif",
                                                                   "box-shadow" = "3px 3px rgba(0,0,0,0.25)",
                                                                   #"font-size" = "12px",
                                                                   "border-color" = "rgba(0,0,0,0.5)"
                                                                 )))
            
                })
            m
            

            Source https://stackoverflow.com/questions/57332455

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install osmplotr

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ropensci/osmplotr.git

          • CLI

            gh repo clone ropensci/osmplotr

          • sshUrl

            git@github.com:ropensci/osmplotr.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link