tidycensus

repository·master·Indexed 20 days ago

https://github.com/walkerke/tidycensus

An R package designed to interface with US Census Bureau APIs, including the decennial Census and five-year American Community Survey (ACS). It returns data in tidyverse-compatible data frames and provides optional support for spatial geometry via sf.

Tokens
1.1K
Snippets
9
Records
12
Agent score
70%

What's inside tidycensus

  1. Overview of tidycensus

    master
    The tidycensus R package provides an interface to the US Census Bureau's decennial Census and five-year American Community Survey (ACS) APIs. It returns data in tidyverse-ready data frames and offers the option to include simple feature geometry for mapping.
  2. Extract provider information for providers.json

    master

    To update or populate a providers.json file with current provider information, you can access the providers object from the L.TileLayer.Provider.providers namespace and stringify it. This is useful for inspecting the available tile provider configurations.

    var providers = L.TileLayer.Provider.providers;
    JSON.stringify(providers, null, "  ");
  3. Install the tidycensus R package

    master

    Install tidycensus from CRAN using the standard R installation command. This package allows you to interface with US Census Bureau APIs and retrieve data in tidyverse-ready data frames, with optional support for spatial geometry via sf.

    install.packages("tidycensus")
  4. Use Leaflet-providers to add tile layers

    master

    Leaflet-providers is an extension for Leaflet that provides configurations for various tile providers. You can add a tile layer to your map by passing a provider[.<variant>] string to the L.tileLayer.provider constructor. This returns a standard L.TileLayer instance.

    // add Stamen Watercolor to map.
    L.tileLayer.provider('Stamen.Watercolor').addTo(map);
  5. Install tidycensus

    master

    You can install tidycensus from CRAN for the stable version, or from GitHub to access the latest updates.

    To install the stable version from CRAN:

    install.packages("tidycensus")

    To install the latest development version from GitHub:

    remotes::install_github("walkerke/tidycensus")