Does anyone have any documentation on helping with a first time working with the census geojson file in R?

Does anyone have any documentation on helping with a first time working with the census geojson file in R?


This topic was automatically generated from Slack. You can find the original thread here.

I downloaded from the safegraph site and unzipped. Now I want to view at what is in the file so I can start to work with it in R to start on this project.

Hey @james_ashworth - Check out the R section of our Awesome SafeGraph Datascience Github Repo - there’s a SafeGraphR package created by @Nick_H-K_Seattle_University that may be useful for you.

Unfortunately the SafeGraphR package doesn’t have anything for the geojson files. But I do believe there is a geojson package on CRAN.

Okay, thinking I will vertically expand these in R then flip over to Python.

the sf package in R is the easiest way to read a geojson file as a spatial dataframe.

install.packages("sf")
library(sf)

df <- sf::st_read("file_name.geojson")

Thanks Eugene. We are just getting into this package in class, and I had yet to see this particular function. I will work with it today.