Git Product home page Git Product logo

geodato's Introduction

geodato

An R package to hold and facilitate geographies for spatial analysis.

Installation

You can install the development version of geodato from GitHub with:

install.packages("devtools")
devtools::install_github("datasketch/geodato")

Available maps

The available maps inside the package can be checked by running available_maps_df():

library(geodato)
#> Loading required package: geojsonio
#> Warning: package 'geojsonio' was built under R version 4.2.3
#> Registered S3 method overwritten by 'geojsonsf':
#>   method        from   
#>   print.geojson geojson
#> 
#> Attaching package: 'geojsonio'
#> The following object is masked from 'package:base':
#> 
#>     pretty
#> Loading required package: sf
#> Warning: package 'sf' was built under R version 4.2.3
#> Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
#> Loading required package: yaml
#> Warning: package 'yaml' was built under R version 4.2.3

available_maps_df
#> # A tibble: 209 × 4
#>    map_name             type  main_map region
#>    <chr>                <chr> <chr>    <chr> 
#>  1 col_bog_localidades  main  <NA>     <NA>  
#>  2 col_bog_localidades2 main  <NA>     <NA>  
#>  3 col_departments      main  <NA>     <NA>  
#>  4 col_municipalities   main  <NA>     <NA>  
#>  5 gtm_departments      main  <NA>     <NA>  
#>  6 gtm_municipalities   main  <NA>     <NA>  
#>  7 mex_cdmx_ageb        main  <NA>     <NA>  
#>  8 mex_cdmx_colonies    main  <NA>     <NA>  
#>  9 mex_cdmx_localities  main  <NA>     <NA>  
#> 10 mex_cdmx_mayors      main  <NA>     <NA>  
#> # ℹ 199 more rows

Getting a map from geodato

library(geodato)
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.2.2

tj <- geodato::gd_tj("col_municipalities")

ggplot(tj) +
  geom_sf(fill = "#CCCCCC", color= "#444444") +
  theme_void()

How to contribute

A new map can be added by following the steps described on the article new-geography-layer, available by running vignette("new-geography-layer.Rmd")

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.