Demographic Data
Overview
In order to test an economic model, the model must be compared
against actual data. Typically economic data is collected
and compiled by government agencies and are generally free to
the public.
The
US Census Data App
provides a graphical way to query and download data published by the US Census Bureau.
US Census
The United States government makes available data collected by the
us census bureau.
The
US Census Data - API Users Guide
provides information about finding and using data provided by the US Census Bureau. Data is provided as a service which can
be retrieved through a URL.
For example, the following
URL is a link to US census data.
In order to get the data you need, following the instructions from the API Users Guide to create the correct URL to the data
you wish to retrieve. Then, you can follow steps given in the
data corner for importing data into a workspace or blog. In particular, you can add data as bookmark
in the
data app, or you can add data (such as the example data above)
in a script such as the following:
let data = await $url("https://api.census.gov/data/2014/pep/natstprc?get=STNAME,POP&DATE_=7&for=state:*");
Try it!
Alternatively, once you follow your chosen link, you can download the data as a file to your local hard drive and then load the
data. The example data link above is encoded as a json file, but if you open the file and look at the data, it matches
the
hson format. That is, when loading the data, you will want to select the hson format in order to encode it correctly.
Demos and Tutorials