Skill Level: Intermediate to Advanced
The Census Bureau Application Programming Interface (API) is a data service that enables software developers and researchers to streamline data integration within their applications and data visualizations through access to our free API data. This course provides detailed instructions on:
*Please Note: To follow along with step-by-step examples for module 3, you will need to download Rstudio and the tidycensus code package.
Those who need to construct API data calls from the U.S. Census Bureau’s datasets.
Those who would like to use R or Excel to visualize statistics.
Tyson Weister, Center for Enterprise Dissemination
Amanda Klimek, American Community Survey Office
Deborah Rivera, Center for Enterprise Dissemination
Mary Leisenring, Census Academy
Module 1: Introduction to API’s and Census Bureau Data (37 minutes)
Module 2: Accessing the API and Building Your Query (51 minutes)
Module 3: Creating Your Datasets Using Excel and R (42 minutes)
Module 4: Using Your Data and Next Steps (25 minutes)
In this module, become acquainted with the concept and uses of an API through common examples from other websites, and tools that are powered with the Census Bureau API. We then review some of the most popular surveys and programs so you can learn what kinds of data are available in the API and at what levels of geography.
We show you how to navigate the discovery tool to determine what is available in the Census Bureau’s API and relate it to your needs. Finally, we will briefly go over how to use data.census.gov. Data.census.gov is useful to find statistics in general, but it can also be used to support finding the table and variable names and ids for your API calls.
In this module, we discuss when an API key is necessary and how to obtain a key through census.gov/developers.
We then go over basic API terminology, such as functions, components, and variables. Lastly, you’ll learn the main components of an API query: base query, dataset and year, variable call, and geography. By the end of this module, you will be able to construct an API query using the four components of the query. We walk you through how to use baseline example API calls in the Census Bureau’s API Discovery Tool.
Now that you have constructed and API call, it is time to learn how to download the data from a raw JSON format into Excel. Then we will install the “tidycensus” package into R, and walk you through how to load our datasets from the API into R.
For this module, you will need to download R Studio and the tidycensus document, API_Course.R. (below)
In Module Four, we show you how to work with the data we pulled from the API in both Excel and R to create quick and basic visualizations. Viewing the data you downloaded, you will work with the data in order to make basic visualizations like line and bar graphs.
Finally, we review how to get in contact with Census Bureau staff for API support.
Share your accomplishment on your social media by downloading this certificate or badge!
I just finished Introduction to the Census Bureau Data API with Census Academy. Be sure to check out their free resources!
#CensusAcademy #FreeCourses #DataScience #API #DataAnalysis #FreeData
Subscribe to Census Academy to receive the upcoming Data Gems from this series.