Skip to content
/ idgeo Public

R package with geospatial tools

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

wf-id/idgeo

Repository files navigation

idgeo

The goal of R package idgeo is to combine all mapping functions and ID Research specific mapping tools into a single place

Installation

You can install the development version of idgeo like so:

devtools::install_github('wf-id/idgeo')

Example

This is a basic example which shows you how to solve a common problem:

library(idgeo)
library(dplyr)

# create choropleth leaflet maps quickly without having to define palettes and legends


# some shapefiles are built in
data("sf_nc_counties")

# a map with a zoomed out mini map
prettyLeaflet(sf_nc_counties, mini = T) |> 
  # of NC land area (numeric will use viridis color palette)
  addPrettyPolygons(zcol = 'ALAND') |>
  # with a nice title
  addTitleControl('North Carolina', 'Land Area (sq meters)')

# mapping a categorical variable (uses Okabe-Ito, colorblind safe palette)
prettyLeaflet(sf_nc_counties |> 
                dplyr::mutate(`Over 1b?` = dplyr::if_else(ALAND > 1000000000, 'Yes', 'No'))) |> 
  addPrettyPolygons(zcol = 'Over 1b?',
                    legendtitle = 'Land Area > 1b sq m') |>
  addTitleControl('North Carolina', 'Land Area (sq meters)')

About

R package with geospatial tools

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages