How to use Data Commons

Learn about the data in Data Commons

To find out what data is available in Data Commons, check out the Statistical Variable Explorer and see the Data sources pages.

Issue interactive data queries

For quick analysis, use the search query bar on the home page or use any of the visualization tools, such as the Timeline, Scatter, and Map explorers.

If you want to issue SQL queries, and you have a Google Cloud Platform account, use BigQuery Studio on Data Commons data in Analytics Hub. See the Data Commons in BigQuery page for more details.

Issue programmatic data queries

Data Commons publishes REST, Python, Pandas, Google Sheets, and SPARQL APIs. The APIs support both low-level exploration of the knowledge graph as well as higher-level statistical analysis of variables.

The Python and pandas APIs provide convenient wrappers for calling the APIs; we have developed a set of Google Colab tutorials to help you get started with analysis. We have also developed a Data science curriculum featuring our API and data, currently in use at MIT.

Embed data analyses and visualizations in your site

If you would like to include Data Commons result visualizations in your own website, we provide a Web components API that makes it a snap to embed various chart elements, such as scatter plots, maps, pie charts, and many more.

Download data for offline analysis

Data Commons provides several tools for downloading its data:

  • To preview and download for selected places and statistical variables, use the standalone Data Download Tool or click the Download link in any of the results pages of the visualization tools.
  • To load data into Google Sheets for analysis and charting, install and run the Data Commons Google Sheets add-on.

Build machine learning models

Data Commons provides ideal training data for developing machine learning models and other data science applications. The data science tutorials show you how to use our APIs and data to get started.

Contribute data to Data Commons

We are always looking to expand the data available from the base Data Commons site. If you are interested in contributing data, please see the Data import documentation.

Develop and host your own Data Commons site

If you would like to leverage Data Commons’ analytical and visualization tools, and natural-language query interface for your own data and website, we provide a reference website implementation you can customize to meet your needs. See the Custom Data Commons documentation for details.

Contribute to the open-source initiative

We also welcome code, documentation, and educational contributions to the Data Commons open-source project. See Contributing to Data Commons for the myriad ways you can help improve Data Commons!