Getting Started

Installation

Install getcensus from SSC with:

ssc install getcensus

getcensus requires Stata version 13.1 or later.

The GitHub version of the package may occasionally be more up-to-date than the SSC version. You can install getcensus from GitHub by running:

net install getcensus, from("https://raw.githubusercontent.com/CenterOnBudget/getcensus/master/src") replace

API Key

An API key is required to access the Census Bureau Data API. Register for a key at https://api.census.gov/data/key_signup.html. Remember to activate your API key before attempting to use it.

Provide getcensus with your API key by specifying the key() option. Or, to avoid specifying key() each time getcensus is used, store your API key in a global macro named censuskey in your profile.do. Learn about where to find your profile.do in the profile.do FAQ on the Stata website. If you are unfamiliar with global macros, simply type global censuskey "your-api-key-here" into your profile.do.

Updating

To update your installation of getcensus to the latest version, run:

ado update getcensus, update

A list of changes in each release can be found in News.

Getting Help

If you think you’ve found a bug in getcensus, or have an idea for a new feature, please file a GitHub issue at https://github.com/CenterOnBudget/getcensus/issues/. You’ll need a free GitHub account, which you can obtain at https://github.com/join.

Back to top