Kyle Walker Profile picture
Mar 31, 2022 7 tweets 4 min read Read on X
There are a lot of changes & new features coming to #rstats #tidycensus in April; you can try out the new features now with `remotes::install_github("walkerke/tidycensus")`. Read on in this thread to get up to speed on the updates: github.com/walkerke/tidyc… ImageImageImage
`get_acs()` and `get_pums()` now both default to the brand-new 5-year American Community Survey estimates. If you need other years, be sure to use the `year` argument to get data for that year ImageImage
However, the 1-year ACS experimental estimates _are not_ available in tidycensus, and requesting them will throw an error. If you need 1-year ACS data, be sure to explicitly request data for a different year using the `year` argument ImageImage
Analysts using the 5-year ACS detailed tables are commonly confused when variables come back as NA for a given geography. A new geography column in `load_variables()` output tells you the smallest geography at which a given variable is available! Image
`get_acs()` also now supports the ACS Comparison Profile, which is great for time-series analysis and making appropriate (e.g. inflation-adjusted) comparisons. Look up variable codes for 2016-2020 with `load_variables(2020, "acs5/cprofile")` Image
I've tweeted this before, but it's worth repeating: the new `as_dot_density()` function makes data prep for dot-density maps a breeze. Try modifying the example in the docs (?tidycensus::as_dot_density) for a location of your choice, and try out the dasymetric option too! Image
I'm in the process of integrating all of these updates into my book "Analyzing US Census Data" (walker-data.com/census-r/) so keep an eye out there for full documentation. These updates should be on CRAN sometime in April.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Kyle Walker

Kyle Walker Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @kyle_e_walker

Feb 5
Updates on US Census Data as of February 5:

According to the Census Bureau, all files on the public FTP server have been made publicly unavailable to comply with the President's executive orders.

They say they'll work to restore the files after they are reviewed and approved.
These inaccessible files include Census / ACS flat files, TIGER/Line shapefiles, and much of the data documentation / guidebooks on the website.

However: you CAN still access data via API as well as on .data.census.gov
For demographic data, the tidycensus & censusapi #rstats packages, and the censusdis #Python package, offer convenient interfaces to the Census API.

For spatial data, use the TIGERWeb API (). In R, the arcgislayers package helps pull in these services.tigerweb.geo.census.gov/tigerwebmain/T…
Read 6 tweets
Nov 12, 2024
I use #rstats to do #GIS every day because it is such a powerful connector of different tools and resources.

Read this 🧵 for a step-by-step workflow of how to do GIS operations with this made-up table of customer locations in R: Image
Our first step is to convert this table of X/Y coordinates into a "simple features" object with the sf R package.

We do this with the function `st_as_sf()`, making POINT geometries from the coordinates: Image
Next, we'll want to make a map of our data! The `mapview()` function in the mapview package gets you an interactive map right away: Image
Read 7 tweets
Apr 19, 2024
Isochrones show you the reachable area from a location for a given travel mode.

In #rstats, creating isochrones with @Mapbox
web services is easier than you think.

A 🧵 on getting started with isochrones using Mapbox and R: Image
In the mapboxapi R package, the function `mb_isochrone()` helps you calculate isochrones with some extra features to make your life easier.

For example, `mb_isochrone()` is integrated with Mapbox's geocoder so you can create isochrones directly from addresses Image
Alternatively, if you have an sf POINT object you can calculate isochrones in bulk over each location. Use the `id_column` argument to associate your isochrones with your input points Image
Read 7 tweets
Feb 8, 2024
Today, I gave the first of three webinars in this year's @UMSSDAN Census Data in #rstats series:

I used @quarto_pub slides to build the deck, which has lots of amazing features!

A 🧵 on some of my favorites: walker-data.com/umich-workshop…
Image
The latest release of Quarto integrates "lightbox" functionality for images with the option `lightbox: true`. Click to highlight your image for the audience:
The option `code-line-numbers` allows you to incrementally step through lines of code, which is excellent for programming walkthroughs.

The syntax `#| code-line-numbers: "|4|5"` allows me to step through tidycensus options incrementally as I present them!
Read 5 tweets
Jan 19, 2024
I use #rstats to do #GIS every day because it is such a powerful connector of different tools and resources.

Read this 🧵 for a step-by-step workflow of how to do GIS operations with this made-up table of customer locations in R: Image
Our first step is to convert this table of X/Y coordinates into a "simple features" object with the sf R package.

We do this with the function `st_as_sf()`, making POINT geometries from the coordinates: Image
Next, we'll want to make a map of our data! The `mapview()` function in the mapview package gets you an interactive map right away: Image
Read 7 tweets
Oct 25, 2023
You already know that #tidycensus gets you pre-cleaned US Census data ready to analyze and map in #rstats.

But did you know it includes other features to make your data science projects easier?

Let's take a tour of a few features in this 🧵:
Dot-density maps are a staple in ArcGIS, but have traditionally been slow to produce in R

Use the function `as_dot_density()` to speed up this process, and for the US use the argument `erase_water` to avoid placing dots in water areas! Image
A common task with US Census data is to compare data over time, but the Census Bureau re-draws small areas every 10 years

The `interpolate_pw()` function helps you with fast population-weighted areal interpolation, which is typically more accurate than using area weighting Image
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(