diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/2020/07/26/updates.html b/2020/07/26/updates.html new file mode 100644 index 000000000..ed625a1ad --- /dev/null +++ b/2020/07/26/updates.html @@ -0,0 +1,547 @@ + + + + + Data Commons Updates - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Data Commons Updates

+ +

Over the last month and a half, we have worked hard to add some exciting new features:

+ +

New Map Explorer

+

The new Map Explorer offers an easy way to visualize how a statistical variable can vary across geographic regions. Try it out for Attainment of Bachelor Degree or Higher across Washington Counties or Median Income across US States.

+ +

New Statistical Variable Menu

+

The Statistical Variable Menu used for the Scatter Plot Explorer, Timelines Explorer, and Map Explorer was revamped to serve a much more comprehensive list of over 287000 statistical variables in an easy to consume way. This new menu comes with useful features such as search support and information on the places that each statistical variable has data for.

+ +

New Data

+

We’ve continued to add new data to the Data Commons graph. Some of these new additions include:

+ + +

We would love to hear any feedback you may have!

+ +

Jennifer on behalf of the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2020/10/15/search_launch.html b/2020/10/15/search_launch.html new file mode 100644 index 000000000..9eed4de22 --- /dev/null +++ b/2020/10/15/search_launch.html @@ -0,0 +1,537 @@ + + + + + Data Commons, now accessible on Google Search - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Data Commons, now accessible on Google Search

+ +

Today, we are excited to share that Data Commons is accessible via natural language queries in Google search. At a time when data informs our understanding of so many issues–from public health and education to the evolving workforce and more–access to data has never been more important. Data Commons in Google search is a step in this direction, enabling users to explore data without the need for expertise or programming skills.

+ +

Three years ago, the Data Commons journey started at Google with a simple observation: our ability to use data to understand our world is frequently hampered by the difficulties in working with data. The difficulties of finding, cleaning and joining datasets effectively limit who gets to work with data.

+ +

Data Commons addresses this challenge head on, performing the tedious tasks of curating, joining and cleaning data sets at scale so that data users don’t have to. The result? Large scale and cloud accessible APIs to clean and normalize data originating from some of the most widely used datasets, including those from the US Census, World Bank, CDC and more. Available as a layer on top of the Knowledge Graph, Data Commons is now accessible to a much wider audience.

+ +

Data Commons is Open. Open Data, Open Source. We hope that like its elder sister Schema.org, it becomes one of the foundational layers of the Web. We know this can only happen if it is built in an open and collaborative fashion. We are actively looking for partnerships on every aspect of this project, and we look forward to hearing from you!

+ +

R.V.Guha & the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2021/06/01/updates.html b/2021/06/01/updates.html new file mode 100644 index 000000000..494f50b25 --- /dev/null +++ b/2021/06/01/updates.html @@ -0,0 +1,572 @@ + + + + + Data Commons Updates - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Data Commons Updates

+ +

We’ve been hard at work since we surfaced Data Commons in Google Search last October. Some of the exciting features we’ve added include:

+ +

Internationalization Support

+ +

Place Explorer is now available in 8 languages in addition to English: German, Spanish, French, Hindi, Italian, Japanese, Korean and Russian. Additionally, support for these languages are carried forward from Google Search, here’s an example.

+ +

New Graph Browser

+ +

The Graph Browser was rewritten from the ground up to be faster and more responsive. It includes search support for the growing number of Statistical Variables available for each node, as well as redesigned to improve information density. Try it out for some nodes such as India, Unemployment Rate in Boston and Renal Cell Carcinoma.

+ +

New Scatter Plot Explorer

+ +

The new Scatter Plot Explorer enables quick visual exploration of any two statistical variables for a set of places. Try it out for Bachelor Degree Attainment vs Females per capita in California Counties or Covid-19 cases vs African Americans per capita among US States.

+ +

API Documentation Refresh

+ +

We participated in the 2020 Season of Docs, working with Anne Ulrich (@KilimAnnejaro) to completely refresh and improve our API documentation. Every API page was rewritten, in addition to new Google Sheets API tutorials. We had a wonderful time collaborating with Anne on this project and hope the improved documentation enables more developers to harness the power of our APIs.

+ +

New Stats API

+ +

We have also released a new set of APIs centered around statistics retrieval. There are different REST endpoints to retrieve a single statistical value, a statistical time series or the entire collection of statistical data for a set of places. We have used these APIs to build the new Scatter Plot Explorer and hope this enables other applications too.

+ +

New Data

+ +

As always, we continue to add more data to the Data Commons Graph. Some recent additions include:

+ + +

As always, we are eager to hear from you! Please share your feedback with our team.

+ +

Carolyn on behalf of the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2021/10/10/updates.html b/2021/10/10/updates.html new file mode 100644 index 000000000..90fd33d72 --- /dev/null +++ b/2021/10/10/updates.html @@ -0,0 +1,560 @@ + + + + + Data Commons Updates - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Data Commons Updates

+ +

Over the past few months, we’ve continued to incorporate new data into our knowledge graph and develop new tools. Here are some of the highlights:

+ +

New Statistical Variable Explorer

+

As Data Commons has grown, the number of Statistical Variables has increased. With over 300k variables to choose from (and counting!), we wanted to make it easier for you to find the right variables for your analysis. To address this, we added a new tool for exploring Statistical Variables. The tool provides metadata about the observations, places, and provenances we have for each variable.

+ +

New Data

+

Lately, we’ve been focused on building up our inventory of sustainability-related data. Some of recent our imports include:

+ + +

We’re also in the process of importing a large number of US Census American Community Survey Subject Tables, which contain detailed demographic data about a variety of topics. For example:

+ + +

New Import Tool

+

We’ve made it easier for contributors to add datasets to Data Commons with our new open source command-line tool. This tool provides linting and detailed stats validation, streamlining our data ingestion process and making it more accessible.

+ +

Check out our Github repo here.

+ +

As always, please feel free to share any feedback.

+ +

Thanks!

+ +

Natalie on behalf of the Data Commons team

+ +
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2022/04/22/earth-day.html b/2022/04/22/earth-day.html new file mode 100644 index 000000000..6d713855a --- /dev/null +++ b/2022/04/22/earth-day.html @@ -0,0 +1,533 @@ + + + + + Sustainability Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Sustainability Data Commons

+ +

Data Commons now includes 100+ sources of Sustainability data, covering topics from climate predictions (CMIP 5 and CMIP 6) from NASA, emissions from EPA, energy from EIA, NREL and UN, disasters from USGS and USFS, health from CDC and more. You can learn more about the launch of Sustainability Data Commons on the Google Keyword Blog.

+ +

As always, we are eager to hear your feedback.

+ +

Jennifer on behalf of the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2022/09/14/download-tool.html b/2022/09/14/download-tool.html new file mode 100644 index 000000000..2171264de --- /dev/null +++ b/2022/09/14/download-tool.html @@ -0,0 +1,539 @@ + + + + + New Data Download Tool - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

New Data Download Tool

+ +

In the last year, we have added several interesting datasets and exciting new features to Data Commons. One such feature is the new Data Download tool that allows you to easily download statistical variable data for a large number of places with just a few button clicks.

+ +

The new data download tool

+ +

The Data Commons knowledge graph is huge – there are over 240B data points for over 120K statistical variables. Sometimes, you may want to export just some of this data and use it in a custom tool. We now make that easy to do with the new data download tool. The new tool gives you the data in a csv file, does not require any coding experience to use, and allows you to select the statistical variables, places, and dates that you are interested in.

+ +

Maybe you want to explore the population of all the countries in the world (get the data here). Or you want to analyze poverty levels during COVID-19 (get the data here). Or you’re interested in projected temperature differences (relative to 2006) and activities that can be affected by temperature rise (get the data here). The Data Download tool gives you the power to use the data in our knowledge graph to explore all of this and much more in your tool of choice.

+ +

As always, we would love to hear from you! Please share your feedback with our team.

+ +

Jennifer on behalf of the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2022/12/28/courseware.html b/2022/12/28/courseware.html new file mode 100644 index 000000000..6ceef39bd --- /dev/null +++ b/2022/12/28/courseware.html @@ -0,0 +1,566 @@ + + + + + New Courseware - Data Literacy with Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

New Courseware - Data Literacy with Data Commons

+ +

tl;dr

+ +

Today, we are announcing the open and public availability of “Data Literacy with Data Commons” which comprises curriculum/course materials for instructors, students and other practitioners working on or helping others become data literate. This includes detailed modules with pedagogical narratives, explanations of key concepts, examples, and suggestions for exercises/projects focused on advancing the consumption, understanding and interpretation of data in the contemporary world. In our quest to expand the reach and utility of this material, we assume no background in computer science or programming, thereby removing a key obstacle to many such endeavors.

+ +

This material can be accessed on our courseware page and it is open for anyone to take advantage of. If you use any of this material, we would love to hear from you! If you end up finding any of this material useful and would like to be notified of updates, do drop us a line.

+ +

What is it?

+ +

A set of modules focusing on several key concepts focusing on data modeling, analysis, visualization and the (ab)use of data to tell (false) narratives. Each module lists its objectives and builds on a pedagogical narrative around the explanation of key concepts, e.g. the differences between correlations and causation. We extensively use the Data Commons platform to point to real world examples without needing to write a single line of code!

+ +

Who is this for?

+ +

Anyone and everyone. Instructors, students, aspiring data scientists and anyone interested in advancing their data comprehension and analysis skills without needing to code. For instructors, the curriculum page details the curriculum organization and how to find key concepts/ideas to use.

+ +

What’s Different?

+ +

There are several excellent courses which range from basic data analysis to advanced data science. We make no claim about “Data Literacy with Data Commons” being a replacement for them. Instead, we hope for this curriculum to become a useful starting point for those who want to whet their appetite in becoming data literate. This material uses a hands on approach, replete with real world examples but without requiring any programming. It also assumes only a high-school level of comfort with math and statistics. Data Commons is a natural companion platform to enable easy access to data and core visualizations. We hope that anyone exploring the suggested examples will rapidly be able to explore more and even generate new examples and case studies on their own! If you end up finding and exploring new examples and case studies, please share them with us through this form.

+ +

What is Data Literacy?

+ +

What does it mean to be “data literate”? Unsurprisingly, the answer depends on who one asks: from those who believe it implies being a casual consumer of data visualizations (in the media, for example) to those who believe that such a person ought to be able to run linear regressions on large volumes of data in a spreadsheet. Given that most (or all) of us are proliferate consumers of data, we take an opinionated approach to defining “data literacy”: someone who is data literate ought to be comfortable with consuming data across a wide range of modalities and be able to interpret it to make informed decisions. And we believe that data literacy ought not to be exclusionary and should be accessible to anyone and everyone.

+ +

There is no shortage of data all around us. While some of it will always be beyond the comprehension of most of us, e.g. advanced clinical trials data about new drugs under development or data reporting the inner workings of complex systems like satellites, much of the data we consume is not as complex and should not need advanced degrees to consume and decipher. For example, the promise of hundreds of dollars in savings when switching insurance providers or that nine out of ten dentists recommend a particular brand of toothpaste or that different segments of the society (men, women, youth, veterans etc) tend to vote a certain way on specific issues. We consume this data regularly and being able to interpret it to draw sound conclusions ought not to require advanced statistics.

+ +

Unfortunately, data literacy has been an elusive goal for many because it has been gated on relative comfort with programming or programming-like skills, e.g. spreadsheets. We believe data literacy should be more inclusive and require fewer prerequisites. There is no hiding from a basic familiarity with statistics, e.g. knowing how to take a sample average—after all, interpreting data is a sStatistical exercise. However, for a large majority of us the consumption, interpretation and decision-making based on data does not need a working knowledge of computer science (programming).

+ +

As a summary, our view on “Data Literacy” can be described as follows:

+ +
    +
  • Ability to consume, understand, create, and communicate with data.
  • +
  • Ability to make decisions based on data.
  • +
  • And to do so confidently, i.e. reduce “data anxiety”.
  • +
  • A skill for everyone, not just “data scientists”.
  • +
+ +

With these goals in mind, we hope that this introductory curriculum can help the target audiences towards achieving data literacy and inspire many to dive deeper and farther to become data analysts and scientists.

+ +

Crystal, Jehangir, and Julia, on behalf of the Data Commons team

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/2023/09/13/explore.html b/2023/09/13/explore.html new file mode 100644 index 000000000..eb6161ffd --- /dev/null +++ b/2023/09/13/explore.html @@ -0,0 +1,531 @@ + + + + + Data Commons' New Natural Language Interface - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Blog

+ + +

Data Commons' New Natural Language Interface

+ +

Data Commons is now harnessing the power of AI, specifically large language models (LLMs), to create a natural language interface. LLMs are used to understand the query and the results come straight from Data Commons, including a link to the original data source.

+ +

Learn more in our Keyword blog post.

+
+
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..bfaa8980f --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.datacommons.org \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..3a025f83c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor license agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google/conduct/). \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/LICENSE-CC4 b/LICENSE-CC4 new file mode 100644 index 000000000..c8c890405 --- /dev/null +++ b/LICENSE-CC4 @@ -0,0 +1,7 @@ +Copyright 2023 Google LLC + +The non-source code materials in this project are licensed under: +Creative Commons - Attribution CC-BY 4.0 + +For the full license text, please visit: +https://creativecommons.org/licenses/by/4.0/legalcode diff --git a/README.md b/README.md new file mode 100644 index 000000000..48f305e6c --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +[![Build and deploy to GitHub Pages](https://github.com/datacommonsorg/docsite/actions/workflows/github-pages.yml/badge.svg)](https://github.com/datacommonsorg/docsite/actions/workflows/github-pages.yml) + +# Data Commons documentation site + +This repo hosts Data Commons API documentation +available at https://docs.datacommons.org/. The site is hosted in [Github Pages](https://pages.github.com/), and generated by [Jekyll](https://jekyllrb.com/). + +## About Data Commons + +[Data Commons](https://datacommons.org/) is an open knowledge graph that +provides a unified view across multiple public data sets and statistics. +We've bootstrapped the graph with lots of +[data](https://datacommons.org/datasets) from US Census, CDC, NOAA, etc., +and through collaborations with the New York Botanical Garden, +Opportunity Insights, and more. However, Data Commons is +meant to be for community, by the community. We're excited to work with you +to make public data accessible to everyone. + +To see the extent of data we have today, [browse the Knowledge Graph](https://datacommons.org/browser). + +## Markdown + +The Data Commons documentation uses [Kramdown](https://kramdown.gettalong.org/syntax.html) Markdown. + +## Navigation + +The navigation bar is generated automatically from the YAML "front matter" at the top of each Markdown file. See [Using YAML front matter](https://docs.github.com/en/contributing/writing-for-github-docs/using-yaml-frontmatter) for details. + +## Build locally + +The documentation site is built using Jekyll. To run this locally: + +1. One-time setup step: Install [Ruby](https://jekyllrb.com/docs/installation/). +1. Run `bundle update` +1. Run `bundle exec jekyll serve --incremental` + +You can continue to make local changes and just refresh the browser. You will need to rerun `bundle exec jekyll serve` if you make changes that affect the overall site, such as changes to YAML files, cross-page links, etc. + +Tip: If you want to make the staged site accessible to others (and not just on the loopback), add `--host 0.0.0.0` to the command. Then, users can access the site using the hostname of the machine where the site is running. + +## License + +Apache 2.0 + +## Contribute changes + +### One-time setup steps + +1. In https://github.com/datacommonsorg/docsite, click the **Fork** button to fork the repo. +1. Clone your forked repo to your desktop: + +
+    git clone https://github.com/USER_NAME/docsite
+    
+ + This adds your fork as the remote called `origin`. + +1. Add `datacommonsorg/docsite` repo as a remote: + +
+    git remote add REMOTE_NAME https://github.com/datacommonsorg/docsite.git
+    
+ +### Create a pull request + +Every time you want to create a pull request, create a new branch and sync to the master branch: + +
+git checkout master
+git pull REMOTE_NAME master
+git checkout -b BRANCH_NAME
+
+ +Make your changes, and then create the PR as follows: + +
+git add .
+git commit -m "COMMIT_MESSAGE"
+git push -u origin BRANCH_NAME
+
+ +Then, in github.com, in your forked repo, you can send a pull request. You will need to assign at least one reviewer to approve. + +If this is your first +time contributing to a Google Open Source project, you may need to follow the +steps in [CONTRIBUTING.md](CONTRIBUTING.md). Be sure to follow [the style guide](STYLE_GUIDE.md) +when submitting documentation PRs. + +Wait for approval of the pull request and merge the change. + +## Support + +For general questions or issues, please open an issue on our +[issues](https://github.com/datacommonsorg/docsite/issues) page. For all other +questions, please [send us feedback](https://docs.google.com/forms/d/e/1FAIpQLScJTtNlIItT-uSPXI98WT6yNlavF-kf5JS0jMrCvJ9TPLmelg/viewform). + +> **Note** - This is not an officially supported Google product. diff --git a/api/index.html b/api/index.html new file mode 100644 index 000000000..23d6e6af4 --- /dev/null +++ b/api/index.html @@ -0,0 +1,596 @@ + + + + + API - Query data programmatically - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

API overview

+ +

Data Commons aggregates data from many +different data sources into a single +database. Data Commons is based on the data model used by +schema.org; for more information, see Key concepts.

+ +

The Data Commons APIs allow developers to programmatically access the data in Data Commons, using the following technologies:

+ +
    +
  • A REST API that can be used on the command line as well as in any language with an HTTP library.
  • +
  • Python and Pandas wrappers.
  • +
+ +
+

Note: The Python and Pandas APIs wrap the V1 version of the REST APIs and have not yet been updated to V2.

+
+ +

The endpoints can be roughly grouped into four categories:

+ +
    +
  • +

    Statistical data: Given a set of statistical variables, dates and entities, get observations.

    +
  • +
  • +

    Graph exploration: Given a set of nodes, explore the +graph around those nodes.

    +
  • +
  • +

    Graph query/SPARQL: Given a subgraph where some of the nodes are +variables, retrieve possible matches. This corresponds to a subset of the +graph query language SPARQL. This is useful for complex node connections which would require multiple API calls; for example, “hate crimes motivated by disability status in Californian cities”.

    +
  • +
  • +

    Utilities: These are Python notebook-specific APIs for helping with +Pandas DataFrames, etc.

    +
  • +
+ +

In addition, Data Commons provides additional tools for accessing its data that call the REST APIs under the hood:

+ +
    +
  • Google Sheets: provides several custom functions that populate spreadsheets with data from the Data Commons knowledge graph
  • +
  • Web Components: provides JavaScript APIs and HTML templates that allow you to embed Data Commons data and visualizations into web pages
  • +
+ +

API keys

+ +

A key is required by some APIs to authenticate and authorize requests.

+
    +
  • All REST V2 and V1 APIs. These requests are served by endpoints at api.datacommons.org.
  • +
  • All requests coming from a custom Data Commons instance. These are also served by api.datacommons.org.
  • +
  • Data Commons NL API requests (used by the DataGemma tool). These are served by endpoints at nl.datacommons.org.
  • +
+ +

A key is currently not required for the following, although this may change in the future:

+
    +
  • Python and Pandas client libraries other than NL APIs
  • +
  • V0 REST APIs
  • +
  • Google Sheets
  • +
  • Web Components
  • +
+ +

Obtain an API key

+ +

Data Commons API keys are managed by a self-service portal. To obtain an API key, go to https://apikeys.datacommons.org and request a key for the hostname(s) listed above. Enable each of the APIs you want; you can share a single key for all of them.

+ +

To use the key in requests, see the relevant documentation:

+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/pandas/index.html b/api/pandas/index.html new file mode 100644 index 000000000..a28d146e7 --- /dev/null +++ b/api/pandas/index.html @@ -0,0 +1,572 @@ + + + + + Pandas - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons Pandas API

+ +

The Data Commons Pandas API is a superset of the Data Commons Python API: +all functions from the Python API are also accessible from +the Pandas API, and supplemental functions help with directly creating +pandas +objects using data from the Data Commons knowledge graph for common +use cases.

+ +
+

Note: The Pandas API only supports V1 of the REST APIs.

+
+ +

Before proceeding, make sure you have followed the setup instructions below.

+ +

Install the Python Data Commons API

+ +
    +
  1. If not done already, install python3 and pip3. See Setting up a Python development environment for procedures.
  2. +
  3. Install the datacommons_pandas package:
  4. +
+ +
$ pip install datacommons_pandas
+
+

You are ready to go! You can view our tutorials on how to use the +API to perform certain tasks using Google Colab, or refer to pages in the navigation bar for detailed information about all the methods available.

+ +

Run Python interactively

+ +

The pages in this site demonstrate running the Pandas methods interactively from the Bash shell. To use this facility, be sure to import the datacommons_pandas package:

+ +

From your virtual environment, run:

+ +
python3
+>>> import datacommons_pandas
+>>>
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/pandas/multivariate_dataframe.html b/api/pandas/multivariate_dataframe.html new file mode 100644 index 000000000..75978c881 --- /dev/null +++ b/api/pandas/multivariate_dataframe.html @@ -0,0 +1,606 @@ + + + + + Get multivariate DataFrame - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve multivariate DataFrame

+ +

Returns a pandas.DataFrame with places +as index and stat_vars +as columns, where each cell is latest observed statistic for +its Place and StatisticalVariable.

+ +

See the full list of StatisticalVariable classes.

+ +

General information about this method

+ +

Signature:

+ +
datacommons_pandas.build_multivariate_dataframe(places, stat_vars)
+
+ +

Required arguments:

+ + + +

NOTE: In Data Commons, dcid stands for Data Commons ID and indicates the unique identifier assigned to every node in the knowledge graph.

+ +

Assembling the information you will need for a call to the build_multivariate_dataframe method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    places: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the nodes of interest.

    +
  • +
  • +

    stat_vars: This argument specifies the types of places sought in the response. For example, when examining places contained within American States, you would be able to select City or County (among others). For a full list of available types, see subClassOf Place.

    +
  • +
+ +

Example: Compare the historic populations, median ages, and unemployment rates of the US, California, and Santa Clara County.

+ +
>>> datacommons_pandas.build_multivariate_dataframe(["country/USA", "geoId/06", "geoId/06085"],["Count_Person", "Median_Age_Person", "UnemploymentRate_Person"])
+             Median_Age_Person  Count_Person  UnemploymentRate_Person
+place
+country/USA               37.9     328239523                      NaN
+geoId/06                  36.3      39512223                     11.6
+geoId/06085               37.0       1927852                      7.5
+
+ +

Error Returns

+ +

If a nonexistent place is passed as an argument, it will not render in the dataframe. In the following example, “geoId/123123123123123123” is one such nonexistent place.

+ +
>>> datacommons_pandas.build_multivariate_dataframe(["country/USA", "geoId/06", "geoId/123123123123123123"],["Count_Person", "Median_Age_Person", "UnemploymentRate_Person"])
+             Count_Person  Median_Age_Person  UnemploymentRate_Person
+place
+country/USA     328239523               37.9                      NaN
+geoId/06         39512223               36.3                     11.4
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons_pandas.build_multivariate_dataframe(["country/USA", "geoId/06", "geoId/123123123123123123"])
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: build_multivariate_dataframe() missing 1 required positional argument: 'stat_vars'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/pandas/time_series.html b/api/pandas/time_series.html new file mode 100644 index 000000000..38fe9d74c --- /dev/null +++ b/api/pandas/time_series.html @@ -0,0 +1,701 @@ + + + + + Get time series for a place - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve time series for a place

+ +

Returns a pandas.Series representing a time series for the place and +stat_var satisfying any optional parameters.

+ +

See the full list of StatisticalVariable classes.

+ +

General information about this method

+ +

Signature:

+
datacommons_pandas.build_time_series(place, stat_var, measurement_method=None,observation_period=None, unit=None, scaling_factor=None)
+
+ +

Required arguments:

+ + + +

NOTE: In Data Commons, dcid stands for Data Commons ID and indicates the unique identifier assigned to every node in the knowledge graph.

+ +

Assembling the information you will need for a call to the build_time_series method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.
  • +
  • stat_var: The statistical variable whose value you are interested in.
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    measurement_method: The technique used for measuring a statistical variable.

    +
  • +
  • +

    observation_period: The time period over which an observation is made.

    +
  • +
  • +

    unit: The unit of measurement.

    +
  • +
  • +

    scaling_factor: Property of statistical variables indicating factor by which a measurement is multiplied to fit a certain format.

    +
  • +
+ +

Note that specifying arguments that do not exist for the target place and variable will result in an empty response. For more information on any of these arguments, check out the glossary.

+ +

Examples

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
>>> datacommons_pandas.build_time_series("geoId/05", "Count_Person_Male")
+2017    1461651
+2018    1468412
+2011    1421287
+2012    1431252
+2013    1439862
+2014    1447235
+2015    1451913
+2016    1456694
+dtype: int64
+
+ +

Example 2: Retrieve the number of people in Bosnia and Herzegovina as counted by the Bosnian census.

+ +
>>> datacommons_pandas.build_time_series("country/BIH", "Count_Person", measurement_method="BosniaCensus")
+2013    3791622
+dtype: int64
+
+ +

Example 3: Retrieve the death count in Miami-Dade County over a period of one year.

+ +
>>> datacommons_pandas.build_time_series("geoId/12086", "Count_Death", observation_period="P1Y")
+2001    19049
+2004    18384
+2008    18012
+2011    17997
+2000    18540
+2003    18399
+2006    18261
+2013    18473
+1999    19170
+2002    18176
+2009    17806
+2014    19013
+2015    19542
+2016    20277
+2005    18400
+2007    17982
+2010    18048
+2012    18621
+2017    20703
+dtype: int64
+
+
+ +

Example 4: Retrieve the distrubtion of naloxone in Miami-Dade County in grams.

+ +
>>> datacommons_pandas.build_time_series("geoId/12086", "RetailDrugDistribution_DrugDistribution_Naloxone", unit="Grams")
+2006-10     55.21
+2007-01     59.63
+2007-04     65.98
+2007-07     80.34
+2007-10    118.79
+2006-01     44.43
+2006-04     48.28
+2006-07     54.98
+dtype: float64
+
+ +

Example 5: Retrieve the percentage of nominal GDP spent by the government of the Gambia on education.

+ +
>>> datacommons_pandas.build_time_series("country/GMB", "Amount_EconomicActivity_ExpenditureActivity_EducationExpenditure_Government_AsFractionOf_Amount_EconomicActivity_GrossDomesticProduction_Nominal", scaling_factor="100.0000000000")
+1986    3.48473
+2008    3.52738
+2012    4.10118
+1991    3.78061
+1996    2.56628
+1999    1.56513
+2002    1.44292
+2003    1.36338
+2014    2.17849
+2006    1.20949
+2013    1.82979
+1989    2.97409
+1990    2.82584
+2001    1.15810
+2004    1.03450
+2007    1.30849
+1985    4.29515
+1992    1.16984
+1995    2.55356
+2015    2.13528
+2000    1.46587
+2005    1.13919
+2009    3.07235
+2010    4.15610
+2011    3.92511
+2016    2.05946
+2018    2.43275
+dtype: float64
+
+ +

Error Returns

+ +

If there is no value associated with the requested property, an empty Series object is returned:

+ +
>>> datacommons_pandas.build_time_series("geoId/000", "Count_Person_Male")
+Series([], dtype: float64)
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons_pandas.build_time_series("geoId/000")
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: build_time_series() missing 1 required positional argument: 'stat_var'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/pandas/time_series_dataframe.html b/api/pandas/time_series_dataframe.html new file mode 100644 index 000000000..1af9b3059 --- /dev/null +++ b/api/pandas/time_series_dataframe.html @@ -0,0 +1,620 @@ + + + + + Get time series DataFrame - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve time series DataFrame

+ +

Returns a pandas.DataFrame with places +as index and dates as columns, where each cell is the observed statistic for +its place and date for the +stat_var.

+ +

See the full list of StatisticalVariable classes.

+ +

General information about this method

+ +

Signature:

+ +
datacommons_pandas.build_time_series_dataframe(places, stat_var)
+
+ +

Required arguments:

+ + + +

NOTE: In Data Commons, dcid stands for Data Commons ID and indicates the unique identifier assigned to every node in the knowledge graph.

+ +

Assembling the information you will need for a call to the build_time_series method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    places: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the places of interest.

    +
  • +
  • +

    stat_var: This argument specifies the statistical variable whose measurement you seek.

    +
  • +
+ +

For more information, check out the glossary.

+ +

Examples

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
>>> datacommons_pandas.build_time_series_dataframe("geoId/05", "Count_Person_Male")
+             2010     2011     2012  ...     2017     2018     2019
+place                                ...                           
+geoId/05  1430837  1447850  1449265  ...  1479682  1476680  1474705
+
+[1 rows x 10 columns]
+
+ +

Example 2: Compare the historic populations of Sudan and South Sudan.

+ +
>>> datacommons_pandas.build_time_series_dataframe(["country/SSD","country/SDN"], "Count_Person")
+                   2019     2019-06
+place                              
+country/SDN         NaN  41592539.0
+country/SSD  12778250.0         NaN
+
+ +

Error Returns

+ +

If a nonexistent place is passed as an argument, it will not render in the dataframe, as follows:

+ +
>>> datacommons_pandas.build_time_series_dataframe(["geoId/123123123123123123","geoId/36"], "Count_Person")
+              2001      2002      2003  ...      2017      2018      2019
+place                                   ...                              
+geoId/36  19082800  19137800  19175900  ...  19589600  19530400  19453600
+
+[1 rows x 19 columns]
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons_pandas.build_time_series_dataframe(["geoId/123123123123123123","geoId/36"])
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: build_time_series_dataframe() missing 1 required positional argument: 'stat_var'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/index.html b/api/python/index.html new file mode 100644 index 000000000..ac30636bf --- /dev/null +++ b/api/python/index.html @@ -0,0 +1,575 @@ + + + + + Python - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons Python API

+ +

The Data Commons Python API is a Python library that enables developers to +programmatically access nodes in the Data Commons knowledge graph. This package +allows users to explore the structure of the graph, integrate statistics from +the graph into data analysis workflows and much more.

+ +
+

Note: The Python API only supports V1 of the REST APIs.

+
+ +

Before proceeding, make sure you have followed the setup instructions below.

+ +

Install the Python Data Commons API

+ +

This procedure uses a Python virtual environment as recommended by Google Cloud Setting up a Python development environment.

+ +
    +
  1. If not done already, install python3 and pip3. See Installing Python for procedures.
  2. +
  3. Go to your project directory and create a virtual environment using venv, as described in Using venv to isolate dependencies.
  4. +
  5. Install the the datacommons package:
  6. +
+ +
$ pip install datacommons
+
+ +

You are ready to go! You can view our tutorials on how to use the +API to perform certain tasks using Google Colab, or refer to pages in the navigation bar for detailed information about all the methods available.

+ +

Run Python interactively

+ +

The pages in this site demonstrate running Python methods interactively from the Bash shell. To use this facility, be sure to import the datacommons package:

+ +

From your virtual environment, run:

+ +
python3
+>>> import datacommons
+>>>
+
+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/place_in.html b/api/python/place_in.html new file mode 100644 index 000000000..900c50d47 --- /dev/null +++ b/api/python/place_in.html @@ -0,0 +1,619 @@ + + + + + Get places within other places - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve places contained within other places

+ +

General information about this endpoint

+ +

Signature:

+ +
datacommons.get_places_in(dcids, place_type)
+
+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by their DCID.
  • +
  • place_type: The type of the contained child Places within the given +DCIDs to filter by.
  • +
+ +

Assembling the information you will need for a call to the get_places_in method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    dcids: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the nodes of interest. More information about DCIDs is available in the glossary.

    +
  • +
  • +

    place_type: This argument specifies the type of place sought in the response. For example, when examining places contained within American States, you would be able to select City or County (among others). For a full list of available types, see the place types page.

    +
  • +
+ +

What to expect in the function return

+ +

The method’s return value will always be a dict in the following form:

+ +
{
+    "<dcid>": ["string", ...]
+    ...
+}
+
+ +

Example requests and responses

+ +

Example 1: Retrieve a list of all counties in Delaware.

+ +

Method call

+ +
datacommons.get_places_in(["geoId/10"], "County")
+
+ +

Response

+ +
{'geoId/10': ['geoId/10001', 'geoId/10003', 'geoId/10005']}
+
+ +

Example 2: Retrieve a list of congressional districts in Alaska and Hawaii.

+ +
datacommons.get_places_in(["geoId/15","geoId/02"], "CongressionalDistrict")
+
+ +

Response

+ +
{'geoId/15': ['geoId/1501', 'geoId/1502'], 'geoId/02': ['geoId/0200']}
+
+ +

Error Returns

+ +

If there is no value associated with the requested property, an empty list is returned:

+ +
>>> datacommons.get_places_in(["geoId/1021"], "CongressionalDistrict")
+{'geoId/1021': []}
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons.get_places_in(["geoId/1021"])
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_places_in() missing 1 required positional argument: 'place_type'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/property_label.html b/api/python/property_label.html new file mode 100644 index 000000000..7e0d949b2 --- /dev/null +++ b/api/python/property_label.html @@ -0,0 +1,619 @@ + + + + + Get property labels of nodes - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve property labels of nodes

+ +

Returns the labels of properties defined for the given node DCIDs.

+ +

General information about this method

+ +

Signature:

+
datacommons.get_property_labels(dcids, out=True)
+
+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by their DCID.
  • +
+ +

Optional arguments:

+ +
    +
  • out: The label’s direction. Defaults to True (only returning response nodes directed towards the requested node). If set to False, will only return response nodes directed away from the request node.
  • +
+ +

Assembling the information you will need for a call to the get_property_values method

+ +

Going into more detail on how to assemble the values for the required argument:

+ +
    +
  • dcids: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the nodes of interest. More information about DCIDs is available in the glossary.
  • +
+ +

In addition to this required property, this endpoint also allows for an additional, optional argument:

+ +
    +
  • out: This is a boolean value that refers to the orientation, or direction, of the edge. You can specify this argument as True to indicate that you desire the response to only include nodes with the value of the property equivalent to one or more of the specified DCIDs, or False to only return nodes equivalent to one or more of the values of the properties of the specified DCIDs. (To visualize this, Figure 1 illustrates the directions for the property containedInPlace of the node for Argentina.)
  • +
+ +

+ +

Figure 1. Relationship diagram for the property containedInPlace of the country Argentina. Note the directionality of the property containedInPlace: the API returns both nodes with direction in (Buenos Aires is containedInPlace of Argentina) and nodes with direction out (Argentina is containedInPlace of South America).

+ +

What to expect in the function return

+ +

The method’s return value will always be a dict in the following form:

+ +
{
+    "<dcid>": ["string", ...]
+    ...
+}
+
+ +

Example requests and responses

+ +

Example 1: Retrieve the outwardly directed property labels of Wisconsin’s eighth congressional district.

+ +
>>> datacommons.get_property_labels(['geoId/5508'])
+{'geoId/5508': ['containedInPlace', 'geoId', 'geoJsonCoordinates', 'geoOverlaps', 'kmlCoordinates', 'landArea', 'latitude', 'longitude', 'name', 'provenance', 'typeOf', 'waterArea']}
+
+ +

Example 2: Retrieve the inwardly directed property labels of two different leukocyte cell lines.

+ +
>>> datacommons.get_property_labels(['dc/c3j78rpyssdmf','dc/7hfhd2ek8ppd2'],out=False)
+{'dc/c3j78rpyssdmf': ['biosampleOntology'], 'dc/7hfhd2ek8ppd2': ['biosampleOntology']}
+
+ +

Error Returns

+ +

If there are no properties associated with the node, an empty list is returned:

+ +
>>> datacommons.get_property_labels(['geoId/123123123123123'])
+{'geoId/123123123123123': []}
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons.get_property_labels()
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_property_labels() missing 1 required positional argument: 'dcids'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/property_value.html b/api/python/property_value.html new file mode 100644 index 000000000..aa5f7d9cb --- /dev/null +++ b/api/python/property_value.html @@ -0,0 +1,671 @@ + + + + + Get property values of nodes - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve property values of nodes

+ +

Given a list of nodes and a property label, returns values associated with the +given property for each node.

+ +

General information about this endpoint

+ +

Signature:

+
datacommons.get_property_values(dcids, prop, out=True, value_type=None, limit=datacommons.utils._MAX_LIMIT)
+
+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by their Data Commons identifiers.
  • +
  • prop: The property to query for.
  • +
+ +

Optional arguments:

+ +
    +
  • value_type: The type of the property value to filter by. Defaults to NONE. Only applicable if +the value refers to a node.
  • +
  • out: The label’s direction. Defaults to True (only returning response nodes directed towards the requested node). If set to False, will only return response nodes directed away from the request node.
  • +
  • limit: (≤ 500) Maximum number of values returned per node. Defaults to datacommons.utils._MAX_LIMIT.
  • +
+ +

Assembling the information you will need for a call to the get_property_values method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    dcids: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the nodes of interest. More information about DCIDs is available in the glossary.

    +
  • +
  • +

    prop: The property whose value you are interested in, such as “name” for the name of a node, or “typeOf” for the type of a node.

    +
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    value_type: If the property queried only takes on node values, you can use this argument to filter nodes in the response, ensuring the response only contains nodes with the specified type. For example, if you query the property containedInPlace on the DCID geoId/06085, your response will contain many results that may not be relevant to your question. If you instead specify the value_type as City, your result list will be shorter, narrower, and easier to parse.

    +
  • +
  • +

    out: This is a boolean value that refers to the orientation, or direction, of the edge. You can specify this argument as True to indicate that you desire the response to only include nodes with the value of the property equivalent to one or more of the specified DCIDs, or False to only return nodes equivalent to one or more of the values of the properties of the specified DCIDs. (To visualize this, Figure 1 illustrates the directions for the property containedInPlace of the node for Argentina.)

    +
  • +
+ +

+ +

Figure 1. Relationship diagram for the property containedInPlace of the country Argentina. Note the directionality of the property containedInPlace: the API returns both nodes with direction in (Buenos Aires is containedInPlace of Argentina) and nodes with direction out (Argentina is containedInPlace of South America).

+ +

What to expect in the function return

+ +

The method’s return value will always be a dict in the following form:

+ +
{
+    "<dcid>": ["string", ...]
+    ...
+}
+
+ +

Examples

+ +

Example 1: Retrieve the common names of the country of Côte d’Ivoire.

+ +

Method call

+ +
>>> datacommons.get_property_values(['country/CIV'],'name')
+{'country/CIV': ["Côte d'Ivoire", 'Ivory Coast']}
+
+ +

Example 2: Retrieve the order to which the plant Austrobaileya scandens belongs.

+ +
>>> datacommons.get_property_values(['dc/bsmvthtq89217'],'order')
+{'dc/bsmvthtq89217': ['Austrobaileyales']}
+
+ +

Example 3: Retrieve the addresses of Stuyvesant High School in New York and Gunn High School in California.

+ +
>>> datacommons.get_property_values(["nces/360007702877","nces/062961004587"],'address')
+{'nces/360007702877': ['345 Chambers St, New York, New York'], 'nces/062961004587': ['780 Arastradero Rd., Palo Alto, California']}
+
+ +

Example 4: Retrieve a list of earthquake events in Madagascar.

+ +
+

NOTE: + Unlike in the REST API, the Python endpoint returns only one direction. Hence, you must specify out as False to obtain results in Madagascar.

+
+ +
>>> datacommons.get_property_values(dcids=["country/MDG"],prop='affectedPlace',out=False,value_type='EarthquakeEvent')
+{'country/MDG': ['earthquake/us200040me', 'earthquake/us60003r15', 'earthquake/usc000evr6', 'earthquake/usp00005zf', 'earthquake/usp00006yt', 'earthquake/usp0000afz', 'earthquake/usp0001fcd', 'earthquake/usp0001ss5', 'earthquake/usp00020ud', 'earthquake/usp0002kfd', 'earthquake/usp0004qn4', 'earthquake/usp0005gu9', 'earthquake/usp0007k9j', 'earthquake/usp0008vc6', 'earthquake/usp000dckw', 'earthquake/usp000fu24', 'earthquake/usp000gmuf', 'earthquake/usp000h6zw', 'earthquake/usp000jgbb']}
+
+ +

Example 5: Retrieve just one cyclone event in India.

+ +
>>> datacommons.get_property_values(dcids=["country/IND"],prop='affectedPlace',out=False,value_type='CycloneEvent',limit=1)
+{'country/IND': ['cyclone/ibtracs_2018314N12093']}
+
+ +

Example 6: Retrieve the country in which Buenos Aires is located.

+ +

+ +

Figure 2. Relationship diagram for the property containedInPlace of the country Argentina. Note the directionality of the property containedInPlace: the API returns both nodes with direction in (Buenos Aires is containedInPlace of Argentina) and nodes with direction out (Argentina is containedInPlace of South America).

+ +
>>> datacommons.get_property_values(dcids=["country/ARG"],prop='containedInPlace')
+{'country/ARG': ['southamerica']}
+
+ +
+

NOTE: + If there is no value associated with the property, an empty list is returned:

+
   >>> dc.get_property_values(["geoId/06", "geoId/21"], "foo")
+   {'geoId/06': [], 'geoId/21': []}
+
+
+ +

Error Returns

+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> dc.get_property_values('address')
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_property_values() missing 1 required positional argument: 'prop'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/query.html b/api/python/query.html new file mode 100644 index 000000000..518054a8b --- /dev/null +++ b/api/python/query.html @@ -0,0 +1,715 @@ + + + + + Query using SPARQL - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Query the Data Commons knowledge graph using SPARQL

+ +

Returns the results of running a graph query on the Data Commons knowledge graph +using SPARQL. Note that Data Commons is only +able to support a limited subsection of SPARQL functionality at this time: specifically only the keywords ORDER BY, DISTINCT, and LIMIT.

+ +

Note: The Python SPARQL library currently only supports the V1 version of the API.

+ +

General information about the query() method

+ +

Signature:

+ +
datacommons.query(query_string, select=None)
+
+ +

Required arguments:

+ +
    +
  • query_string: A SPARQL query string.
  • +
+ +

How to construct a call to the query() method

+ +

This method makes it possible to query the Data Commons knowledge graph using SPARQL. SPARQL is a query language developed to retrieve data from websites. It leverages the graph structure innate in the data it queries to return specific information to an end user. For more information on assembling SPARQL queries, check out the Wikipedia page about SPARQL and the W3C specification information.

+ +

This method accepts the additional optional argument select. This function selects rows to be returned by query. Under the hood, the select function examines a row in the results of executing query_string and returns True if and only if the row is to be returned by query. The row passed in as an argument is represented as a dict that maps a query variable in query_string to its value in the given row.

+ +
+

NOTE:

+
    +
  • In the query, each variable should have a typeOf condition, e.g. "?var typeOf City .".
  • +
+
+ +

What to expect in the function return

+ +

A correct response will always look like this:

+ +
[
+  {
+    "<field name>": "<field value>",
+    ...
+  },
+ ...
+]
+
+ +

The response contains an array of dictionaries, each corresponding to one node matching the conditions of the query. Each dictionary’s keys match the variables in the query SELECT clause, and the values in the dictionaries are those associated to the given node’s query-specified properties.

+ +

Examples and error responses

+ +

The following examples and error responses, along with explanations and fixes for the errors, are available in this Python notebook.

+ +

Example 1: Retrieve the name of the state associated with DCID geoId/06.

+ +
>>> geoId06_name_query = 'SELECT ?name ?dcid WHERE { ?a typeOf Place . ?a name ?name . ?a dcid ("geoId/06" "geoId/21" "geoId/24") . ?a dcid ?dcid }'
+>>> datacommons.query(geoId06_name_query)
+[{'?name': 'Kentucky', '?dcid': 'geoId/21'}, {'?name': 'California', '?dcid': 'geoId/06'}, {'?name': 'Maryland', '?dcid': 'geoId/24'}]
+
+ +

Example 2: Retrieve a list of ten biological specimens in reverse alphabetical order.

+ +
>>> bio_specimens_reverse_alphabetical_order_query = 'SELECT ?name WHERE { ?biologicalSpecimen typeOf BiologicalSpecimen . ?biologicalSpecimen name ?name } ORDER BY DESC(?name) LIMIT 10'
+>>> datacommons.query(bio_specimens_reverse_alphabetical_order_query)
+[{'?name': 'x Triticosecale'}, {'?name': 'x Silene'}, {'?name': 'x Silene'}, {'?name': 'x Silene'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}, {'?name': 'x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey'}]
+
+ +

Example 3: Retrieve a list of GNI observations by country.

+ +
>>> gni_by_country_query = 'SELECT ?observation ?place WHERE { ?observation typeOf StatVarObservation . ?observation variableMeasured Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita . ?observation observationAbout ?place . ?place typeOf Country . } ORDER BY ASC (?place) LIMIT 10'
+>>> datacommons.query(gni_by_country_query)
+[{'?observation': 'dc/o/syrpc3m8q34z7', '?place': 'country/ABW'}, {'?observation': 'dc/o/bqtfmc351v0f2', '?place': 'country/ABW'}, {'?observation': 'dc/o/md36fx6ty4d64', '?place': 'country/ABW'}, {'?observation': 'dc/o/bm28zvchsyf4b', '?place': 'country/ABW'}, {'?observation': 'dc/o/3nleez1feevw6', '?place': 'country/ABW'}, {'?observation': 'dc/o/x2yg38d0xecnf', '?place': 'country/ABW'}, {'?observation': 'dc/o/7swdqf6yjdyw8', '?place': 'country/ABW'}, {'?observation': 'dc/o/yqmsmbx1qskfg', '?place': 'country/ABW'}, {'?observation': 'dc/o/6hlhrz3k8p5wf', '?place': 'country/ABW'}, {'?observation': 'dc/o/txfw505ydg629', '?place': 'country/ABW'}]
+
+ +

Example 4: Retrieve a sample list of observations with the unit InternationalDollar.

+ +
>>> internationalDollar_obs_query = 'SELECT ?observation WHERE {   ?observation typeOf StatVarObservation .   ?observation unit InternationalDollar  } LIMIT 10'
+>>> datacommons.query(internationalDollar_obs_query)
+[{'?observation': 'dc/o/s3gzszzvj34f1'}, {'?observation': 'dc/o/gd41m7qym86d4'}, {'?observation': 'dc/o/wq62twxx902p4'}, {'?observation': 'dc/o/d93kzvns8sq4c'}, {'?observation': 'dc/o/6s741lstdqrg4'}, {'?observation': 'dc/o/2kcq1xjkmrzmd'}, {'?observation': 'dc/o/ced6jejwv224f'}, {'?observation': 'dc/o/q31my0dmcryzd'}, {'?observation': 'dc/o/96frt9w0yjwxf'}, {'?observation': 'dc/o/rvjz5xn9mlg73'}]
+
+ +

Example 5: Retrieve a list of ten distinct annual estimates of life expectancy, along with the year of estimation, for forty-seven-year-old Hungarians.

+ +
>>> life_expectancy_query = 'SELECT DISTINCT ?LifeExpectancy ?year WHERE { ?o typeOf StatVarObservation . ?o variableMeasured LifeExpectancy_Person_47Years . ?o observationAbout country/HUN . ?o value ?LifeExpectancy . ?o observationDate ?year } ORDER BY ASC(?LifeExpectancy) LIMIT 10'
+>>> datacommons.query(life_expectancy_query)
+[{'?LifeExpectancy': '26.4', '?year': '1993'}, {'?LifeExpectancy': '26.5', '?year': '1992'}, {'?LifeExpectancy': '26.7', '?year': '1990'}, {'?LifeExpectancy': '26.7', '?year': '1994'}, {'?LifeExpectancy': '26.8', '?year': '1991'}, {'?LifeExpectancy': '26.9', '?year': '1995'}, {'?LifeExpectancy': '27.2', '?year': '1996'}, {'?LifeExpectancy': '27.4', '?year': '1999'}, {'?LifeExpectancy': '27.5', '?year': '1997'}, {'?LifeExpectancy': '27.5', '?year': '1998'}]
+
+ +

Example 6: Use the select function to filter returns based on name.

+ +
>>> names_for_places_query = 'SELECT ?name ?dcid WHERE {  ?a typeOf Place .  ?a name ?name .  ?a dcid ("geoId/06" "geoId/21" "geoId/24") .  ?a dcid ?dcid }'
+>>> maryland_selector = lambda row: row['?name'] == 'Maryland'
+>>> result = datacommons.query(names_for_places_query, select=maryland_selector)
+>>> for r in result:
+...     print(r)
+...
+{'?name': 'Maryland', '?dcid': 'geoId/24'}
+
+ +

Error response 1: Malformed SPARQL query

+ +
>>> gni_by_country_query = 'SELECT ?observation WHERE { ?observation typeOf StatVarObservation . ?observation variableMeasured Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita . ?observation observationAbout ?place . ?place typeOf Country . } ORDER BY ASC (?place) LIMIT 10'
+>>> datacommons.query(gni_by_country_query)
+Traceback (most recent call last):
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/query.py", line 102, in query
+    res = six.moves.urllib.request.urlopen(req)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 222, in urlopen
+    return opener.open(url, data, timeout)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 531, in open
+    response = meth(req, response)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 641, in http_response
+    'http', request, response, code, msg, hdrs)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 569, in error
+    return self._call_chain(*args)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 503, in _call_chain
+    result = func(*args)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 649, in http_error_default
+    raise HTTPError(req.full_url, code, msg, hdrs, fp)
+urllib.error.HTTPError: HTTP Error 500: Internal Server Error
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/query.py", line 104, in query
+    raise ValueError('Response error {}:\n{}'.format(e.code, e.read()))
+ValueError: Response error 500:
+b'{\n "code": 2,\n "message": "googleapi: Error 400: Unrecognized name: place; Did you mean name? at [1:802], invalidQuery",\n "details": [\n  {\n   "@type": "type.googleapis.com/google.rpc.DebugInfo",\n   "stackEntries": [],\n   "detail": "internal"\n  }\n ]\n}\n'
+
+ +

Error response 2: Malformed SPARQL query string

+ +
>>> gni_by_country_query = 'SELECT ?observation WHERE { ?observation typeOf StatVarObservation . ?observation variableMeasured Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita . ?observation observationAbout ?place . ?place typeOf Country . } ORDER BY ASC (?place) LIMIT 10'
+>>> datacommons.query(gni_by_country_query)
+Traceback (most recent call last):
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/query.py", line 102, in query
+    res = six.moves.urllib.request.urlopen(req)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 222, in urlopen
+    return opener.open(url, data, timeout)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 531, in open
+    response = meth(req, response)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 641, in http_response
+    'http', request, response, code, msg, hdrs)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 569, in error
+    return self._call_chain(*args)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 503, in _call_chain
+    result = func(*args)
+  File "/home/porpentina/miniconda3/lib/python3.7/urllib/request.py", line 649, in http_error_default
+    raise HTTPError(req.full_url, code, msg, hdrs, fp)
+urllib.error.HTTPError: HTTP Error 500: Internal Server Error
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/query.py", line 104, in query
+    raise ValueError('Response error {}:\n{}'.format(e.code, e.read()))
+ValueError: Response error 500:
+b'{\n "code": 2,\n "message": "googleapi: Error 400: Unrecognized name: place; Did you mean name? at [1:802], invalidQuery",\n "details": [\n  {\n   "@type": "type.googleapis.com/google.rpc.DebugInfo",\n   "stackEntries": [],\n   "detail": "internal"\n  }\n ]\n}\n'
+>>> gni_by_country_query = 'SELECT ?observation WHERE { ?observation typeOf StatVarObservation . \\\\\ ?observation variableMeasured Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita . ?observation observationAbout ?place . ?place typeOf Country . } ORDER BY ASC (?place) LIMIT 10'
+
+ +

Error response 3: Bad selector

+ +
>>> names_for_places_query = 'SELECT ?name ?dcid WHERE {  ?a typeOf Place .  ?a name ?name .  ?a dcid ("geoId/06" "geoId/21" "geoId/24") .  ?a dcid ?dcid }'
+>>> bad_selector = lambda row: row['?earthquake'] == 'Nonexistent'
+>>> result = datacommons.query(names_for_places_query, select=bad_selector)
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/query.py", line 127, in query
+    if select is None or select(row_map):
+  File "<stdin>", line 1, in <lambda>
+KeyError: '?earthquake'
+
+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/stat_all.html b/api/python/stat_all.html new file mode 100644 index 000000000..ba7ffdfbd --- /dev/null +++ b/api/python/stat_all.html @@ -0,0 +1,686 @@ + + + + + Get statistical data for multiple places - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve a collection of statistical data for multiple places

+ +

Returns a nested dict of all time series for places and stat_vars. +Note that in Data Commons, a StatisticalVariable is any type of statistical metric that can be measured at a place and +time. See the full list of StatisticalVariables.

+ +

General information about this method

+ +

Signature:

+ +
datacommons.get_stat_all(places, stat_vars)
+
+ +

Required arguments

+ +
    +
  • places: The DCID IDs of the Place objects to query for. (Here DCID stands for Data Commons ID, the unique identifier assigned to all entities in Data Commons.)
  • +
  • stat_vars: The dcids of the StatisticalVariables.
  • +
+ +

Assembling the information you will need for a call to the get_stat_all method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.
  • +
  • stat_var: The statistical variable whose value you are interested in.
  • +
+ +
+

NOTE: + Be sure to initialize the library. Check the Python library setup guide for more details.

+
+ +

What to expect in the function return

+ +

The method’s return value will always be an object in the following form:

+ +
{
+    "<dcid>": {
+      "stat_var": {
+        "sourceSeries": [
+          {
+            "val": {
+              <"time series">
+            }
+            "measurementMethod": "<String>",
+            "observationPeriod": "<String>",
+            "importName": "<String>",
+            "provenanceDomain": "<String>"
+          }
+          ...
+        ]
+      }
+      ...
+    }
+    ...
+}
+
+ +

For more information on the key terms in this sample response, see the glossary.

+ +

Examples

+ +

Example 1: Retrieve the total population as well as the male population of Arkansas.

+ +
>>> import datacommons as dc
+>>> dc.get_stat_all(["geoId/05"], ["Count_Person", "Count_Person_Male"])
+{
+  'geoId/05': {
+    'Count_Person_Female': {
+      'sourceSeries': [
+        {
+          'val': {
+            '2001': 1376360
+            '2002': 1382090,
+            ...
+            '2017': 1521170,
+            '2018': 1527580,
+          },
+            'measurementMethod': 'OECDRegionalStatistics',
+            'observationPeriod': 'P1Y',
+            'importName': 'OECDRegionalDemography',
+            'provenanceDomain': 'oecd.org'
+        },
+        {
+          'val': {
+            '2011': 1474641,
+            '2012': 1485120
+            ...
+            '2017': 1516293,
+            '2018': 1522259,
+          },
+          'measurementMethod': 'CensusACS5yrSurvey',
+          'importName': 'CensusACS5YearSurvey',
+          'provenanceDomain': 'census.gov'
+        }
+      ]
+    },
+    'Count_Person_Male': {
+      'sourceSeries': [
+        {
+          'val': {
+            '2001': 1315210,
+            '2002': 1323840,
+            ...
+            '2017': 1475420,
+            '2018': 1480140,
+          },
+          'measurementMethod': 'OECDRegionalStatistics',
+          'observationPeriod': 'P1Y',
+          'importName': 'OECDRegionalDemography',
+          'provenanceDomain': 'oecd.org'
+        },
+        {
+          'val': {
+            '2011': 1421287
+            '2012': 1431252,
+            ...
+            '2017': 1461651,
+            '2018': 1468412,
+          },
+          'measurementMethod': 'CensusACS5yrSurvey',
+          'importName': 'CensusACS5YearSurvey',
+          'provenanceDomain': 'census.gov'
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 2: Retrieve the populations of people with doctoral degrees in Minnesota and Wisconsin.

+ +
>>> datacommons.get_stat_all(["geoId/27","geoId/55"], ["Count_Person_EducationalAttainmentDoctorateDegree"])
+{'geoId/27': {'Count_Person_EducationalAttainmentDoctorateDegree': {'sourceSeries': [{'val': {'2016': 50039, '2017': 52737, '2018': 54303, '2012': 40961, '2013': 42511, '2014': 44713, '2015': 47323}, 'measurementMethod': 'CensusACS5yrSurvey', 'importName': 'CensusACS5YearSurvey', 'provenanceDomain': 'census.gov', 'provenanceUrl': 'https://www.census.gov/'}]}}, 'geoId/55': {'Count_Person_EducationalAttainmentDoctorateDegree': {'sourceSeries': [{'val': {'2017': 43737, '2018': 46071, '2012': 38052, '2013': 38711, '2014': 40133, '2015': 41387, '2016': 42590}, 'measurementMethod': 'CensusACS5yrSurvey', 'importName': 'CensusACS5YearSurvey', 'provenanceDomain': 'census.gov', 'provenanceUrl': 'https://www.census.gov/'}]}}}
+
+ +

Error returns

+ +

When no data is found, the API returns a dictionary with no values:

+ +
>>> import datacommons as dc
+>>> dc.get_stat_all(["bad value"],["another bad value"])
+{'bad value': {'another bad value': {}}}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/stat_series.html b/api/python/stat_series.html new file mode 100644 index 000000000..2c2e511de --- /dev/null +++ b/api/python/stat_series.html @@ -0,0 +1,656 @@ + + + + + Get time series for a place - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve statistical time series for a place

+ +

Returns a dict mapping date to value for a place based on the +stat_var, with optional +filter parameters. See the full list of StatisticalVariable classes.

+ +

General information about this endpoint

+ +

Signature:

+ +
datacommons.get_stat_series(place, stat_var, measurement_method=None,observation_period=None, unit=None, scaling_factor=None)
+
+ +

Required arguments:

+ + + +
+

NOTE:

+
    +
  • In Data Commons, dcid stands for Data Commons ID and indicates the unique identifier assigned to every node in the knowledge graph.
  • +
+
+ +

Assembling the information you will need for a call to the get_stat_series method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.

    +
  • +
  • +

    stat_var: The statistical variable whose value you are interested in.

    +
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    measurement_method: The technique used for measuring a statistical variable.

    +
  • +
  • +

    observation_period: The time period over which an observation is made.

    +
  • +
  • +

    unit: The unit of measurement.

    +
  • +
  • +

    scaling_factor: Property of statistical variables indicating factor by which a measurement is multiplied to fit a certain format.

    +
  • +
+ +

Note that specifying arguments that do not exist for the target place and variable will result in an empty response.

+ +

What to expect in the function return

+ +

The method’s return value will always be a dict in the following form:

+ +
{
+    "<dcid>": <integer>
+    ...
+}
+
+ +

Examples

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
>>> datacommons.get_stat_series("geoId/05", "Count_Person_Male")
+{'2011': 1421287, '2012': 1431252, '2013': 1439862, '2014': 1447235, '2015': 1451913, '2016': 1456694, '2017': 1461651, '2018': 1468412}
+
+ +

Example 2: Retrieve the number of people in Bosnia and Herzegovina as counted by the Bosnian census.

+ +
>>> datacommons.get_stat_series("country/BIH", "Count_Person", measurement_method="BosniaCensus")
+{'2013': 3791622}
+
+ +

Example 3: Retrieve the death count in Miami-Dade County over a period of one year.

+ +
>>> datacommons.get_stat_series("geoId/12086", "Count_Death", observation_period="P1Y")
+{'1999': 19170, '2001': 19049, '2002': 18176, '2009': 17806, '2012': 18621, '2015': 19542, '2005': 18400, '2008': 18012, '2010': 18048, '2017': 20703, '2000': 18540, '2003': 18399, '2006': 18261, '2013': 18473, '2014': 19013, '2004': 18384, '2007': 17982, '2011': 17997, '2016': 20277}
+
+ +

Example 4: Retrieve the distrubtion of naloxone in Miami-Dade County in grams.

+ +
>>> datacommons.get_stat_series("geoId/12086", "RetailDrugDistribution_DrugDistribution_Naloxone", unit="Grams")
+{'2007-07': 80.34, '2007-10': 118.79, '2006-01': 44.43, '2006-04': 48.28, '2006-07': 54.98, '2006-10': 55.21, '2007-01': 59.63, '2007-04': 65.98}
+
+ +

Example 5: Retrieve the percentage of nominal GDP spent by the government of the Gambia on education.

+ +
>>> datacommons.get_stat_series("country/GMB", "Amount_EconomicActivity_ExpenditureActivity_EducationExpenditure_Government_AsFractionOf_Amount_EconomicActivity_GrossDomesticProduction_Nominal", scaling_factor="100.0000000000")
+{'1986': 3.48473, '1996': 2.56628, '2000': 1.46587, '2010': 4.1561, '2014': 2.17849, '2012': 4.10118, '2013': 1.82979, '1999': 1.56513, '1985': 4.29515, '1992': 1.16984, '1995': 2.55356, '2002': 1.44292, '2015': 2.13528, '2005': 1.13919, '2018': 2.43275, '2008': 3.52738, '2016': 2.05946, '1989': 2.97409, '1990': 2.82584, '1991': 3.78061, '2011': 3.92511, '2004': 1.0345, '2007': 1.30849, '2009': 3.07235, '2001': 1.1581, '2003': 1.36338, '2006': 1.20949}
+
+ +

Error Returns

+ +

If there is no series associated with the requested property, an empty list is returned:

+ +
>>> datacommons.get_stat_series("geoId/1001", "Count_Person_Male")
+{}
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons.get_stat_series("geoId/1001")
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_stat_series() missing 1 required positional argument: 'stat_var'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/stat_value.html b/api/python/stat_value.html new file mode 100644 index 000000000..f04fe1ad9 --- /dev/null +++ b/api/python/stat_value.html @@ -0,0 +1,661 @@ + + + + + Get a single statistical value for a place - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve statistics value for a place

+ +

Returns a statistical value for a place based on the +StatisticalVariable. +See the full list of StatisticalVariable classes.

+ +

When there are multiple sources for the same statistical variable, a preferred +source with more recent data or more authority is selected.

+ +

General information about this endpoint

+ +

Signature:

+ +
datacommons.get_stat_value(place, stat_var, date=None, measurement_method=None,observation_period=None, unit=None, scaling_factor=None)
+
+ +

Required arguments:

+ + + +

You can find a list of StatisticalVariables with human-readable names here.

+ +

Optional arguments:

+ +
    +
  • date: The preferred date of observation in ISO 8601 format. If not specified, returns the latest observation.
  • +
  • measurement_method: The DCID of the preferred measurementMethod value.
  • +
  • observation_period: The preferred observationPeriod value.
  • +
  • unit: The DCID of the preferred unit value.
  • +
  • scaling_factor: The preferred scalingFactor value.
  • +
+ +

Assembling the information you will need for a call to the get_stat_value method

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.
  • +
  • stat_var: The statistical variable whose value you are interested in.
  • +
+ +

In addition to these required properties, this method also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    date: Specified in ISO 8601 format. Examples include 2011 (the year 2011), 2019-06 (the month of June in the year 2019), and 2019-06-05T17:21:00-06:00 (5:17PM on June 5, 2019, in CST).

    +
  • +
  • +

    measurement_method: The technique used for measuring a statistical variable.

    +
  • +
  • +

    observation_period: The time period over which an observation is made.

    +
  • +
  • +

    unit: The unit of measurement.

    +
  • +
  • +

    scaling_factor: Property of statistical variables indicating factor by which a measurement is multiplied to fit a certain format.

    +
  • +
+ +

What to expect in the return

+ +

The method will return a simple number, like ‘1.20949’ or ‘1431252’.

+ +

Examples

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
>>> datacommons.get_stat_value("geoId/05", "Count_Person_Male")
+1474705
+
+ +

Example 2: Retrieve the count of men in the state of California in the year 2012.

+ +
>>> datacommons.get_stat_value("geoId/05", "Count_Person_Male", date="2012")
+1431252
+
+ +

Example 3: Retrieve the number of people in Bosnia and Herzegovina as counted by the Bosnian census.

+ +
>>> datacommons.get_stat_value("country/BIH", "Count_Person", measurement_method="BosniaCensus")
+3791622
+
+ +

Example 4: Retrieve the death count in Miami-Dade County over a period of one year.

+ +
>>> datacommons.get_stat_value("geoId/12086", "Count_Death", observation_period="P1Y")
+20703
+
+ +

Example 5: Retrieve the distrubtion of the drug naloxone in Miami-Dade County in grams.

+ +
>>> datacommons.get_stat_value("geoId/12086", "RetailDrugDistribution_DrugDistribution_Naloxone", unit="Grams")
+118.79
+
+ +

Example 6: Retrieve the percentage of nominal GDP spent by the government of the Gambia on education.

+ +
>>> datacommons.get_stat_value("country/GMB", "Amount_EconomicActivity_ExpenditureActivity_EducationExpenditure_Government_AsFractionOf_Amount_EconomicActivity_GrossDomesticProduction_Nominal", scaling_factor="100.0000000000")
+2.43275
+
+ +

Error Returns

+ +

If there is no value associated with the requested property, nan is returned:

+ +
>>> datacommons.get_stat_value("geoId/1001", "Count_Person_Male")
+nan
+
+ +

If you do not pass a required positional argument, a TypeError is returned:

+ +
>>> datacommons.get_stat_value("geoId/1001")
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_stat_value() missing 1 required positional argument: 'stat_var'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/triple.html b/api/python/triple.html new file mode 100644 index 000000000..cdafc4551 --- /dev/null +++ b/api/python/triple.html @@ -0,0 +1,629 @@ + + + + + Get triples associated with nodes - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve triples associated with nodes

+ +

Given a list of nodes, return triples which are associated with the specified +node(s).

+ +

General information about this method

+ +

Signature:

+ +
datacommons.get_triples(dcids, limit=datacommons.utils._MAX_LIMIT)
+
+ +

Required arguments:

+ +
    +
  • dcids - A list of nodes to query, identified by their DCID.
  • +
+ +

Optional arguments:

+ +
    +
  • limit - The maximum number of triples per combination of +property and type associated with nodes linked by that property to fetch, +≤ 500.
  • +
+ +

Assembling the information you will need for a call to the get_triples method

+ +

This endpoint requires the argument dcids, which are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the nodes of interest.

+ +

In addition to this required property, this endpoint also allows you to specify a limit on how many triples (up to 500) you would like to see in the response.

+ +

What to expect in the function return

+ +

The method’s return value will always be a dict in the following form:

+ +
{
+    "<dcid>": [<Triple>, ...]
+    ...
+}
+
+ +

While all triples contain subjects, predicates, and objects, those entities may be specified using any of a few possible fields. Here are possible keys that you may find associated to triples in the JSON response:

+ +
    +
  • SubjectID
  • +
  • SubjectName
  • +
  • SubjectTypes
  • +
  • Predicate
  • +
  • ObjectID
  • +
  • ObjectName
  • +
  • ObjectValue
  • +
  • ObjectTypes
  • +
  • ProvenanceID
  • +
+ +

Example requests and responses

+ +

Example 1: Retrieve triples associated with zip code 94043.

+ +
>>> datacommons.get_triples(['zip/94043'])
+{'zip/94043': [('dc/p/zx34sdjfl5v75', 'location', 'zip/94043'), ... ]}
+
+ +

Example 2: Retrieve triples associated with two American biological research labs.

+ +
>>> datacommons.get_triples(['dc/c3j78rpyssdmf','dc/7hfhd2ek8ppd2'])
+{'dc/c3j78rpyssdmf': [('dc/c3j78rpyssdmf', 'provenance', 'dc/h2lkz1'), ('dc/zn6l0flenf3m6', 'biosampleOntology', 'dc/c3j78rpyssdmf'), ('dc/tkcknpfwxfrhf', 'biosampleOntology', 'dc/c3j78rpyssdmf'), ('dc/jdzbbfhgzghv1', 'biosampleOntology', 'dc/c3j78rpyssdmf'), ('dc/4f9w8lhcwggxc', 'biosampleOntology', 'dc/c3j78rpyssdmf')], 'dc/7hfhd2ek8ppd2': [('dc/4mjs95b1meh1h', 'biosampleOntology', 'dc/7hfhd2ek8ppd2'), ('dc/13xcyzcr819cb', 'biosampleOntology', 'dc/7hfhd2ek8ppd2'), ('dc/7hfhd2ek8ppd2', 'provenance', 'dc/h2lkz1')]}
+
+ +

Error Returns

+ +

If a non-existent triple is passed, a KeyError is thrown:

+ +
>>> datacommons.get_triples(['geoId/123'])
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/home/porpentina/miniconda3/lib/python3.7/site-packages/datacommons/core.py", line 251, in get_triples
+    for t in payload[dcid]:
+KeyError: 'geoId/123'
+
+ +

If you do not pass the required positional argument, a TypeError is returned:

+ +
>>> datacommons.get_triples()
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: get_triples() missing 1 required positional argument: 'dcids'
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/python/tutorials.html b/api/python/tutorials.html new file mode 100644 index 000000000..21fbea528 --- /dev/null +++ b/api/python/tutorials.html @@ -0,0 +1,575 @@ + + + + + Tutorials - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Tutorials

+ +

Get familiar with the Data Commons knowledge graph and APIs using these analysis examples. +You can also clone these to use as a base for your own analysis.

+ +

Example Google Colab +notebooks written in +Python:

+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/index.html b/api/rest/index.html new file mode 100644 index 000000000..7d66c17fd --- /dev/null +++ b/api/rest/index.html @@ -0,0 +1,548 @@ + + + + + REST (v0) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +
+

NOTE: The Data Commons V0 REST API is deprecated. Please use the V2 REST API.

+
+ +

Data Commons V0 REST API

+ +

The Data Commons REST API is a REST library that enables developers to +programmatically access nodes in the Data Commons knowledge graph. This package +allows users to explore the structure of the graph, integrate statistics from +the graph into data analysis applications and much more. Please see the +overview for more details on the design and structure of the API.

+ +

Please see the V2 REST API for the latest version of the REST API.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/place_in.html b/api/rest/place_in.html new file mode 100644 index 000000000..279cc2f16 --- /dev/null +++ b/api/rest/place_in.html @@ -0,0 +1,765 @@ + + + + + Places within a Place - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve all places contained within a place

+ +

Given a list of parent Place DCIDs, +(e.g. any State, Country, etc.), return a list of child places +contained within the specified DCIDs. Only returns children whose place type matches +the request’s placeType parameter.

+ +

General information about this endpoint

+ +

URL: /node/places-in

+ +

Methods available: GET, POST

+ +

Required arguments:

+ +
    +
  • +

    dcids: A list of (parent) Place nodes, identified by their DCIDs.

    +
  • +
  • +

    placeType: The type of the contained (child) Place nodes to filter by.

    +
  • +
+ +

How to construct a request to the places within a place endpoint

+ +

Step 1: assembling the information you will need

+ +

This endpoint requires the argument dcids. DCIDs are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the parent places of interest.

+ +

This endpoint also requires the argument placeType, specifying the type of the child places you desire in the response.

+ +

Step 2: creating the request

+ +

When actually putting together your request, you can choose from two options. If you intend to query only a small number of DCIDs, you may want to use the simpler formatting offered by the GET method. For larger numbers of DCIDs, or if you prefer to utilize a static URL, a POST request likely makes more sense. To use it, make a POST request against the main endpoint while changing the fields of the JSON body it sends.

+ +

Examples of usage for both GET and POST can be found below.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+    "payload": "<payload string>",
+}
+
+ +

Here "<payload string>" is a long encoded JSON string, whose structure changes depending on whether the response contains node references. You can run JSON.parse() on the payload field to retrieve the data. For example, in JavaScript: var data = JSON.parse(response['payload']).

+ +

After decoding the response payload string, its structure adheres to the following form:

+ +
[
+  {
+    "dcid": "stringOfParentPlaceDCID",
+    "place": "stringOfChildPlaceDCID"
+  },
+  ...
+]
+
+ +

Example requests and responses

+ +

Example 1: Retrieve a list of the counties in Delaware.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/places-in?dcids=geoId%2F10&placeType=County'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/places-in \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"geoId/10"
    +	],
    +	"placeType": "County"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
{
+  "payload": [
+    {
+      "dcid": "geoId/10",
+      "place": "geoId/10001"
+    },
+    {
+      "dcid": "geoId/10",
+      "place": "geoId/10003"
+    },
+    {
+      "dcid": "geoId/10",
+      "place": "geoId/10005"
+    }
+  ]
+}
+
+ +

Example 2: Retrieve a list of congressional districts in Alaska and Hawaii.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/places-in?dcids=geoId%2F15&dcids=geoId%2F02&placeType=CongressionalDistrict'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/places-in \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"geoId/15",
    +		"geoId/02"
    +	],
    +	"placeType": "CongressionalDistrict"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
{
+  "payload": [
+    {
+      "dcid": "geoId/15",
+      "place": "geoId/1501"
+    },
+    {
+      "dcid": "geoId/15",
+      "place": "geoId/1502"
+    },
+    {
+      "dcid": "geoId/02",
+      "place": "geoId/0200"
+    }
+  ]
+}
+
+ +

Error Responses

+ +

If your request is malformed in some way, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required arguments",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/place_stat_vars.html b/api/rest/place_stat_vars.html new file mode 100644 index 000000000..4f56f4b1c --- /dev/null +++ b/api/rest/place_stat_vars.html @@ -0,0 +1,743 @@ + + + + + Place Statistical Variables - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve all statistical variables available for a particular place

+ +

Given a list of Place DCIDs, +(e.g. any State, Country, etc.), return a list of statistical variables available for the specified DCIDs.

+ +

General information about this endpoint

+ +

URL: /place/stat-vars

+ +

Methods available: GET, POST

+ +

Required arguments:

+ +
    +
  • dcids: A list of Place nodes, identified by their DCIDs.
  • +
+ +

How to construct a request to the place statistical variables endpoint

+ +

Step 1: assembling the information you will need

+ +

This endpoint requires the argument dcids. DCIDs are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the parent places of interest.

+ +

Step 2: creating the request

+ +

When actually putting together your request, you can choose from two options. If you intend to query only a small number of DCIDs, you may want to use the simpler formatting offered by the GET method. For larger numbers of DCIDs, or if you prefer to utilize a static URL, a POST request likely makes more sense. To use it, make a POST request against the main endpoint while changing the fields of the JSON body it sends.

+ +

Examples of usage for both GET and POST can be found below.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+  "places": {
+    <dcid>: {
+      "statVars": [
+        <dcid>,
+        ...
+      ]
+    },
+    ...
+  }
+}
+
+ +

Example requests and responses

+ +

Example 1: Retrieve a list of the statistical variables available for the country of Palau.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/place/stat-vars?dcids=country%2FPLW'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/place/stat-vars \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "dcids": [
    +      "country/PLW"
    +    ]
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
{
+  "places": {
+    "country/PLW": {
+      "statVars": [
+        "MortalityRate_Person_Upto4Years_AsFractionOf_Count_BirthEvent_LiveBirth",
+        "LifeExpectancy_Person_Male",
+        "LifeExpectancy_Person_Female",
+        "LifeExpectancy_Person",
+        ...
+      ]
+    }
+  }
+}
+
+ +

Example 2: Retrieve a list of statistical variables available for the cities of Dodoma and Dar es Salaam, Tanzania.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/place/stat-var?dcids=wikidataId%2FQ1960&dcids=wikidataId%2FQ3866'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/place/stat-vars \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"wikidataId/Q1960",
    +		"wikidataId/Q3866"
    +	]
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
{
+  "places": {
+    "wikidataId/Q1960": {
+      "statsVars": [
+        "Count_Person"
+      ]
+    },
+    "wikidataId/Q3866": {
+      "statsVars": [
+        "Count_Person"
+      ]
+    }
+  }
+}
+
+ +

Error Responses

+ +

If your request is malformed in some way, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required arguments: dcid",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/property_label.html b/api/rest/property_label.html new file mode 100644 index 000000000..8a9eaa2d4 --- /dev/null +++ b/api/rest/property_label.html @@ -0,0 +1,815 @@ + + + + + Property Label - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve property labels of nodes

+ +

This endpoint is suitable for situations in which you have a node or list of nodes and desire to obtain the labels of all properties defined for those nodes.

+ +

General information about this endpoint

+ +

URL: /node/property-labels

+ +

Methods available: GET, POST

+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by DCID.
  • +
+ +

How to construct a request to the property label endpoint

+ +

Step 1: Assembling the information you will need

+ +

This endpoint requires the argument dcids, which are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the nodes of interest.

+ +

Step 2: Creating the request

+ +

When actually putting together your request, you can choose from two options. If you intend to query only a small number of DCIDs, you may want to use the simpler formatting offered by the GET method. For larger numbers of DCIDs, or if you prefer to utilize a static URL, a POST request likely makes more sense. To use it, make a POST request against the main endpoint while changing the fields of the JSON body it sends.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+    "payload": "<payload string>",
+}
+
+ +

Here "<payload string>" is a long encoded JSON string, whose structure changes depending on whether the response contains node references. You can run JSON.parse() on the payload field to retrieve the data. For example, in JavaScript: var data = JSON.parse(response['payload']).

+ +

Here is the structure the response payload string adheres to after decoding:

+ +
{
+    "<dcid>": {
+        "inLabels": [
+            "<label>",
+            ...
+        ],
+        "outLabels": [
+            "<label>",
+            ...
+        ]
+    },
+    ...
+}
+
+ +

For each node, inLabels contains labels directed towards the node while +outLabels contains labels directed away from the node. For more information on the in and out directions, check out the property value REST endpoint documentation.

+ +

Example requests and responses

+ +

Example 1: Retrieve the property labels of Wisconsin’s eighth congressional district.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-labels?dcids=geoId%2F5508'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-labels \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"geoId/5508"
    +	]
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"geoId/5508\":{\"inLabels\":[\"containedInPlace\",\"geoOverlaps\",\"location\"],\"outLabels\":[\"containedInPlace\",\"geoId\",\"geoJsonCoordinates\",\"geoOverlaps\",\"kmlCoordinates\",\"landArea\",\"latitude\",\"longitude\",\"name\",\"provenance\",\"typeOf\",\"waterArea\"]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "geoId/5508": {
+      "inLabels": [
+        "containedInPlace",
+        "geoOverlaps",
+        "location"
+      ],
+      "outLabels": [
+        "containedInPlace",
+        "geoId",
+        "geoJsonCoordinates",
+        "geoOverlaps",
+        "kmlCoordinates",
+        "landArea",
+        "latitude",
+        "longitude",
+        "name",
+        "provenance",
+        "typeOf",
+        "waterArea"
+      ]
+    }
+  }
+}
+
+ +

Example 2: Retrieve the property labels of two different leukocyte cell lines.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-labels?dcids=dc%2Fc3j78rpyssdmf&dcids=dc%2F7hfhd2ek8ppd2'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-labels \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "dcids": [
    +      "dc/c3j78rpyssdmf",
    +      "dc/7hfhd2ek8ppd2"
    +    ]
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"dc/7hfhd2ek8ppd2\":{\"inLabels\":[\"biosampleOntology\"],\"outLabels\":[\"cellSlims\",\"classification\",\"dbxrefs\",\"developmentalSlims\",\"encodeUUID\",\"name\",\"organSlims\",\"provenance\",\"sameAs\",\"status\",\"systemSlims\",\"termId\",\"termName\",\"typeOf\"]},\"dc/c3j78rpyssdmf\":{\"inLabels\":[\"biosampleOntology\"],\"outLabels\":[\"cellSlims\",\"classification\",\"dbxrefs\",\"encodeUUID\",\"name\",\"provenance\",\"sameAs\",\"status\",\"systemSlims\",\"termId\",\"termName\",\"typeOf\"]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "dc/7hfhd2ek8ppd2": {
+      "inLabels": [
+        "biosampleOntology"
+      ],
+      "outLabels": [
+        "cellSlims",
+        "classification",
+        "dbxrefs",
+        "developmentalSlims",
+        "encodeUUID",
+        "name",
+        "organSlims",
+        "provenance",
+        "sameAs",
+        "status",
+        "systemSlims",
+        "termId",
+        "termName",
+        "typeOf"
+      ]
+    },
+    "dc/c3j78rpyssdmf": {
+      "inLabels": [
+        "biosampleOntology"
+      ],
+      "outLabels": [
+        "cellSlims",
+        "classification",
+        "dbxrefs",
+        "encodeUUID",
+        "name",
+        "provenance",
+        "sameAs",
+        "status",
+        "systemSlims",
+        "termId",
+        "termName",
+        "typeOf"
+      ]
+    }
+  }
+}
+
+ +

Error Responses

+ +

If your request is malformed in some way, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required arguments: dcid",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/property_value.html b/api/rest/property_value.html new file mode 100644 index 000000000..9923d5635 --- /dev/null +++ b/api/rest/property_value.html @@ -0,0 +1,1169 @@ + + + + + Property Value - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve property values of nodes

+ +

This endpoint is suitable for situations in which you have a node or list of nodes and desire to obtain the values of a specified property attached to those nodes.

+ +

General information about this endpoint

+ +

URL: /node/property-values

+ +

Methods available: GET, POST

+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by their DCID.
  • +
  • property: The property to query for.
  • +
+ +

Optional arguments:

+ +
    +
  • valueType: The type of the property value to filter by. Only applicable if +the value refers to a node.
  • +
  • direction: The label’s direction. Only valid values are out (returning response nodes directed towards the requested node) and in (returning response nodes directed away from the request node).
  • +
  • limit: (≤ 500) Maximum number of values returned per node.
  • +
+ +

How to construct a request to the property value endpoint

+ +

Step 1: Assembling the information you will need

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • +

    dcids: Data Commons uniquely identifies nodes by assigning them DCIDs, or Data Commons IDs. Your query will need to specify the DCIDs for the nodes of interest.

    +
  • +
  • +

    property: The property whose value you are interested in, such as “name” for the name of a node, or “typeOf” for the type of a node.

    +
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    valueType: If the property queried only takes on node values, you can use this argument to filter nodes in the response, ensuring the response only contains nodes with the specified type.

    +
  • +
  • +

    direction: This refers to the orientation, or direction, of the edge. You can specify this argument as out to indicate that you desire the response to only include nodes with the value of the property equivalent to one or more of the specified DCIDs, or in to only return nodes equivalent to one or more of the values of the properties of the specified DCIDs. (To visualize this, Figure 1 illustrates the directions for the property containedInPlace of the node for Argentina.)

    +
  • +
+ +

+ +

Figure 1. Relationship diagram for the property containedInPlace of the country Argentina. Note the directionality of the property containedInPlace: the API returns both nodes with direction in (Buenos Aires is containedInPlace of Argentina) and nodes with direction out (Argentina is containedInPlace of South America).

+ +

Step 2: Creating the request

+ +

When actually putting together your request, you can choose from two options. If you intend to use only a small number of parameters, you may want to use the simpler formatting offered by the GET method, which makes requests against the main endpoint while altering the query parameters incorporated into the URL. For more complex queries, or if you prefer to utilize a static URL, a POST request likely makes more sense. To use it, make a POST request against the main endpoint while changing the fields of the JSON body it sends.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+    "payload": "<payload string>",
+}
+
+ +

Here "<payload string>" is a long encoded JSON string, whose structure changes depending on whether the response contains node references. You can run JSON.parse() on the payload field to retrieve the data. For example, in javascript: var data = JSON.parse(response['payload']).

+ +

After decoding the response payload string, there are two possible structures it could adhere to.

+ +

Structure 1: Decoded response payload string for property values that are not node references.

+ +
{
+    "<dcid>": {
+        "<direction>": [
+          {
+            "value": "string",
+            "provenanceId": "string"
+          },
+          ...
+        ]
+    },
+    ...
+}
+
+ +

Structure 2: Decoded response payload string for property values that are node references.

+ +
{
+    "<dcid>":
+        {
+        "<direction>": [
+            {
+              "dcid": "string",
+              "name": "string",
+              "provenanceId": "string",
+              "types": "string[]"
+            },
+            ...
+        ]
+    },
+    ...
+}
+
+ +

NOTE: The provenanceId is the DCID of the provenance for the corresponding value.

+ +

Example requests and responses

+ +

Example 1: Retrieve the common names of the country of Côte d’Ivoire.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=country%2FCIV&property=name'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "dcids": [
    +      "country/CIV"
    +    ],
    +    "property": "name"
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"country/CIV\":{\"out\":[{\"provenanceId\":\"dc/5n63hr1\",\"value\":\"Ivory Coast\"},{\"provenanceId\":\"dc/5n63hr1\",\"value\":\"Côte d'Ivoire\"}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "country/CIV": {
+      "out": [
+        {
+          "provenanceId": "dc/5n63hr1",
+          "value": "Ivory Coast"
+        },
+        {
+          "provenanceId": "dc/5n63hr1",
+          "value": "Côte d'Ivoire"
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 2: Retrieve the order to which the plant Austrobaileya scandens belongs.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=dc%2Fbsmvthtq89217&property=order'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "dcids": [
    +      "dc/bsmvthtq89217"
    +    ],
    +    "property": "order"
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"dc/bsmvthtq89217\":{\"out\":[{\"provenanceId\":\"dc/93qydx3\",\"value\":\"Austrobaileyales\"}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "dc/bsmvthtq89217": {
+      "out": [
+        {
+          "provenanceId": "dc/93qydx3",
+          "value": "Austrobaileyales"
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 3: Retrieve the addresses of Stuyvesant High School in New York and Gunn High School in California.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=nces%2F360007702877&dcids=nces%2F062961004587&property=address'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"nces/360007702877",
    +		"nces/062961004587"
    +	],
    +	"property": "address"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"nces/062961004587\":{\"out\":[{\"provenanceId\":\"dc/mzy8we\",\"value\":\"780 Arastradero Rd., Palo Alto, California\"}]},\"nces/360007702877\":{\"out\":[{\"provenanceId\":\"dc/mzy8we\",\"value\":\"345 Chambers St, New York, New York\"}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "nces/062961004587": {
+      "out": [
+        {
+          "provenanceId": "dc/mzy8we",
+          "value": "780 Arastradero Rd., Palo Alto, California"
+        }
+      ]
+    },
+    "nces/360007702877": {
+      "out": [
+        {
+          "provenanceId": "dc/mzy8we",
+          "value": "345 Chambers St, New York, New York"
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 4: Retrieve a list of earthquake events in Madagascar.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=country%2FMDG&property=affectedPlace&valueType=EarthquakeEvent'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"country/MDG"
    +	],
    +	"property": "affectedPlace",
    +	"valueType": "EarthquakeEvent"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"country/MDG\":{\"in\":[{\"dcid\":\"earthquake/usp000jgbb\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp000h6zw\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp000gmuf\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp000fu24\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp000dckw\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0008vc6\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0007k9j\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0005gu9\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0004qn4\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0002kfd\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp00020ud\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0001ss5\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0001fcd\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp0000afz\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp00006yt\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usp00005zf\",\"name\":\"Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/usc000evr6\",\"name\":\"8km NW of Anakao, Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/us60003r15\",\"name\":\"50km ESE of Ambanja, Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]},{\"dcid\":\"earthquake/us200040me\",\"name\":\"25km W of Antalaha, Madagascar\",\"provenanceId\":\"dc/xz8ndk3\",\"types\":[\"EarthquakeEvent\"]}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "country/MDG": {
+      "in": [
+        {
+          "dcid": "earthquake/usp000jgbb",
+          "name": "Madagascar",
+          "provenanceId": "dc/xz8ndk3",
+          "types": [
+            "EarthquakeEvent"
+          ]
+        },
+        ...
+      ]
+    }
+  }
+}
+
+ +

Example 5: Retrieve just one cyclone event in India.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=country%2FIND&property=affectedPlace&valueType=CycloneEvent&limit=1'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"country/IND"
    +	],
    +	"property": "affectedPlace",
    +	"valueType": "CycloneEvent",
    +	"limit": 1
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"country/IND\":{\"in\":[{\"dcid\":\"cyclone/ibtracs_2019117N05088\",\"name\":\"Fani\",\"provenanceId\":\"dc/xwq0y5\",\"types\":[\"CycloneEvent\"]}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "country/IND": {
+      "in": [
+        {
+          "dcid": "cyclone/ibtracs_2019117N05088",
+          "name": "Fani",
+          "provenanceId": "dc/xwq0y5",
+          "types": [
+            "CycloneEvent"
+          ]
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 6: Retrieve the country in which Buenos Aires is located.

+ +

+ +

Figure 2. Relationship diagram for the property containedInPlace of the country Argentina. Note the directionality of the property containedInPlace: the API returns both nodes with direction in (Buenos Aires is containedInPlace of Argentina) and nodes with direction out (Argentina is containedInPlace of South America).

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/property-values?dcids=country/ARG&property=containedInPlace'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/property-values \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"country/ARG"
    +	],
    +	"property": "containedInPlace"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"wikidataId/Q1486\":{\"out\":[{\"dcid\":\"country/ARG\",\"name\":\"Argentina\",\"provenanceId\":\"dc/5n63hr1\",\"types\":[\"Country\"]}]}}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "wikidataId/Q1486": {
+      "out": [
+        {
+          "dcid": "country/ARG",
+          "name": "Argentina",
+          "provenanceId": "dc/5n63hr1",
+          "types": [
+            "Country"
+          ]
+        }
+      ]
+    }
+  }
+}
+
+ +

Error Responses

+ +

If your request is malformed in some way, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required arguments",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/query.html b/api/rest/query.html new file mode 100644 index 000000000..d4f298844 --- /dev/null +++ b/api/rest/query.html @@ -0,0 +1,1287 @@ + + + + + SPARQL - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Query the Data Commons knowledge graph using SPARQL

+ +

Returns the results of running a graph query on the Data Commons knowledge graph +using SPARQL. Note that Data Commons is only +able to support a limited subsection of SPARQL functionality at this time: specifically only the keywords ORDER BY, DISTINCT, and LIMIT.

+ +

General information about this endpoint

+ +

URL: /query

+ +

Methods available: POST

+ +

Required arguments:

+ +
    +
  • sparql: A SPARQL query string.
  • +
+ +

How to construct a request to the SPARQL query endpoint

+ +

Step 1: Assembling the information you will need

+ +

This endpoint makes it possible to query the Data Commons knowledge graph using SPARQL. SPARQL is a query language developed to retrieve data from RDF graph content on the web. It leverages the graph structure innate in the data it queries to return specific information to an end user.

+ +

Step 2: Creating the request

+ +

Since only the POST method is available for this endpoint, you will need to assemble the request in the form of a JSON object adhering to the following form:

+ +
{"sparql": "<query>"}
+
+ +

Here <query> denotes the SPARQL query string. For more information on assembling SPARQL queries, check out the Wikipedia page about SPARQL and the W3C specification information.

+ +
+

NOTE:

+
    +
  • In the query, each variable should have a typeOf condition, e.g. "?var typeOf City .".
  • +
+
+ +

What to expect in the response

+ +

A correct response will always look like this:

+ +
{
+  "header": [
+    <String>
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": <String>
+        }
+      ]
+    },
+    ...
+  ]
+}
+
+ +

The response contains two fields, header and rows, as well as a cell object.

+ +

NOTES:

+ +
    +
  • The value of header is an array of strings corresponding to the query +variables.
  • +
  • The value of rows is an array of row objects, with each containing a +cells object of an array of cells.
  • +
  • The cell object has a string field value corresponding to the queried +variable.
  • +
+ +

Example Requests and Responses

+ +

Example 1. Retrieve the name of the state associated with DCID geoId/06.

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl -X POST 'https://api.datacommons.org/query' \
    +-d '{"sparql": "SELECT ?name \
    +                WHERE { \
    +                  ?state typeOf State . \
    +                  ?state dcid geoId/06 . \
    +                  ?state name ?name \
    +                }"}'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
{
+  "header": [
+    "?name"
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "California"
+        }
+      ]
+    }
+  ]
+}
+
+ +

Example 2. Retrieve a list of ten biological specimens in reverse alphabetical order.

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/query \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"sparql": "SELECT ?name \
    +                WHERE { \
    +                  ?biologicalSpecimen typeOf BiologicalSpecimen . \
    +                  ?biologicalSpecimen name ?name
    +                }
    +                ORDER BY DESC(?name)
    +                LIMIT 10"
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + + +
+ +

Response

+ +
{
+  "header": [
+    "?name"
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "x Triticosecale"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    }
+  ]
+}
+
+ +

Example 3. Retrieve a list of GNI observations by country.

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/query \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "sparql": "SELECT ?observation ?place \
    +              WHERE { \
    +                ?observation typeOf StatVarObservation . \
    +                ?observation variableMeasured Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita . \
    +                ?observation observationAbout ?place . \
    +                ?place typeOf Country .\
    +              } \
    +              ORDER BY ASC (?place) \
    +              LIMIT 10"
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
{
+  "header": [
+    "?observation",
+    "?place"
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "dc/o/5h86g14fj2fr8"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/kg6pryqvbgd78"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/7gzjqhbwpekd6"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/fw0bk0ekyt94d"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/rksjr0spfsq83"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/7thj4d54jeb6h"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/pgym0z20p7v05"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/h1c0f24b48132"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/q86f2x7n069w7"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/wv0lv3mfgdvh4"
+        },
+        {
+          "value": "country/ABW"
+        }
+      ]
+    }
+  ]
+}
+
+ +

Example 4. Retrieve a sample list of observations with the unit InternationalDollar.

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/query \
    +  --header 'content-type: application/json' \
    +  --data '{
    +  "sparql": "SELECT ?observation \
    +             WHERE { \
    +               ?observation typeOf StatVarObservation . \
    +               ?observation unit InternationalDollar \
    +             } \
    +            LIMIT 10"
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
{
+  "header": [
+    "?observation"
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "dc/o/fyxy1y8s0g7n"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/xmvxcs7e22ycd"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/f2hrq42xh10sf"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/b8pb4n9qy3x3f"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/2klbr8pjf06m6"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/y1cmgcsdp2ywd"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/1ypyy54edxbv6"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/105gnls2e1ng9"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/y1z2jv1y644q5"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "dc/o/wqdjmf2vhgx75"
+        }
+      ]
+    }
+  ]
+}
+
+ +

Example 5. Retrieve a list of ten distinct yearly estimates of life expectancy for forty-seven-year-old Hungarians.

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/query \
    +  --header 'content-type: application/json' \
    +  --data '{
    +    "sparql": "SELECT DISTINCT ?LifeExpectancy \
    +              WHERE { \
    +                ?o typeOf StatVarObservation .\
    +                ?o variableMeasured LifeExpectancy_Person_47Years .\
    +                ?o observationAbout country/HUN .\
    +                ?o value ?LifeExpectancy
    +              }
    +              ORDER BY ASC(?LifeExpectancy)
    +              LIMIT 10"
    +  }'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
{
+  "header": [
+    "?LifeExpectancy"
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "26.4"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "26.5"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "26.7"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "26.8"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "26.9"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "27.2"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "27.4"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "27.5"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "28.1"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "28.3"
+        }
+      ]
+    }
+  ]
+}
+
+ +

Error Responses

+ +

If there are no values for your query, you won’t receive an error code. Instead, the endpoint will return only the headers you sent, with no accompanying value information.

+ +

If your JSON body is formatted improperly, you will receive a 400 error and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Node should be string, got [StatisticalPopulation ?o typeOf StatVarObservation] of type []string",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +

If your SPARQL query is constructed incorrectly, you will receive a 500 error and an error message like the following:

+ +
{
+  "code": 2,
+  "message": "googleapi: Error 400: Unrecognized name: count; Did you mean unit? at [1:389], invalidQuery",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/stat_all.html b/api/rest/stat_all.html new file mode 100644 index 000000000..37fea89b7 --- /dev/null +++ b/api/rest/stat_all.html @@ -0,0 +1,756 @@ + + + + + Place Statistics - All - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Get a collection of statistical data for one or more places

+ +

Returns a multiple level object containing all available time series for the specified +places and statistical variables. +Note that in Data Commons, a Statistical Variable is any type of statistical metric that can be measured at a place and +time. See the full list of StatisticalVariables.

+ +

General information about this endpoint

+ +

URL: /stat/all

+ +

Method: POST

+ +

Required arguments:

+ +
    +
  • +

    places: A list of Place DCIDs to query for. (Here DCID stands for Data Commons ID, the unique identifier assigned to all entities in Data Commons.)

    +
  • +
  • +

    stat_vars: A list of StatisticalVariable DCIDs.

    +
  • +
+ +

Example

+ +

Request

+ +
+ + +
    + +
  • +

    This endpoint does not support GET requests.

    + +
  • + +
  • +
    curl -X POST 'https://api.datacommons.org/stat/all' \
    +-d '{ "places": ["geoId/05", "geoId/06085"], "stat_vars": ["Count_Person_Male", "Count_Person_Female"]}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
{
+  "placeData": {
+    "geoId/05": {
+      "statVarData": {
+        "Count_Person_Male": {
+          "placeName": "Arkansas",
+          "sourceSeries": [
+            {
+              "val": {
+                "2002": 1323840,
+                "2008": 1410040,
+                ...
+                "2016": 1469240,
+                "2017": 1475420
+              },
+              "measurementMethod": "OECDRegionalStatistics",
+              "observationPeriod": "P1Y",
+              "importName": "OECDRegionalDemography",
+              "provenanceDomain": "oecd.org"
+            },
+            {
+              "val": {
+                "2012": 1431252,
+                "2013": 1439862,
+                ...
+                "2018": 1468412,
+                "2011": 1421287
+              },
+              "measurementMethod": "CensusACS5yrSurvey",
+              "importName": "CensusACS5YearSurvey",
+              "provenanceDomain": "census.gov"
+            }
+          ]
+        },
+        "Count_Person_Female": {
+          "placeName": "Arkansas",
+          "sourceSeries": [
+            {
+              "val": {
+                "2015": 1510240,
+                "2003": 1391910,
+                ...
+                "2007": 1450310,
+                "2013": 1501980
+              },
+              "measurementMethod": "OECDRegionalStatistics",
+              "observationPeriod": "P1Y",
+              "importName": "OECDRegionalDemography",
+              "provenanceDomain": "oecd.org"
+            },
+            {
+              "val": {
+                "2018": 1522259,
+                "2011": 1474641,
+                ...
+                "2016": 1511778,
+                "2017": 1516293
+              },
+              "measurementMethod": "CensusACS5yrSurvey",
+              "importName": "CensusACS5YearSurvey",
+              "provenanceDomain": "census.gov"
+            }
+          ]
+        }
+      }
+    },
+    "geoId/06085": {
+      "statVarData": {
+        "Count_Person_Male": {
+          "placeName": "Santa Clara County",
+          "sourceSeries": [
+            {
+              "val": {
+                "2017": 963317,
+                "2018": 970469,
+                ...
+                "2015": 939004,
+                "2016": 949223
+              },
+              "measurementMethod": "CensusACS5yrSurvey",
+              "importName": "CensusACS5YearSurvey",
+              "provenanceDomain": "census.gov"
+            }
+          ]
+        },
+        "Count_Person_Female": {
+          "placeName": "Santa Clara County",
+          "sourceSeries": [
+            {
+              "val": {
+                "2017": 947909,
+                "2018": 951731,
+                ...
+                "2015": 929145,
+                "2016": 935833
+              },
+              "measurementMethod": "CensusACS5yrSurvey",
+              "importName": "CensusACS5YearSurvey",
+              "provenanceDomain": "census.gov"
+            }
+          ]
+        }
+      }
+    }
+  }
+}
+
+ +

The top level field placeData is an object keyed by a Place dcid, with the value +being statVarData. The statVarData data is an object keyed by a Statistical +Variable dcid, with the object having the following fields:

+ +
    +
  • placeName: the name of the place.
  • +
  • sourceSeries: a list of time series data objects with the following fields +
      +
    • val: an object from date to statistical value.
    • +
    • importName: the import name of the observations.
    • +
    • provenanceDomain: the provenance domain of the observations.
    • +
    • measurementMethod: the measurement method of the observations, if it exists.
    • +
    • observationPeriod: the observation period of the observations, if it exists.
    • +
    • unit: the unit of the observations, if it exists.
    • +
    • scalingFactor: the scaling factor of the observations, if it exists.
    • +
    +
  • +
+ +

Error Response

+ +

Failure to specify the place in the request will result in an error response.

+ +

Request example:

+ +
curl -X POST 'https://api.datacommons.org/stat/all' \
+-d '{ "places": [], "stat_vars": ["Count_Person_Male", "Count_Person_Female"]}'
+
+ +

Response content example

+ +
{
+  "code": 3,
+  "message": "Missing required argument: places"
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/stat_series.html b/api/rest/stat_series.html new file mode 100644 index 000000000..856e530d2 --- /dev/null +++ b/api/rest/stat_series.html @@ -0,0 +1,866 @@ + + + + + Place Statistics - Time Series - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Get statistical time series for a place

+ +

Returns a time series of statistical values for a place based on a +StatisticalVariable. +See the full list of StatisticalVariables.

+ +

When there are multiple sources for the same statistical variable, a prefered +source with more recent or more authorative data is selected.

+ +

General information about this endpoint

+ +

URL: /stat/series

+ +

Methods available: GET

+ +

Required arguments:

+ + + +

Optional arguments:

+ + + +

How to construct a request to the place statistics time series endpoint

+ +

Step 1: Assembling the information you will need

+ +
+

NOTE:

+ +

Specifying arguments that do not exist for the target place and variable will result in an empty response.

+
+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.
  • +
  • stat_var: The statistical variable whose value you are interested in.
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    measurement_method: The technique used for measuring a statistical variable.

    +
  • +
  • +

    observation_period: The time period over which an observation is made.

    +
  • +
  • +

    unit: The unit of measurement.

    +
  • +
  • +

    scaling_factor: Property of statistical variables indicating factor by which a measurement is multiplied to fit a certain format.

    +
  • +
+ +

Step 2: Creating the request

+ +

Since only the GET method is available for this endpoint, you will need to assemble the request via query parameters in the URL.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+  "value": <number>
+}
+
+ +

Example requests and responses

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/series?place=geoId%2F06&stat_var=Count_Person_Male'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Example 2: Retrieve the number of people in Bosnia and Herzegovina as counted by the Bosnian census.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/series?place=country%2FBIH&stat_var=Count_Person&measurement_method=BosniaCensus'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 3: Retrieve the death count in Miami-Dade County over a period of one year.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/series?place=geoId%2F12086&stat_var=Count_Death&observation_period=P1Y'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 4: Retrieve the distribution of the drug naloxone in Miami-Dade County in grams.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/series?place=geoId%2F12086&stat_var=RetailDrugDistribution_DrugDistribution_Naloxone&unit=Grams'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 5: Retrieve the percentage of nominal GDP spent by the government of the Gambia on education.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/series?place=country%2FGMB&stat_var=Amount_EconomicActivity_ExpenditureActivity_EducationExpenditure_Government_AsFractionOf_Amount_EconomicActivity_GrossDomesticProduction_Nominal&scalingFactor=100.0000000000'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Error Responses

+ +

If your request does not include a required argument, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required argument: stat_var",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+

If your request includes a bad argument, you will receive a 404 status code and an error message like the following:

+ +
{
+  "code": 5,
+  "message": "No statistical variable found for CountPerson_Male",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/stat_value.html b/api/rest/stat_value.html new file mode 100644 index 000000000..716913526 --- /dev/null +++ b/api/rest/stat_value.html @@ -0,0 +1,908 @@ + + + + + Place Statistics - Single Value - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve a statistical value for a place

+ +

Returns a statistical value for a place based on the +StatisticalVariable. +See the full list of StatisticalVariables.

+ +

When there are multiple sources for the same statistical variable, a prefered +source with more recent data or more authority is selected.

+ +

General information about this endpoint

+ +

URL: /stat/value

+ +

Methods available: GET

+ +

Required arguments:

+ + + +

You can find a list of StatisticalVariables with human-readable names within this documentation.

+ +

Optional arguments:

+ +
    +
  • date: The preferred date of observation in ISO 8601 format. If not specified, returns the latest observation.
  • +
  • measurement_method: The DCID of the preferred measurementMethod value.
  • +
  • observation_period: The preferred observationPeriod value.
  • +
  • unit: The DCID of the preferred unit value.
  • +
  • scaling_factor: The preferred scalingFactor value.
  • +
+ +

How to construct a request to the place statistics value endpoint

+ +

Step 1: Assembling the information you will need

+ +

Going into more detail on how to assemble the values for the required arguments:

+ +
    +
  • place: For this parameter, you will need to specify the DCID (the unique ID assigned by Data Commons to each node in the graph) of the place you are interested in.
  • +
  • stat_var: The statistical variable whose value you are interested in.
  • +
+ +

In addition to these required properties, this endpoint also allows for other, optional arguments. Here are helpful arguments in regular use by Data Commons developers:

+ +
    +
  • +

    date: Specified in ISO 8601 format. Examples include 2011 (the year 2011), 2019-06 (the month of June in the year 2019), and 2019-06-05T17:21:00-06:00 (5:17PM on June 5, 2019, in CST).

    +
  • +
  • +

    measurement_method: The technique used for measuring a statistical variable.

    +
  • +
  • +

    observation_period: The time period over which an observation is made.

    +
  • +
  • +

    unit: The unit of measurement.

    +
  • +
  • +

    scaling_factor: Property of statistical variables indicating factor by which a measurement is multiplied to fit a certain format.

    +
  • +
+ +

Step 2: Creating the request

+ +

Since only the GET method is available for this endpoint, you will need to assemble the request via query parameters in the URL.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+  "value": integer
+}
+
+ +

Example requests and responses

+ +

Example 1: Retrieve the count of men in the state of California.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=geoId/06&stat_var=Count_Person_Male'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 2: Retrieve the count of robberies in the state of Georgia in the year 2011.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=geoId/13&stat_var=Count_CriminalActivities_Robbery&date=2011'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 3: Retrieve the number of people in Bosnia and Herzegovina as counted by the Bosnian census.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=country/BIH&stat_var=Count_Person&measurement_method=BosniaCensus'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 4: Retrieve the death count in Miami-Dade County over a period of one year.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=geoId/12086&stat_var=Count_Death&observation_period=P1Y'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 5: Retrieve the distrubtion of the drug naloxone in Miami-Dade County in grams.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=geoId/12086&stat_var=RetailDrugDistribution_DrugDistribution_Naloxone&unit=Grams'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Example 6: Retrieve the percentage of nominal GDP spent by the government of the Gambia on education.

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/stat/value?place=country/GMB&stat_var=Amount_EconomicActivity_ExpenditureActivity_EducationExpenditure_Government_AsFractionOf_Amount_EconomicActivity_GrossDomesticProduction_Nominal&scalingFactor=100.0000000000'
    +
    + +
  • + +
  • +

    This endpoint does not support POST requests.

    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Error Responses

+ +

If your request does not include a required argument, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required argument: stat_var",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+

If your request includes a bad argument, you will receive a 404 status code and an error message like the following:

+ +
{
+  "code": 5,
+  "message": "No statistical variable found for CountPerson_Male",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/triple.html b/api/rest/triple.html new file mode 100644 index 000000000..f7c05aa19 --- /dev/null +++ b/api/rest/triple.html @@ -0,0 +1,1046 @@ + + + + + Triple - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve triples associated with nodes

+ +

Given a list of nodes, return triples which are associated with the specified +node(s).

+ +

A knowledge graph can be described as a collection of triples which are +3-tuples that take the form (s, p, o). Here, s and o are nodes in the +graph called the subject and object respectively, while p is the property +label of a directed edge from s to o (sometimes also called the predicate).

+ +

General information about this endpoint

+ +

URL: /node/triples

+ +

Methods available: GET, POST

+ +

Required arguments:

+ +
    +
  • dcids: A list of nodes to query, identified by their DCID.
  • +
+ +

Optional arguments:

+ +
    +
  • limit: The maximum number of triples per combination of property and type +associated with nodes linked by that property to fetch, up to 500.
  • +
+ +

How to construct a request to the triples endpoint

+ +

Step 1: assembling the information you will need

+ +

This endpoint requires the argument dcids, which are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the nodes of interest.

+ +

In addition to this required property, this endpoint also allows you to specify a limit on how many triples (up to 500) you would like to see in the response.

+ +

Step 2: creating the request

+ +

When actually putting together your request, you can choose from two options. If you intend to query only a small number of DCIDs, you may want to use the simpler formatting offered by the GET method. For larger numbers of DCIDs, or if you prefer to utilize a static URL, a POST request likely makes more sense. To use it, make a POST request against the main endpoint while changing the fields of the JSON body it sends.

+ +

What to expect in the response

+ +

Your response will always look like this:

+ +
{
+    "payload": "<payload string>",
+}
+
+ +

Here “" is a long encoded JSON string, whose structure changes depending on whether the response contains node references. You can run JSON.parse() on the payload field to retrieve the data. For example, in JavaScript: `var data = JSON.parse(response['payload'])`.

+ +

When decoded, the response adheres to this structure:

+ +
{
+    "<dcid>": {
+        <Triples>
+    },
+    ...
+}
+
+ +

While all triples contain subjects, predicates, and objects, those entities may be specified using any of a few possible fields. Here are possible keys that you may find associated to triples in the JSON response:

+ +
    +
  • SubjectID
  • +
  • SubjectName
  • +
  • SubjectTypes
  • +
  • Predicate
  • +
  • ObjectID
  • +
  • ObjectName
  • +
  • ObjectValue
  • +
  • ObjectTypes
  • +
  • ProvenanceID
  • +
+ +

Example requests and responses

+ +

Example 1: Retrieve triples associated with squareMeter 1238495 (a land tract in southern Florida).

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/triples?dcids=SquareMeter1238495'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/triples \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"SquareMeter1238495"
    +	]
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"SquareMeter1238495\":[{\"subjectId\":\"SquareMeter1238495\",\"predicate\":\"value\",\"objectValue\":\"1238495\",\"provenanceId\":\"dc/sm3m2w3\"},{\"subjectId\":\"SquareMeter1238495\",\"predicate\":\"unitOfMeasure\",\"objectId\":\"SquareMeter\",\"provenanceId\":\"dc/sm3m2w3\"},{\"subjectId\":\"SquareMeter1238495\",\"predicate\":\"typeOf\",\"objectId\":\"Quantity\",\"objectName\":\"Quantity\",\"objectTypes\":[\"Class\"],\"provenanceId\":\"dc/sm3m2w3\"},{\"subjectId\":\"SquareMeter1238495\",\"predicate\":\"provenance\",\"objectId\":\"dc/sm3m2w3\",\"objectName\":\"https://www.census.gov/geographies/reference-files.html\",\"objectTypes\":[\"Provenance\"],\"provenanceId\":\"dc/sm3m2w3\"},{\"subjectId\":\"SquareMeter1238495\",\"predicate\":\"name\",\"objectValue\":\"SquareMeter 1238495\",\"provenanceId\":\"dc/sm3m2w3\"},{\"subjectId\":\"geoId/12086008906\",\"subjectName\":\"Census Tract 89.06, Miami-Dade County, Florida\",\"subjectTypes\":[\"CensusTract\"],\"predicate\":\"landArea\",\"objectId\":\"SquareMeter1238495\",\"objectName\":\"SquareMeter 1238495\",\"objectTypes\":[\"Quantity\"],\"provenanceId\":\"dc/sm3m2w3\"}]}"
+}
+
+ +
Parsed and prettified
+ +
{
+  "payload": {
+    "SquareMeter1238495": [
+      {
+        "subjectId": "SquareMeter1238495",
+        "predicate": "value",
+        "objectValue": "1238495",
+        "provenanceId": "dc/sm3m2w3"
+      },
+      {
+        "subjectId": "SquareMeter1238495",
+        "predicate": "unitOfMeasure",
+        "objectId": "SquareMeter",
+        "provenanceId": "dc/sm3m2w3"
+      },
+      {
+        "subjectId": "SquareMeter1238495",
+        "predicate": "typeOf",
+        "objectId": "Quantity",
+        "objectName": "Quantity",
+        "objectTypes": [
+          "Class"
+        ],
+        "provenanceId": "dc/sm3m2w3"
+      },
+      {
+        "subjectId": "SquareMeter1238495",
+        "predicate": "provenance",
+        "objectId": "dc/sm3m2w3",
+        "objectName": "https://www.census.gov/geographies/reference-files.html",
+        "objectTypes": [
+          "Provenance"
+        ],
+        "provenanceId": "dc/sm3m2w3"
+      },
+      {
+        "subjectId": "SquareMeter1238495",
+        "predicate": "name",
+        "objectValue": "SquareMeter 1238495",
+        "provenanceId": "dc/sm3m2w3"
+      },
+      {
+        "subjectId": "geoId/12086008906",
+        "subjectName": "Census Tract 89.06, Miami-Dade County, Florida",
+        "subjectTypes": [
+          "CensusTract"
+        ],
+        "predicate": "landArea",
+        "objectId": "SquareMeter1238495",
+        "objectName": "SquareMeter 1238495",
+        "objectTypes": [
+          "Quantity"
+        ],
+        "provenanceId": "dc/sm3m2w3"
+      }
+    ]
+  }
+}
+
+ +

Example 2: Retrieve the triples associated with two American biological research labs

+ +
+ + +
    + +
  • +
    curl --request GET \
    +  --url 'https://api.datacommons.org/node/triples?dcids=dc%2F02qyghln81jr4&dcids=dc%2F1jrmkql8dprv9'
    +
    + +
  • + +
  • +
    curl --request POST \
    +  --url https://api.datacommons.org/node/triples \
    +  --header 'content-type: application/json' \
    +  --data '{
    +	"dcids": [
    +		"dc/02qyghln81jr4",
    +		"dc/1jrmkql8dprv9"
    +	]
    +}'
    +
    + +
  • + +
  • + + +
  • + +
+ + + +
+ +

Response

+ +
Raw
+ +
{
+  "payload": "{\"dc/02qyghln81jr4\":[{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"url\",\"objectValue\":\"https://www.hsph.harvard.edu/alkes-price/contact/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"typeOf\",\"objectId\":\"Lab\",\"objectName\":\"Lab\",\"objectTypes\":[\"Class\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"status\",\"objectValue\":\"current\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"state\",\"objectValue\":\"MA\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"sameAs\",\"objectValue\":\"https://www.encodeproject.org/labs/alkes-price/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"provenance\",\"objectId\":\"dc/h2lkz1\",\"objectName\":\"https://www.encodeproject.org/\",\"objectTypes\":[\"Provenance\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"postalCode\",\"objectValue\":\"02115\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"pi\",\"objectValue\":\"https://www.encodeproject.org/users/bf09c1e0-52a5-4efb-acbd-88671257964d/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"phone1\",\"objectValue\":\"617-432-2262\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"name\",\"objectValue\":\"Alkes Price, Harvard\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"instituteName\",\"objectValue\":\"Harvard University\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"instituteLabel\",\"objectValue\":\"Harvard\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"encodeUUID\",\"objectValue\":\"312078ef-953b-4483-8df2-99f920237306\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"country\",\"objectValue\":\"USA\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"city\",\"objectValue\":\"Boston\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"awards\",\"objectValue\":\"https://www.encodeproject.org/awards/U01HG009379/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"address2\",\"objectValue\":\"Building 2, Room 211\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/02qyghln81jr4\",\"predicate\":\"address1\",\"objectValue\":\"665 Huntington Ave.\",\"provenanceId\":\"dc/h2lkz1\"}],\"dc/1jrmkql8dprv9\":[{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"typeOf\",\"objectId\":\"Lab\",\"objectName\":\"Lab\",\"objectTypes\":[\"Class\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"status\",\"objectValue\":\"current\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"sameAs\",\"objectValue\":\"https://www.encodeproject.org/labs/andrew-fire/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"provenance\",\"objectId\":\"dc/h2lkz1\",\"objectName\":\"https://www.encodeproject.org/\",\"objectTypes\":[\"Provenance\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"pi\",\"objectValue\":\"https://www.encodeproject.org/users/0db98457-a91e-4cde-b058-a0c972c008e3/\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"name\",\"objectValue\":\"Andrew Z. Fire, Stanford\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/jqclkhdw83dl5\",\"subjectTypes\":[\"EncodeBiosample\"],\"predicate\":\"lab\",\"objectId\":\"dc/1jrmkql8dprv9\",\"objectName\":\"Andrew Z. Fire, Stanford\",\"objectTypes\":[\"Lab\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/9pz5fgt9b947h\",\"subjectTypes\":[\"EncodeBiosample\"],\"predicate\":\"lab\",\"objectId\":\"dc/1jrmkql8dprv9\",\"objectName\":\"Andrew Z. Fire, Stanford\",\"objectTypes\":[\"Lab\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/8n2ybm28pe3fd\",\"subjectTypes\":[\"EncodeBiosample\"],\"predicate\":\"lab\",\"objectId\":\"dc/1jrmkql8dprv9\",\"objectName\":\"Andrew Z. Fire, Stanford\",\"objectTypes\":[\"Lab\"],\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"instituteName\",\"objectValue\":\"Stanford\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"encodeUUID\",\"objectValue\":\"db35b051-215c-4c1c-8e98-610d62d30def\",\"provenanceId\":\"dc/h2lkz1\"},{\"subjectId\":\"dc/1jrmkql8dprv9\",\"predicate\":\"awards\",\"objectValue\":\"https://www.encodeproject.org/awards/R01GM037706/\",\"provenanceId\":\"dc/h2lkz1\"}]}"
+}
+
+
Parsed and prettified
+ +
{
+  "payload": {
+    "dc/02qyghln81jr4": [
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "url",
+        "objectValue": "https://www.hsph.harvard.edu/alkes-price/contact/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "typeOf",
+        "objectId": "Lab",
+        "objectName": "Lab",
+        "objectTypes": [
+          "Class"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "status",
+        "objectValue": "current",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "state",
+        "objectValue": "MA",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "sameAs",
+        "objectValue": "https://www.encodeproject.org/labs/alkes-price/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "provenance",
+        "objectId": "dc/h2lkz1",
+        "objectName": "https://www.encodeproject.org/",
+        "objectTypes": [
+          "Provenance"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "postalCode",
+        "objectValue": "02115",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "pi",
+        "objectValue": "https://www.encodeproject.org/users/bf09c1e0-52a5-4efb-acbd-88671257964d/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "phone1",
+        "objectValue": "617-432-2262",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "name",
+        "objectValue": "Alkes Price, Harvard",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "instituteName",
+        "objectValue": "Harvard University",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "instituteLabel",
+        "objectValue": "Harvard",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "encodeUUID",
+        "objectValue": "312078ef-953b-4483-8df2-99f920237306",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "country",
+        "objectValue": "USA",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "city",
+        "objectValue": "Boston",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "awards",
+        "objectValue": "https://www.encodeproject.org/awards/U01HG009379/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "address2",
+        "objectValue": "Building 2, Room 211",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/02qyghln81jr4",
+        "predicate": "address1",
+        "objectValue": "665 Huntington Ave.",
+        "provenanceId": "dc/h2lkz1"
+      }
+    ],
+    "dc/1jrmkql8dprv9": [
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "typeOf",
+        "objectId": "Lab",
+        "objectName": "Lab",
+        "objectTypes": [
+          "Class"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "status",
+        "objectValue": "current",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "sameAs",
+        "objectValue": "https://www.encodeproject.org/labs/andrew-fire/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "provenance",
+        "objectId": "dc/h2lkz1",
+        "objectName": "https://www.encodeproject.org/",
+        "objectTypes": [
+          "Provenance"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "pi",
+        "objectValue": "https://www.encodeproject.org/users/0db98457-a91e-4cde-b058-a0c972c008e3/",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "name",
+        "objectValue": "Andrew Z. Fire, Stanford",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/jqclkhdw83dl5",
+        "subjectTypes": [
+          "EncodeBiosample"
+        ],
+        "predicate": "lab",
+        "objectId": "dc/1jrmkql8dprv9",
+        "objectName": "Andrew Z. Fire, Stanford",
+        "objectTypes": [
+          "Lab"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/9pz5fgt9b947h",
+        "subjectTypes": [
+          "EncodeBiosample"
+        ],
+        "predicate": "lab",
+        "objectId": "dc/1jrmkql8dprv9",
+        "objectName": "Andrew Z. Fire, Stanford",
+        "objectTypes": [
+          "Lab"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/8n2ybm28pe3fd",
+        "subjectTypes": [
+          "EncodeBiosample"
+        ],
+        "predicate": "lab",
+        "objectId": "dc/1jrmkql8dprv9",
+        "objectName": "Andrew Z. Fire, Stanford",
+        "objectTypes": [
+          "Lab"
+        ],
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "instituteName",
+        "objectValue": "Stanford",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "encodeUUID",
+        "objectValue": "db35b051-215c-4c1c-8e98-610d62d30def",
+        "provenanceId": "dc/h2lkz1"
+      },
+      {
+        "subjectId": "dc/1jrmkql8dprv9",
+        "predicate": "awards",
+        "objectValue": "https://www.encodeproject.org/awards/R01GM037706/",
+        "provenanceId": "dc/h2lkz1"
+      }
+    ]
+  }
+}
+
+ +

Error Responses

+ +

In general, if your request is malformed in some way, you will receive a 400 status code and an error message like the following:

+ +
{
+  "code": 3,
+  "message": "Missing required arguments: dcids",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1.html b/api/rest/v1.html new file mode 100644 index 000000000..27e54aa6d --- /dev/null +++ b/api/rest/v1.html @@ -0,0 +1,785 @@ + + + + + REST (v1) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +
+

NOTE: The Data Commons V1 REST API is deprecated. Please use the V2 REST API.

+
+ +

Data Commons V1 REST API

+ +

The Data Commons REST API is a +REST library +that enables developers to programmatically access data in the Data Commons +knowledge graph. This package allows users to explore the structure of the +graph, integrate statistics from the graph into data analysis applications and +much more.

+ +

Getting Started

+ +

First time using the Data Commons API, or just need a refresher? Take a look at +our Getting Started Guide.

+ +

Service Endpoints

+ +

The base URL for all endpoints below is:

+ +
https://api.datacommons.org
+
+ +

Simple vs Bulk Query

+ +

Some APIs have a bulk version, designed for handling multiple queries at a time, +with more detailed output. Bulk endpoints are tagged with bulk below.

+ +

Local Graph Exploration

+ +

Methods for exploring the graph around a set of nodes.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
APIURIDescription
Triples/v1/triplesGet neighboring nodes and property labels of directed edges of a specific node
Properties/v1/propertiesGet all properties (labels of directed edges) available for a specific node
Property Values/v1/property/values/Get the value for a property of a specific node
Property Values (linked)/v1/property/values/in/linkedGet all places of a specific type contained in an ancestor place
   
bulk Triples/v1/bulk/triplesGet neighboring nodes and edge labels for multiple nodes
bulk Properties/v1/bulk/propertiesGet all properties for multiple nodes.
bulk Property values/v1/bulk/property/valuesGet property values for multiple properties and multiple nodes
bulk Property Values (linked)/v1/bulk/property/values/in/linkedGet all places of a specific type for mulitple ancestor places
+ +

Node Information

+ +

Methods for retrieving information of certain types of nodes.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
APIURIDescription
Find Entities/v1/find/entitiesFind the DCID of an entity
Place Info/v1/info/placeGet information about a place
Variable Info/v1/info/variableGet information about a variable
Variable Group Info/v1/info/variable-groupGet information about a variable group
   
bulk Find Entities/v1/bulk/find/entitiesFind the DCID of an entity
bulk Place Info/v1/bulk/info/placeGet information about multiple places
bulk Variable Info/v1/bulk/info/variableGet information about multiple variables
bulk Variable Group Info/v1/bulk/info/variable-groupGet information about multiple variable groups
+ +

Statistical Observations

+ +

Methods for retrieving statistical observations associated with a set of +entities.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
APIURIDescription
Observation (single value)/v1/observations/pointGet a single value from a time-series variable for a specific entity
Observation (series)/v1/observations/seriesGet all values from a variable for a specific entity
   
bulk Observation (single value)/v1/bulk/observations/pointGet a single value from variables for multiple entities
bulk Observation (single value, linked)/v1/bulk/observations/point/linkedGet a single value from variables for all places in an ancestor place
bulk Observation (series)/v1/bulk/observations/seriesGet all values from variables for multiple entities
bulk Observation (series, linked)/v1/bulk/observations/series/linkedGet all values from a variable for all places in an ancestor place
+ +

Statistical Variable

+ +

Methods for retrieving statistical variable related data.

+ + + + + + + + + + + + + + + + + + + + + +
APIURIDescription
Variables/v1/variablesGet all variables associated with a specific entity
bulk Variables/v1/bulk/variablesGet all variables available for multiple entities
+ +

Graph Query

+ +

Methods for querying the Data Commons knowledge graph with SPARQL.

+ + + + + + + + + + + + + + + + +
APIURIDescription
SPARQL/v1/queryUse SPARQL queries
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/find/entities.html b/api/rest/v1/bulk/find/entities.html new file mode 100644 index 000000000..e8cd961db --- /dev/null +++ b/api/rest/v1/bulk/find/entities.html @@ -0,0 +1,735 @@ + + + + + Find Entities - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/find/entities

+ +

Find the DCIDs of multiple entities.

+ +

Given the description of an entity, this endpoint searches for an entry in the Data Commons knowledge graph and returns the DCIDs of matches. For example, you could query for “San Francisco, CA” or “San Francisco” to find that its DCID is geoId/0667000. You can also provide the type of entity (country, city, state, etc.) to disambiguate (Georgia the country vs. Georgia the US state). If multiple DCIDs are returned, the first is the most likely best match given the available info.

+ + + + + + + +

Request

+ +

POST Request

+ +
+URL: +https://api.datacommons.org/v1/bulk/find/entities + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "entities": [ + { + "description": "{entity_name_1}", + "type": "{entity_type_1}" + }, + { + "description": "{entity_name_2}", + "type": "{entity_type_2}" + }, + ... + ] +} +
+ + +

Path Parameters

+ +

There are no path parameters for this end point.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
description
Required
stringDescription of the entity. Typically the name of the place.
type
Optional
stringThe type of entity, specified as a DCID. Common values are “Country”, “State”, “County”, “City”.
+ +

Response

+ +

The response looks like:

+ +
{
+  "entities": [
+    {
+      "description":"Description provided 1",
+      "type":"Type provided 1",
+      "dcids":["DCID 1"]
+    },
+    {
+      "description":"Description provided 2",
+      "type":"Type provided 2",
+      "dcids":["DCID 2"]
+    },
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
descriptionstringThe description you provided.
typestringThe type of entity, if provided.
dcidslistDCIDs matching the description you provided. If no matches are found, this field will not be returned.
+ +

Examples

+ +

Example 1: Find the DCID of places, with and without the type field

+ +

This queries for the DCID of “Georgia” twice: once without specifying type, and once with. Notice that specifying “Georgia” without specifying type returned the DCID of the US state of Georgia. When including "type":"Country", the DCID of the country of Georgia is returned.

+ +

Request:

+ +
curl -X POST \
+--url 'https://api.datacommons.org/v1/bulk/find/entities' \
+--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
+--data '{"entities": [{"description": "Georgia"}, {"description": "Georgia", "type":"Country"}]}'
+
+ +

Response:

+ +
{
+  "entities":[
+    {
+      "description":"Georgia",
+      "dcids":["geoId/13"]
+    },
+    {
+      "description":"Georgia",
+      "type":"Country",
+      "dcids":["country/GEO"]
+    }
+  ]
+}
+
+
+ +

Example 2: Find the DCID of places, using different descriptions

+ +

This queries for the DCIDs of “London”, “London, ON” and “London, UK”. Notice how including “ON” or “UK” in the description helps disambiguate.

+ +

Request:

+ +
curl -X POST \
+--url 'https://api.datacommons.org/v1/bulk/find/entities' \
+--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
+--data '{"entities":[{"description": "London"},{"description": "London, ON"},{"description": "London, UK"}]}'
+
+ +

Response:

+ +
{
+  "entities":[
+    {
+      "description":"London",
+      "dcids":["nuts/UKI"]
+    },
+    {
+      "description":"London, ON",
+      "dcids":["wikidataId/Q92561"]
+    },
+    {
+      "description":"London, UK",
+      "dcids":["nuts/UKI"]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/info/place.html b/api/rest/v1/bulk/info/place.html new file mode 100644 index 000000000..f936fa4c3 --- /dev/null +++ b/api/rest/v1/bulk/info/place.html @@ -0,0 +1,809 @@ + + + + + Place Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/info/place

+ +

Get basic information about multiple places.

+ +

This API returns basic information on multiple places, given each of their DCIDs. The information provided is per place, and includes the place’s name, type (city, state, country, etc.), as well as information on all parent places that contain the place queried.

+ + + + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/info/place?nodes={place_dcid_1}&nodes={place_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/info/place + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "nodes": [ + "{place_dcid_1}", + "{place_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

This endpoint has no path parameters.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API Key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
stringDCIDs of the places to query information for.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "place_dcid_1",
+      "info":
+      {
+        "self":
+        {
+          "dcid": "place_dcid_1",
+          "name": "Place Name",
+          "type": "City/State/Country/Etc"
+        },
+        "parents":
+        [
+          {
+            "dcid": "Containing Place DCID",
+            "name": "Containing Place Name",
+            "type": "City/State/Country/Etc"
+          }, ...
+        ]
+      }
+    },
+    {
+      "node": "place_dcid_2",
+      "info": {...}
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the places queried.
infoobjectInformation about the place queried. Includes the name and type (city, state, country, etc.) of the place, as well as those of all “parent” places that contain the place queried (e.g. North America is a parent place of the United States).
+ +

Examples

+ +

Example 1: Get information for multiple places

+ +

Get information on the US states of California (DCID: geoId/06) and Alaska (DCID: geoId/02).

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/info/place?nodes=geoId/06&nodes=geoId/06&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/info/place \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["geoId/06", "geoId/02"]}'
    +
    + +
  • + +
+ +
+ +

Response:

+
{
+  "data":
+  [
+    {
+      "node": "geoId/06",
+      "info":
+      {
+        "self":
+        {
+          "dcid": "geoId/06",
+          "name": "California",
+          "type": "State"
+        },
+        "parents":
+        [
+          {
+            "dcid": "usc/PacificDivision",
+            "name": "Pacific Division",
+            "type": "CensusDivision"
+          },
+          {
+            "dcid": "country/USA",
+            "name": "United States",
+            "type": "Country"
+          },
+          {
+            "dcid": "usc/WestRegion",
+            "name": "West Region"
+          },
+          {
+            "dcid": "northamerica",
+            "name": "North America",
+            "type": "Continent"
+          },
+          {
+            "dcid": "Earth",
+            "name": "Earth",
+            "type": "Place"
+          }
+        ]
+      }
+    },
+    {
+      "node": "geoId/02",
+      "info":
+      {
+        "self":
+        {
+          "dcid": "geoId/02",
+          "name": "Alaska",
+          "type": "State"
+        },
+        "parents":
+        [
+          {
+            "dcid": "usc/PacificDivision",
+            "name": "Pacific Division",
+            "type": "CensusDivision"
+          },
+          {
+            "dcid": "country/USA",
+            "name": "United States",
+            "type": "Country"
+          },
+          {
+            "dcid": "usc/WestRegion",
+            "name": "West Region"
+          },
+          {
+            "dcid": "northamerica",
+            "name": "North America",
+            "type": "Continent"
+          },
+          {
+            "dcid": "Earth",
+            "name": "Earth",
+            "type": "Place"
+          }
+        ]
+      }
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/info/variable-group.html b/api/rest/v1/bulk/info/variable-group.html new file mode 100644 index 000000000..931a02377 --- /dev/null +++ b/api/rest/v1/bulk/info/variable-group.html @@ -0,0 +1,755 @@ + + + + + Variable Group Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/info/variable-group

+ +

Get basic information about multiple variable groups.

+ +

This API returns basic information on muliple variable groups, given the variable groups’ +DCIDs. The information is provided per variable group, and includes the +display name, a list of child variables with their information, a list of child variable groups +with their information and the number of descendent variables. If variable groups DCIDs are not provided, then +all the variable group information will be retrieved.

+ + + + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/info/variable-group?nodes={variable_group_dcid_1}&nodes={variable_group_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/info/variable-group + +Header: +X-API-Key: {your_api_key} + +JSON Data: + +```json +{ + "nodes": + [ + "{variable_group_dcid_1}", + "{variable_group_dcid_2}", + ... + ] +} +``` + +
+ + + + + +

Path Parameters

+ +

This endpoint has no path parameters.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Optional
stringDCIDs of the variable groups to query information for.
constrained_entities
Optional
Repeated stringDCIDs of entities to filter by. If provided, the results will be filtered to only include the queried variable group’s descendent variables that have data for the queried entities.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "dcid1",
+      "info": {
+        "absoluteName": "variable group name",
+        "childStatVars": [
+          {
+            "id": "variable_id",
+            "displayName": "variable_name",
+            "searchNames": [
+              "search name"
+            ],
+            "definition": "variable_definition",
+            "hasData": true
+          },
+          ...
+        ],
+        "childStatVarGroups": [
+          {
+            "id": "child_variable_group_id",
+            "specializedEntity": "property name",
+            "displayName": "variable_name",
+            "descendentStatVarCount": 20
+          },
+          ...
+        ],
+        "descendentStatVarCount": 100,
+        "parentStatVarGroups": [
+          "parent_group_id"
+        ]
+      }
+    },
+    {
+      "node": "dcid2",
+      "info": {...}
+    },
+    ...
+  ]
+
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the variable group queried.
infoobjectInformation about the variable group queried. Includes child variables and variable group information, number of descendent variables and all the parent variable groups.
+ +

Examples

+ +

Example 1: Get information for all variable groups in Data Commons

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/bulk/info/variable-group?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "dc/g/Person_Gender-Female",
+      "info": {
+        "absoluteName": "Person With Gender = Female",
+        "childStatVars": [
+          {
+            "id": "LifeExpectancy_Person_Female",
+            "displayName": "Life expectancy at birth, female (years)",
+            "searchNames": [
+              "Life Expectancy of Person With Gender is Female"
+            ],
+            "definition": "mp=lifeExpectancy,pt=Person,gender=Female",
+            "hasData": true
+          },
+          ...
+        ],
+        "childStatVarGroups": [
+          {
+            "id": "dc/g/Person_ActivityDuration_Gender-Female",
+            "specializedEntity": "Activity Duration",
+            "displayName": "Person With Activity Duration, Gender = Female",
+            "descendentStatVarCount": 101
+          },
+          ...
+        ],
+        "descendentStatVarCount": 8949,
+        "parentStatVarGroups": [
+          "dc/g/Person_Gender"
+        ]
+      }
+    }
+    ...
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/info/variable.html b/api/rest/v1/bulk/info/variable.html new file mode 100644 index 000000000..8b6a54cf1 --- /dev/null +++ b/api/rest/v1/bulk/info/variable.html @@ -0,0 +1,1019 @@ + + + + + Variable Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/info/variable

+ +

Get basic information about multiple +variables.

+ +

This API returns basic information on multiple variables, given each of their +DCIDs. The information is provided per +variable, and includes the number of entities with data on each variable, the +minimum and maximum values observed, and the name and DCID of the top 3 entities +with highest observed values for each variable.

+ + + + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/info/variable?nodes={variable_dcid_1}&nodes={variable_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/info/variable + +Header: +X-API-Key: {your_api_key} + +JSON Data: + +```json +{ + "nodes": + [ + "{variable_dcid_1}", + "{variable_dcid_2}", + ... + ] +} +``` + +
+ + + + + +

Path Parameters

+ +

This endpoint has no path parameters.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API Key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
stringDCIDs of the variables to query information for.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "Variable_1_DCID",
+      "info":
+      {
+        "placeTypeSummary":
+        {
+          "County/City/State/Etc":
+          {
+            "topPlaces":
+            [
+              {
+                "dcid": "Place DCID",
+                "name": "Place Name"
+              },
+              {
+                "dcid": "Place DCID",
+                "name": "Place Name"
+              },
+              {
+                "dcid": "Place DCID",
+                "name": "Place Name"
+              }
+            ],
+            "placeCount": 123,
+            "minValue": 1,
+            "maxValue": 12345
+          }, ...
+          "provenanceSummary":
+          {
+            "DCID":
+            {
+              "importName": "Import_Name",
+              "releaseFrequency": "P<N>Y",
+              "seriesSummary":
+              [
+                {
+                  "seriesKey":
+                  {
+                    "observationPeriod": "P<N>Y"
+                  },
+                  "earliestDate": "YYYY-MM-DD",
+                  "latestDate": "YYYY-MM-DD",
+                  "placeTypeSummary":
+                  {
+                    "Country/State/City/Etc":
+                    {
+                      "topPlaces":
+                      [
+                        {
+                          "dcid": "Place DCID",
+                          "name": "Place Name"
+                        }
+                      ],
+                      "placeCount": 123,
+                      "minValue": 1,
+                      "maxValue": 123456
+                    }, ...
+                    "minValue": 1,
+                    "maxValue": 123456,
+                    "observationCount": 123,
+                    "timeSeriesCount": 123
+                  }
+                }, ...
+              ],
+              "observationCount": 123,
+              "timeSeriesCount": 123
+            }
+          }
+        }
+      },
+    },
+    {
+      "node": "Variable_2_DCID",
+      "info": {...}
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the variable queried.
infoobjectInformation about the variable queried. Includes maximum and minimum values, and number of places with data on the variable queried, grouped by place type (country-level, state-level, city-level, etc. statistics are grouped together). Also includes information about the provenance of data for the variable queried.
+ +

Examples

+ +

Example 1: Get information for multiple variables

+ +

Get information on the variables for number of farms (DCID: Count_Farm) and +number of teachers (DCID: Count_Teacher).

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/info/variable?nodes=Count_Farm&nodes=Count_Teacher&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/info/variable \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["Count_Farm", "Count_Teacher"]}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "Count_Farm",
+      "info": {
+        "placeTypeSummary": {
+          "County": {
+            "topPlaces": [
+              {
+                "dcid": "geoId/06037",
+                "name": "Los Angeles County"
+              },
+              {
+                "dcid": "geoId/17031",
+                "name": "Cook County"
+              },
+              {
+                "dcid": "geoId/48201",
+                "name": "Harris County"
+              }
+            ],
+            "placeCount": 3076,
+            "minValue": 2,
+            "maxValue": 5551
+          },
+          "Country": {
+            "topPlaces": [
+              {
+                "dcid": "country/USA",
+                "name": "United States"
+              }
+            ],
+            "placeCount": 1,
+            "minValue": 2042220,
+            "maxValue": 2042220
+          },
+          "State": {
+            "topPlaces": [
+              {
+                "dcid": "geoId/06",
+                "name": "California"
+              },
+              {
+                "dcid": "geoId/48",
+                "name": "Texas"
+              },
+              {
+                "dcid": "geoId/12",
+                "name": "Florida"
+              }
+            ],
+            "placeCount": 50,
+            "minValue": 990,
+            "maxValue": 248416
+          }
+        },
+        "provenanceSummary": {
+          "dc/m02b5p": {
+            "importName": "USDA_AgricultureCensus",
+            "releaseFrequency": "P5Y",
+            "seriesSummary": [
+              {
+                "seriesKey": {
+                  "observationPeriod": "P5Y"
+                },
+                "earliestDate": "2017",
+                "latestDate": "2017",
+                "placeTypeSummary": {
+                  "Country": {
+                    "topPlaces": [
+                      {
+                        "dcid": "country/USA",
+                        "name": "United States"
+                      }
+                    ],
+                    "placeCount": 1,
+                    "minValue": 2042220,
+                    "maxValue": 2042220
+                  },
+                  "State": {
+                    "topPlaces": [
+                      {
+                        "dcid": "geoId/06",
+                        "name": "California"
+                      },
+                      {
+                        "dcid": "geoId/48",
+                        "name": "Texas"
+                      },
+                      {
+                        "dcid": "geoId/12",
+                        "name": "Florida"
+                      }
+                    ],
+                    "placeCount": 50,
+                    "minValue": 990,
+                    "maxValue": 248416
+                  },
+                  "County": {
+                    "topPlaces": [
+                      {
+                        "dcid": "geoId/06037",
+                        "name": "Los Angeles County"
+                      },
+                      {
+                        "dcid": "geoId/17031",
+                        "name": "Cook County"
+                      },
+                      {
+                        "dcid": "geoId/48201",
+                        "name": "Harris County"
+                      }
+                    ],
+                    "placeCount": 3076,
+                    "minValue": 2,
+                    "maxValue": 5551
+                  }
+                },
+                "minValue": 2,
+                "maxValue": 2042220,
+                "observationCount": 3127,
+                "timeSeriesCount": 3127
+              }
+            ],
+            "observationCount": 3127,
+            "timeSeriesCount": 3127
+          }
+        }
+      }
+    },
+    {
+      "node": "Count_Teacher",
+      "info": {
+        "placeTypeSummary": {
+          "SchoolDistrict": {
+            "topPlaces": [
+              {
+                "dcid": "geoId/sch3620580",
+                "name": "New York City Department Of Education"
+              },
+              {
+                "dcid": "geoId/sch0622710",
+                "name": "Los Angeles Unified"
+              },
+              {
+                "dcid": "geoId/sch1709930",
+                "name": "Chicago Public School District 299"
+              }
+            ],
+            "placeCount": 18952,
+            "maxValue": 28769.06
+          },
+          "School": {
+            "topPlaces": [
+              {
+                "dcid": "nces/568025400549"
+              },
+              {
+                "dcid": "nces/568025300548",
+                "name": "Wyoming Behavioral Institute"
+              },
+              {
+                "dcid": "nces/568025200350",
+                "name": "Youth Emergency Services Inc."
+              }
+            ],
+            "placeCount": 102977,
+            "maxValue": 1702
+          }
+        },
+        "provenanceSummary": {
+          "dc/mzy8we": {
+            "importName": "K12",
+            "releaseFrequency": "P1Y",
+            "seriesSummary": [
+              {
+                "seriesKey": {},
+                "earliestDate": "2011",
+                "latestDate": "2016",
+                "placeTypeSummary": {
+                  "SchoolDistrict": {
+                    "topPlaces": [
+                      {
+                        "dcid": "geoId/sch3620580",
+                        "name": "New York City Department Of Education"
+                      },
+                      {
+                        "dcid": "geoId/sch0622710",
+                        "name": "Los Angeles Unified"
+                      },
+                      {
+                        "dcid": "geoId/sch1709930",
+                        "name": "Chicago Public School District 299"
+                      }
+                    ],
+                    "placeCount": 18952,
+                    "maxValue": 28769.06
+                  },
+                  "School": {
+                    "topPlaces": [
+                      {
+                        "dcid": "nces/568025400549"
+                      },
+                      {
+                        "dcid": "nces/568025300548",
+                        "name": "Wyoming Behavioral Institute"
+                      },
+                      {
+                        "dcid": "nces/568025200350",
+                        "name": "Youth Emergency Services Inc."
+                      }
+                    ],
+                    "placeCount": 102977,
+                    "maxValue": 1702
+                  }
+                },
+                "maxValue": 28769.06,
+                "observationCount": 618283,
+                "timeSeriesCount": 121929
+              }
+            ],
+            "observationCount": 618283,
+            "timeSeriesCount": 121929
+          }
+        }
+      }
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/observations/point.html b/api/rest/v1/bulk/observations/point.html new file mode 100644 index 000000000..2b5b74ef9 --- /dev/null +++ b/api/rest/v1/bulk/observations/point.html @@ -0,0 +1,973 @@ + + + + + Single Observation - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/observations/point

+ +

Retrieve a specific observation at a set date from multiple variables for multiple entities.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/observations/point?entities={entity_dcid_1}&entities={entity_dcid_2}&variables={variable_dcid_1}&variables={variable_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/observations/point + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "entities": [ + "{entity_dcid_1}", + "{entity_dcid_2}", + ... + ], + "variables": [ + "{variable_dcid_1}", + "{variable_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
entities
Required
Repeated stringDCIDs of the entities the variables describe.
variables
Required
Repeated stringDCIDs of the variables to query observations for.
date
Optional
stringDatetime of measurement of the value requested in ISO 8601 format. To see the dates available, look up the variable in the Statistical Variable Explorer. If date is not provided, the latest available datapoint is returned.
all_facets
Optional
BooleanWhether to return data from all facets available. If true, data from all facets available will be returned. If false, only data from the preferred facet will be returned. Defaults to false.
+ +

Response

+ +

The response looks like:

+ +
{
+  "observationsByVariable": [
+    {
+      "variable": "variable1_DCID",
+      "observationsByEntity": [
+        {
+          "entity": "entity1_DCID",
+          "pointsByFacet": [
+            {
+              "date": "YYYY",
+              "value": 1234,
+              "facet": 1234567890
+            }, ...
+          ]
+        },
+      ]
+    }
+  ],
+  "facets": {
+    "1234567890": {
+      "importName": "Import_name_string",
+      "provenanceUrl": "https://provenance.url",
+      "measurementMethod": "MeasurementMethod"
+    } ...     
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
observationsByVariablelistList of observations organized by variable. These are further organized by entity, and then by facet.
facetsobjectMetadata on the facet(s) the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get values for multiple variables and entities from the preferred facet at a set date

+ +

Get latest count of men (DCID: Count_Person_Male ) and count of women (DCID: Count_Person_Female ) for both California (DCID: geoId/06 ) and Texas (DCID: geoId/48 ) in 2019.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/observations/point?entities=geoId/06&entities=geoId/48&variables=Count_Person_Male&variables=Count_Person_Female&date=2019&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/observations/point \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"entities":["geoId/06", "geoId/48"], "variables":["Count_Person_Male", "Count_Person_Female"], "date":"2019"}'
    +
    + +
  • + +
+ +
+ +

Response:

+ +
{
+  "observationsByVariable": [
+    {
+      "variable": "Count_Person_Male",
+      "observationsByEntity": [
+        {
+          "entity": "geoId/06",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 19526298,
+              "facet": 1145703171
+            }
+          ]
+        },
+        {
+          "entity": "geoId/48",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 14034009,
+              "facet": 1145703171
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "variable": "Count_Person_Female",
+      "observationsByEntity": [
+        {
+          "entity": "geoId/06",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 19757199,
+              "facet": 1145703171
+            }
+          ]
+        },
+        {
+          "entity": "geoId/48",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 14226847,
+              "facet": 1145703171
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "facets": {
+    "1145703171": {
+      "importName": "CensusACS5YearSurvey",
+      "provenanceUrl": "https://www.census.gov/",
+      "measurementMethod": "CensusACS5yrSurvey"
+    }
+  }
+}
+
+ +

Example 2: Get values for multiple variables and entities from all facets

+ +

Get latest count of men (DCID: Count_Person_Male ) and count of women (DCID: Count_Person_Female ) for both California (DCID: geoId/06 ) and Texas (DCID: geoId/48 ) for all facets.

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/bulk/observations/point?entities=geoId/06&entities=geoId/48&variables=Count_Person_Male&variables=Count_Person_Female&all_facets=true&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "observationsByVariable": [
+    {
+      "variable": "Count_Person_Male",
+      "observationsByEntity": [
+        {
+          "entity": "geoId/06",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 19526298,
+              "facet": 1145703171
+            },
+            {
+              "date": "2019",
+              "value": 19640794,
+              "facet": 1226172227
+            },
+            {
+              "date": "2019",
+              "value": 19523898.009,
+              "facet": 10983471
+            },
+            {
+              "date": "2019",
+              "value": 19523898.009,
+              "facet": 196790193
+            },
+            {
+              "date": "2018",
+              "value": 19663600,
+              "facet": 1151455814
+            }
+          ]
+        },
+        {
+          "entity": "geoId/48",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 14034009,
+              "facet": 1145703171
+            },
+            {
+              "date": "2019",
+              "value": 14385762,
+              "facet": 1226172227
+            },
+            {
+              "date": "2019",
+              "value": 14045645.432,
+              "facet": 10983471
+            },
+            {
+              "date": "2019",
+              "value": 14045645.432,
+              "facet": 196790193
+            },
+            {
+              "date": "2018",
+              "value": 14260100,
+              "facet": 1151455814
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "variable": "Count_Person_Female",
+      "observationsByEntity": [
+        {
+          "entity": "geoId/06",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 19757199,
+              "facet": 1145703171
+            },
+            {
+              "date": "2019",
+              "value": 19871429,
+              "facet": 1226172227
+            },
+            {
+              "date": "2019",
+              "value": 19759598.991,
+              "facet": 10983471
+            },
+            {
+              "date": "2019",
+              "value": 19759598.991,
+              "facet": 196790193
+            },
+            {
+              "date": "2018",
+              "value": 19817700,
+              "facet": 1151455814
+            }
+          ]
+        },
+        {
+          "entity": "geoId/48",
+          "pointsByFacet": [
+            {
+              "date": "2019",
+              "value": 14226847,
+              "facet": 1145703171
+            },
+            {
+              "date": "2019",
+              "value": 14610119,
+              "facet": 1226172227
+            },
+            {
+              "date": "2019",
+              "value": 14215210.568,
+              "facet": 10983471
+            },
+            {
+              "date": "2019",
+              "value": 14215210.568,
+              "facet": 196790193
+            },
+            {
+              "date": "2018",
+              "value": 14250900,
+              "facet": 1151455814
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "facets": {
+    "10983471": {
+      "importName": "CensusACS5YearSurvey_SubjectTables_S2601A",
+      "provenanceUrl": "https://data.census.gov/cedsci/table?q=S2601A&tid=ACSST5Y2019.S2601A",
+      "measurementMethod": "CensusACS5yrSurveySubjectTable"
+    },
+    "196790193": {
+      "importName": "CensusACS5YearSurvey_SubjectTables_S2602",
+      "provenanceUrl": "https://data.census.gov/cedsci/table?q=S2602&tid=ACSST5Y2019.S2602",
+      "measurementMethod": "CensusACS5yrSurveySubjectTable"
+    },
+    "1145703171": {
+      "importName": "CensusACS5YearSurvey",
+      "provenanceUrl": "https://www.census.gov/",
+      "measurementMethod": "CensusACS5yrSurvey"
+    },
+    "1151455814": {
+      "importName": "OECDRegionalDemography",
+      "provenanceUrl": "https://stats.oecd.org/Index.aspx?DataSetCode=REGION_DEMOGR#",
+      "measurementMethod": "OECDRegionalStatistics",
+      "observationPeriod": "P1Y"
+    },
+    "1226172227": {
+      "importName": "CensusACS1YearSurvey",
+      "provenanceUrl": "https://www.census.gov/",
+      "measurementMethod": "CensusACS1yrSurvey"
+    }
+  }
+}
+
+ + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/observations/point/linked.html b/api/rest/v1/bulk/observations/point/linked.html new file mode 100644 index 000000000..681197ffa --- /dev/null +++ b/api/rest/v1/bulk/observations/point/linked.html @@ -0,0 +1,892 @@ + + + + + Single Observation (linked) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/observations/point/linked

+ +

Retrieve a single observation of multiple variables +at a set date for entities linked to an ancestor entity by the same property.

+ +

More specifically, in the following diagram:

+ +

Example of a linked property

+ +

The property containedInPlace is linked. Buenos Aires is contained in +Argentina, which is itself contained in South America – implying Buenos Aires +is also contained in South America. With this endpoint, you could query for +countries in South America (returning observations for Argentina) or for cities +in South America (returning observations for Buenos Aires).

+ +

This is useful for retrieving an observation for all places within an ancestor place. +For example, this could be getting the population of women in 2018 for all states in the United States.

+ + + + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/observations/point/linked?linked_property=containedInPlace&linked_entity={ancestor_place_dcid}&entity_type={place_type}&variables={variable_dcid_1}&variables={variable_dcid_2}&date={date}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/observations/point/linked + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "linked_property": "containedInPlace", + "linked_entity": "{ancestor_place_dcid}" + "entity_type": "{place_type}", + "date": "{date}", + "variables": [ + "{variable_dcid_1}", + "{variable_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
linked_entity
Required
listDCIDs of the ancestor place to query.
entity_type
Required
stringType of place to query for (e.g. city, county, state, etc.). For a list of available values, see the Knowledge Graph page on Place.
variables
Required
listDCIDs of the variables to query.
linked_property
Required
stringDCID of the property to query. Must be containedInPlace.
date
Optional
stringDatetime of measurement of the value requested in ISO 8601 format. To see the dates available, look up the variable in the Statistical Variable Explorer. If date is not provided, the latest available datapoint is returned.
all_facets
Optional
booleanWhether to return data from all facets available. If true, data from all facets available will be returned. If false, only data from the preferred facet will be returned. Defaults to false.
+ +

Response

+ +

The response looks like:

+ +
{
+  "observationsByVariable":
+  [
+    {
+      "variable": "variable_dcid",
+      "observationsByEntity":
+      [
+        {
+          "entity": "entity_dcid",
+          "pointsByFacet":
+          [
+            {
+              "date": "YYYY-MM-DD",
+              "value": 1234,
+              "facet": 0123456789
+            }
+          ]
+        }, ...
+      ]
+    }, ...
+  ],
+  "facets":
+  {
+    "0123456789":
+    {
+      "importName": "ImoprtName",
+      "provenanceUrl": "https://provenance.url/here",
+      "measurementMethod": "MeasurementMethod",
+      "observationPeriod": "P<N>Y"
+    }, ...
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
observationsByVariablelistList of observations organized by variable. These are further organized by entity, and then by facet.
facetsobjectMetadata on the facet(s) the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get a single observation from multiple variables at a set date for all places within a ancestor place.

+ +

Get the population (DCID: Count_Person) and median income (DCID: Median_Income_Person) for all states in the US (DCID: country/USA) in the year 2020.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/observations/point/linked?linked_entity=country/USA&linked_property=containedInPlace&variables=Count_Person&variables=Median_Income_Person&entity_type=State&date=2020&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/observations/point/linked \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"linked_property":"containedInPlace", "linked_entity":"country/USA", "entity_type":"State", "date":"2020", "variables":["Count_Person", "Median_Income_Person"]}'
    +
    + +
  • + +
+ +
+ +

Response:

+ +
{
+  "observationsByVariable":
+  [
+    {
+      "variable": "Count_Person",
+      "observationsByEntity":
+      [
+        {
+          "entity": "geoId/01",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 4921532,
+              "facet": 2176550201
+            }
+          ]
+        },
+        {
+          "entity": "geoId/02",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 731158,
+              "facet": 2176550201
+            }
+          ]
+        },
+        < ... output truncated for brevity ... >
+        {
+          "entity": "geoId/56",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 582328,
+              "facet": 2176550201
+            }
+          ]
+        },
+        {
+          "entity": "geoId/72",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 3255642,
+              "facet": 1145703171
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "variable": "Median_Income_Person",
+      "observationsByEntity":
+      [
+        {
+          "entity": "geoId/01",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 27030,
+              "facet": 1305418269
+            }
+          ]
+        },
+        {
+          "entity": "geoId/02",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 34881,
+              "facet": 1305418269
+            }
+          ]
+        },
+        < ... output truncated for brevity ... >
+        {
+          "entity": "geoId/56",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 33031,
+              "facet": 1305418269
+            }
+          ]
+        },
+        {
+          "entity": "geoId/72",
+          "pointsByFacet":
+          [
+            {
+              "date": "2020",
+              "value": 13814,
+              "facet": 1305418269
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "facets":
+  {
+    "2176550201":
+    {
+      "importName": "USCensusPEP_Annual_Population",
+      "provenanceUrl": "https://www2.census.gov/programs-surveys/popest/tables",
+      "measurementMethod": "CensusPEPSurvey",
+      "observationPeriod": "P1Y"
+    },
+    < ... output truncated for brevity ... >
+    "1305418269":
+    {
+      "importName": "CensusACS5YearSurvey",
+      "provenanceUrl": "https://www.census.gov/",
+      "measurementMethod": "CensusACS5yrSurvey",
+      "unit": "USDollar"
+    }
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/observations/series.html b/api/rest/v1/bulk/observations/series.html new file mode 100644 index 000000000..62a447b06 --- /dev/null +++ b/api/rest/v1/bulk/observations/series.html @@ -0,0 +1,907 @@ + + + + + Series of Observations - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/observations/series

+ +

Retrieve a series of observations for multiple variables and entities.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/observations/series?entities={entity_dcid_1}&entities={entity_dcid_2}&variables={variable_dcid_1}&variables={variable_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/observations/series + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "entities": [ + "{entity_dcid_1}", + "{entity_dcid_2}", + ... + ], + "variables": [ + "{variable_dcid_1}", + "{variable_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
entities
Required
Repeated stringDCIDs of the entities the variables describe.
variables
Required
Repeated stringDCIDs of the variables to query observations for.
all_facets
Optional
BooleanWhether to return data from all facets available. If true, data from all facets available will be returned. If false, only data from the preferred facet will be returned. Defaults to false.
+ +

Response

+ +

The response looks like:

+ +
{
+  "observationsByVariable": [
+    {
+      "variable": "variable1_dcid",
+      "observationsByEntity": [
+        {
+          "entity": "entity1_dcid",
+          "seriesByFacet": [
+            {
+              "series": [
+                {
+                  "date": "YYYY-MM-DD",
+                  "value": 1234
+                }, ...
+              ],
+              "facet": 1234567890
+            }
+          ]
+        },
+        {
+          "entity": "entity2_dcid",
+          "seriesByFacet": [
+            {
+              "series": [
+                {
+                  "date": "YYYY-MM-DD",
+                  "value": 1234
+                }, ...
+              ],
+              "facet": 1234567890
+            }
+          ]
+        }
+      ]
+    }, ...
+    {
+      "variable": "variable2_dcid",
+      "observationsByEntity": [
+        {
+          "entity": "entity1_dcid",
+          "seriesByFacet": [
+            {
+              "series": [
+                {
+                  "date": "YYYY-MM-DD",
+                  "value": 1234
+                }, ...
+              ],
+              "facet": 1234567890
+            }
+          ]
+        },
+        {
+          "entity": "entity2_dcid",
+          "seriesByFacet": [
+            {
+              "series": [
+                {
+                  "date": "YYYY-MM-DD",
+                  "value": 1234
+                }, ...
+              ],
+              "facet": 1234567890
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
observationsByVariablelistList of observations organized by variable. These are further organized by entity, and then by facet. Observations are returned in chronological order.
facetsobjectMetadata on the facet(s) the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get time series for multiple variables and entities

+ +

Get total annual electric power consumption (DCID: Annual_Consumption_Coal_ElectricPower ) and water withdrawal rates (DCID: WithdrawalRate_Water ) for both Virginia (DCID: geoId/51 ) and Texas (DCID: geoId/48 )

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/observations/series?entities=geoId/51&entities=geoId/48&variables=Annual_Consumption_Coal_ElectricPower&variables=WithdrawalRate_Water&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/observations/series \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"entities":["geoId/51", "geoId/48"], "variables":["Annual_Consumption_Coal_ElectricPower", "WithdrawalRate_Water"]}'
    +
    + +
  • + +
+ +
+ +

Response:

+ +
{
+   "observationsByVariable": [
+       {
+           "variable": "Annual_Consumption_Coal_ElectricPower",
+           "observationsByEntity": [
+               {
+                   "entity": "geoId/48",
+                   "seriesByFacet": [
+                       {
+                           "series": [
+                               {
+                                   "date": "2001",
+                                   "value": 92437807
+                               },
+                               {
+                                   "date": "2002",
+                                   "value": 95672686
+                               },
+ 
+                              
+                               <...output truncated for brevity...>
+                               
+ 
+                               {
+                                   "date": "2019",
+                                   "value": 63310631
+                               },
+                               {
+                                   "date": "2020",
+                                   "value": 56068974
+                               }
+                           ],
+                           "facet": 3743503335
+                       }
+                   ]
+               },
+               {
+                   "entity": "geoId/51",
+                   "seriesByFacet": [
+                       {
+                           "series": [
+                               {
+                                   "date": "2001",
+                                   "value": 15427618
+                               },
+                               {
+                                   "date": "2002",
+                                   "value": 15416555
+                               },
+                              
+                               <...output truncated for brevity...>
+                               
+                               {
+                                   "date": "2019",
+                                   "value": 1972956
+                               },
+                               {
+                                   "date": "2020",
+                                   "value": 1814436
+                               }
+                           ],
+                           "facet": 3743503335
+                       }
+                   ]
+               }
+           ]
+       },
+       {
+           "variable": "WithdrawalRate_Water",
+           "observationsByEntity": [
+               {
+                   "entity": "geoId/48",
+                   "seriesByFacet": [
+                       {
+                           "series": [
+                               {
+                                   "date": "1985",
+                                   "value": 25185.230000000014
+                               },
+                               {
+                                   "date": "1990",
+                                   "value": 26321.259999999987
+                               },
+                              
+                               <...output truncated for brevity...>
+                               
+                               {
+                                   "date": "2010",
+                                   "value": 33382.35999999998
+                               },
+                               {
+                                   "date": "2015",
+                                   "value": 30029.560000000005
+                               }
+                           ],
+                           "facet": 2157651424
+                       }
+                   ]
+               },
+               {
+                   "entity": "geoId/51",
+                   "seriesByFacet": [
+                       {
+                           "series": [
+                               {
+                                   "date": "1985",
+                                   "value": 2158.1
+                               },
+                               {
+                                   "date": "1990",
+                                   "value": 2367.2300000000005
+                               },
+                              
+                               <...output truncated for brevity...>
+                               
+                               {
+                                   "date": "2010",
+                                   "value": 8800.439999999995
+                               },
+                               {
+                                   "date": "2015",
+                                   "value": 7720.680000000003
+                               }
+                           ],
+                           "facet": 2157651424
+                       }
+                   ]
+               }
+           ]
+       }
+   ]
+}
+
+ + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/observations/series/linked.html b/api/rest/v1/bulk/observations/series/linked.html new file mode 100644 index 000000000..9a63d1dd5 --- /dev/null +++ b/api/rest/v1/bulk/observations/series/linked.html @@ -0,0 +1,850 @@ + + + + + Series of Observations (linked) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/observations/series/linked

+ +

Returns observations of multiple variables +for entities linked to an ancestor entity by the same property.

+ +

More specifically, in the following diagram:

+ +

Example of a linked property

+ +

The property containedInPlace is linked. Buenos Aires is contained in +Argentina, which is itself contained in South America – implying Buenos Aires +is also contained in South America. With this endpoint, you could query for +countries in South America (returning observations for Argentina) or for cities +in South America (returning observations for Buenos Aires).

+ +

This is useful for retrieving observations for all places within an ancestor place. +For example, this could be getting the population of women for all states in the United States.

+ + + + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/observations/series/linked?linked_property=containedInPlace&linked_entity={ancestor_place_dcid}&entity_type={place_type}&variables={variable_dcid_1}&variables={variable_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/observations/series/linked + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "linked_property": "containedInPlace", + "linked_entity": "{ancestor_place_dcid}" + "entity_type": "{place_type}", + "variables": [ + "{variable_dcid_1}", + "{variable_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
linked_entity
Required
listDCID of the ancestor place to query.
entity_type
Required
stringType of place to query for (e.g. city, county, state, etc.). For a list of available values, see the Knowledge Graph page on Place.
variables
Required
listDCIDs of the variables to query.
linked_property
Required
stringDCID of the property to query. Must be containedInPlace.
all_facets
Optional
booleanWhether to return data from all facets available. If true, data from all facets available will be returned. If false, only data from the preferred facet will be returned. Defaults to false.
+ +

Response

+ +

The response looks like:

+ +
{
+  "observationsByVariable":
+  [
+    {
+      "variable": "variable_dcid_1",
+      "observationsByEntity":
+      [
+        {
+          "entity": "entity_dcid_1",
+          "seriesByFacet":
+          [
+            {
+              "series":
+              [
+                {
+                  "date": "YYYY-MM-DD",
+                  "value": 1234
+                }, ...
+              ],
+              "facet": 0123456789
+            }
+          ]
+        }, ...
+      ]
+    }, ...
+  ],
+  "facets":
+  {
+    "0123456789":
+    {
+      "importName": "import_name_here",
+      "provenanceUrl": "https://provenance.url/here",
+      "measurementMethod": "measurement_method_here",
+      "observationPeriod": "P<N>Y"
+    }
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
observationsByVariablelistList of observations organized by variable. These are further organized by entity, and then by facet. Observations are returned in chronological order.
facetsobjectMetadata on the facet(s) the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get observations for all places within an ancestor place.

+ +

Get the population (DCID: Count_Person) for all counties in the US state of Delaware (DCID: geoId/10).

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/observations/series/linked?linked_entity=geoId/10&linked_property=containedInPlace&variables=Count_Person&entity_type=County&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/observations/series/linked \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"linked_entity":"geoId/10", "linked_property":"containedInPlace", "entity_type":"County", variables:"Count_Person"}'
    +
    + +
  • + +
+ +
+ +

Response:

+ +
{
+  "observationsByVariable":
+  [
+    {
+      "variable": "Count_Person",
+      "observationsByEntity":
+      [
+        {
+          "entity": "geoId/10001",
+          "seriesByFacet":
+          [
+            {
+              "series":
+              [
+                {
+                  "date": "1970",
+                  "value": 81892
+                },
+                < ... output truncated for brevity ... >
+                {
+                  "date": "2021",
+                  "value": 184149
+                }
+              ],
+              "facet": 2176550201
+            }
+          ]
+        },
+        {
+          "entity": "geoId/10003",
+          "seriesByFacet":
+          [
+            {
+              "series":
+              [
+                {
+                  "date": "1970",
+                  "value": 385856
+                },
+                < ... output truncated for brevity ... >
+                {
+                  "date": "2021",
+                  "value": 571708
+                }
+              ],
+              "facet": 2176550201
+            }
+          ]
+        },
+        {
+          "entity": "geoId/10005",
+          "seriesByFacet":
+          [
+            {
+              "series":
+              [
+                {
+                  "date": "1970",
+                  "value": 80356
+                },
+                < ... output truncated for brevity ... >
+                {
+                  "date": "2021",
+                  "value": 247527
+                }
+              ],
+              "facet": 2176550201
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "facets":
+  {
+    "2176550201":
+    {
+      "importName": "USCensusPEP_Annual_Population",
+      "provenanceUrl": "https://www2.census.gov/programs-surveys/popest/tables",
+      "measurementMethod": "CensusPEPSurvey",
+      "observationPeriod": "P1Y"
+    }
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/properties.html b/api/rest/v1/bulk/properties.html new file mode 100644 index 000000000..afcfd7dc3 --- /dev/null +++ b/api/rest/v1/bulk/properties.html @@ -0,0 +1,784 @@ + + + + + Properties - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/properties

+ +

Get all properties associated with a specific node, +for multiple nodes.

+ +

More specifically, this endpoint returns the labels of the edges connected to a +specific node in the Data Commons Knowledge Graph. Edges in the graph are +directed, so properties can either be labels for edges towards or away from +the node. Outgoing edges correspond to properties of the node. Incoming edges +denote that the node is the value of this property for some other node.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/properties/{EDGE_DIRECTION}?nodes={node_dcid_1}&nodes={node_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/properties/{EDGE_DIRECTION} + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "nodes": + [ + "{value_1}", + "{value_2}", + ... + ] +} + +
+ + + + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out. Denotes direction of edges to get triples for.

If in, returns properties represented by edges pointing toward the node provided. If out, returns properties represented by edges pointing away from the node provided.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
stringDCIDs of the nodes to query.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "node_1_dcid",
+      "properties":
+      [
+        "property_1",
+        "property_2",
+        ...
+      ]
+    },
+    {
+      "node": "node_2_dcid",
+      "properties":
+      [
+        "property_1",
+        "property_2",
+        ...
+      ]
+
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the node queried.
propertieslistList of properties connected to the node queried, for the direction specified in the request.
+ +

Examples

+ +

Example 1: Get properties for mulitple nodes.

+ +

Get properties describing the US states of Virgina (DCID: geoId/51), Maryland +(DCID: geoId/24), and Delaware (DCID: geoId/10).

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/properties/out?nodes=geoId/51&nodes=geoId/24&nodes=geoId/10&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/properties/out \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["geoId/51", "geoId/24", "geoId/10"]}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data":
+  [
+    {
+      "node": "geoId/51",
+      "properties":
+      [
+        "administrativeCapital",
+        "alternateName",
+        "archinformLocationId",
+        < ... output truncated for brevity ... >
+        "whosOnFirstId",
+        "wikidataId",
+        "worldcatIdentitiesId"
+      ]
+    },
+    {
+      "node": "geoId/24",
+      "properties":
+      [
+        "administrativeCapital",
+        "alternateName",
+        "archinformLocationId",
+        < ... output truncated for brevity ... >
+        "whosOnFirstId",
+        "wikidataId",
+        "worldcatIdentitiesId"
+      ]
+    },
+    {
+      "node": "geoId/10",
+      "properties":
+      [
+        "administrativeCapital",
+        "alternateName",
+        "archinformLocationId",
+        < ... output truncated for brevity ... >
+        "whosOnFirstId",
+        "wikidataId",
+        "worldcatIdentitiesId"
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/property/values.html b/api/rest/v1/bulk/property/values.html new file mode 100644 index 000000000..e591b7ec7 --- /dev/null +++ b/api/rest/v1/bulk/property/values.html @@ -0,0 +1,786 @@ + + + + + Property Values - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/property/values

+ +

Get the values of a property for multiple nodes.

+ +

Data Commons represents properties as labels of directed edges between nodes, +where the successor node is a value of the property. Thus, this endpoint returns +nodes connected to the queried node via the property queried.

+ +

Note: If you want to query values for the property containedInPlace, consider +using +/v1/bulk/property/values/linked +instead.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/property/values/{EDGE_DIRECTION}?property={property_dcid}&nodes={node_dcid_1}&nodes={node_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/property/values/{EDGE_DIRECTION} + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "property": "property_dcid", + "nodes": [ + "{node_dcid_1}", + "{node_dcid_2}", + ... + ] +} + +
+ + + + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out.

If in, returns nodes for which the queried node is a property value. If out, returns values of properties describing the node queried.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
listDCIDs of the entitis to query.
property
Required
stringDCID of the property to query.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "connected_node_dcid",
+      "values":
+      [
+        {
+          "property_of_connected_node_1": "value",
+          "property_of_connected_node_1": "value",
+          ...
+        },
+        {
+          "property_of_connected_node_2": "value",
+          "property_of_connected_node_2": "value",
+          ...
+        }
+      ]
+    },
+    {
+      "node": "connected_node_dcid_2",
+      "values":
+      [
+        {
+          "property_of_connected_node_1": "value",
+          "property_of_connected_node_1": "value",
+          ...
+        },
+        {
+          "property_of_connected_node_2": "value",
+          "property_of_connected_node_2": "value",
+          ...
+        }
+      ]
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the node queried.
valueslistlist of nodes connected by the property queried.
+ +

Examples

+ +

Example 1: Get property values for multiple nodes

+ +

Get the names (property: name) of nodes with DCIDs wikidataId/Q27119, +wikidataId/Q27116, and wikidataId/Q21181.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/property/values/out?property=name&nodes=wikidataId/Q27119&nodes=wikidataId/Q27116&nodes=wikidataId/Q21181&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/property/values/out \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["wikidataId/Q27119", "wikidataId/Q27116", "wikidataId/Q21181"], "property":"name"}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "wikidataId/Q27119",
+      "values": [
+        {
+          "provenanceId": "dc/5n63hr1",
+          "value": "Kolding"
+        }
+      ]
+    },
+    {
+      "node": "wikidataId/Q27116",
+      "values": [
+        {
+          "provenanceId": "dc/5n63hr1",
+          "value": "Vejle"
+        }
+      ]
+    },
+    {
+      "node": "wikidataId/Q21181",
+      "values": [
+        {
+          "provenanceId": "dc/5n63hr1",
+          "value": "Fredericia"
+        }
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/property/values/in/linked.html b/api/rest/v1/bulk/property/values/in/linked.html new file mode 100644 index 000000000..08dc9221b --- /dev/null +++ b/api/rest/v1/bulk/property/values/in/linked.html @@ -0,0 +1,791 @@ + + + + + Property Values (linked) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/property/values/in/linked

+ +

Return property values for properties that can be +chained for multiple degrees in the knowledge graph.

+ + + +

For example, in the following diagram:

+ +

Example of a chained property

+ +

The property containedInPlace is chained. Buenos Aires is contained in +Argentina, which is itself contained in South America – implying Buenos Aires +is also contained in South America. With this endpoint, you could query for +countries in South America (returning Argentina) or for cities in South America +(returning Buenos Aires).

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/property/values/in/linked?property=containedInPlace&value_node_type={place_type}&nodes={parent_place_dcid_1}&nodes={parent_place_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/property/values/in/linked + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "property": "containedInPlace", + "value_place_type": "{place_type}", + "nodes": + [ + "{parent_place_dcid_1}", + "{parent_place_dcid_2}", + ... + ] +} +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
listDCIDs of the parent places to query.
value_node_type
Required
stringType of place to query for (e.g. city, county, state, etc.). For a list of available values, see the Knowledge Graph page on Place.
property
Required
stringDCID of the property to query. Must be containedInPlace.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "Parent Place 1 DCID",
+      "values":
+      [
+        {
+          "name": "Child Place Name",
+          "dcid": "Child Place DCID"
+        }, ...
+      ]
+    },
+    {
+      "node": "Parent Place 2 DCID",
+      "values":
+      [
+        {
+          "name": "Child Place Name",
+          "dcid": "Child Place DCID"
+        }, ...
+      ]
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the node queried.
valueslistlist of nodes connected by the property queried.
+ +

Examples

+ +

Example 1: Get all states of multiple countries.

+ +

Get the states of the countries USA (DCID: ‘country/USA’) and India (DCID: +‘country/IND’). Note that this works because both countries have entries for the +State class of places.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/property/values/in/linked?property=containedInPlace&value_node_type=State&nodes=country/USA&nodes=country/IND&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/property/values/in/linked \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["country/USA", "country/IND"], "property":"containedInPlace", "value_node_type":"State"}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "country/USA",
+      "values": [
+        {
+          "name": "Alabama",
+          "dcid": "geoId/01"
+        },
+        {
+          "name": "Alaska",
+          "dcid": "geoId/02"
+        },
+        < ... output truncated for brevity ... >
+        {
+          "name": "Wyoming",
+          "dcid": "geoId/56"
+        },
+        {
+          "name": "Puerto Rico",
+          "dcid": "geoId/72"
+        }
+      ]
+    },
+    {
+      "node": "country/IND",
+      "values": [
+        {
+          "name": "Gujarat",
+          "dcid": "wikidataId/Q1061"
+        },
+        {
+          "name": "Andhra Pradesh",
+          "dcid": "wikidataId/Q1159"
+        },
+        < ... output truncated for brevity ... >
+        {
+          "name": "Daman and Diu",
+          "dcid": "wikidataId/Q66710"
+        },
+        {
+          "name": "Telangana",
+          "dcid": "wikidataId/Q677037"
+        }
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/triples.html b/api/rest/v1/bulk/triples.html new file mode 100644 index 000000000..bf25b44f2 --- /dev/null +++ b/api/rest/v1/bulk/triples.html @@ -0,0 +1,1012 @@ + + + + + Triples - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/triples

+ +

Get triples for multiple nodes.

+ +

Useful for finding local connections between nodes of the Data Commons knowledge +graph.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/triples/{EDGE_DIRECTION}?nodes={node_dcid_1}&nodes={node_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/triples/{EDGE_DIRECTION} + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "nodes": [ + "{value_1}", + "{value_2}", + ... + ] +} + +
+ + + + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out. Denotes direction of edges to get triples for.

If in, returns triples with edges pointing toward the node provided. If out, returns triples with edges pointing away from the node provided.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
nodes
Required
stringDCIDs of the nodes to query.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "node": "node_dcid_1",
+      "triples":
+      {
+        "property_of_node":
+        {
+          "nodes":
+          [
+            {
+              "property_1": "value",
+              "property_2": "value",
+              ...
+            }, ...
+          ]
+        }, ...
+
+      }
+    },
+    {
+      "node": "node_dcid_2",
+      "triples":
+      {
+        "property_of_node":
+        {
+          "nodes":
+          [
+            {
+              "property_1": "value",
+              "property_2": "value",
+              ...
+            }, ...
+          ]
+        }, ...
+      }
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the node queried.
triplesobjectA nested JSON object containing DCIDs of both properties that describe the node queried, and nodes connected to the queried node via those properties.
+ +

Examples

+ +

Example 1: Get outgoing triples for multiple nodes.

+ +

Get triples for the greenhouse gases carbon dioxide (DCID: CarbonDioxide) and +methane (DCID: Methane), for edges going away from those nodes.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/triples/out?nodes=CarbonDioxide&nodes=Methane&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/triples/out \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["CarbonDioxide", "Methane"]}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "CarbonDioxide",
+      "triples": {
+        "description": {
+          "nodes": [
+            {
+              "provenanceId": "dc/5l5zxr1",
+              "value": "A colorless gas consisting of a carbon atom covalently double bonded to two oxygen atoms."
+            }
+          ]
+        },
+        "descriptionUrl": {
+          "nodes": [
+            {
+              "provenanceId": "dc/5l5zxr1",
+              "value": "https://en.wikipedia.org/wiki/Carbon_dioxide"
+            }
+          ]
+        },
+        "name": {
+          "nodes": [
+            {
+              "provenanceId": "dc/5l5zxr1",
+              "value": "Carbon Dioxide"
+            },
+            {
+              "provenanceId": "dc/5l5zxr1",
+              "value": "CarbonDioxide"
+            }
+          ]
+        },
+        "provenance": {
+          "nodes": [
+            {
+              "name": "https://datacommons.org",
+              "types": ["Provenance"],
+              "dcid": "dc/5l5zxr1",
+              "provenanceId": "dc/5l5zxr1"
+            }
+          ]
+        },
+        "typeOf": {
+          "nodes": [
+            {
+              "name": "GasType",
+              "types": ["Class"],
+              "dcid": "GasType",
+              "provenanceId": "dc/5l5zxr1"
+            },
+            {
+              "name": "GreenhouseGas",
+              "types": ["Class"],
+              "dcid": "GreenhouseGas",
+              "provenanceId": "dc/5l5zxr1"
+            }
+          ]
+        }
+      }
+    },
+    {
+      "node": "Methane",
+      "triples": {
+        "isProvisional": {
+          "nodes": [
+            {
+              "name": "True",
+              "types": ["Boolean"],
+              "dcid": "True",
+              "provenanceId": "dc/5l5zxr1"
+            }
+          ]
+        },
+        "name": {
+          "nodes": [
+            {
+              "provenanceId": "dc/5l5zxr1",
+              "value": "Methane"
+            }
+          ]
+        },
+        "provenance": {
+          "nodes": [
+            {
+              "name": "https://datacommons.org",
+              "types": ["Provenance"],
+              "dcid": "dc/5l5zxr1",
+              "provenanceId": "dc/5l5zxr1"
+            }
+          ]
+        },
+        "typeOf": {
+          "nodes": [
+            {
+              "name": "ChemicalCompound",
+              "types": ["Class"],
+              "dcid": "ChemicalCompound",
+              "provenanceId": "dc/5l5zxr1"
+            },
+            {
+              "name": "GreenhouseGas",
+              "types": ["Class"],
+              "dcid": "GreenhouseGas",
+              "provenanceId": "dc/5l5zxr1"
+            }
+          ]
+        }
+      }
+    }
+  ]
+}
+
+ +

Example 2: Get incoming triples for multiple nodes.

+ +

Get triples for the greenhouse gases carbon dioxide (DCID: CarbonDioxide) and +methane (DCID: Methane), for edges going towards those nodes.

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/triples/in?nodes=geoId/51&nodes=CarbonDioxide&nodes=Methane&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/triples/in \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"nodes":["CarbonDioxide", "Methane"]}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data": [
+    {
+      "node": "CarbonDioxide",
+      "triples": {
+        "emittedThing": {
+          "nodes": [
+            {
+              "name": "CO2 Emissions Per Capita",
+              "types": ["StatisticalVariable"],
+              "dcid": "Amount_Emissions_CarbonDioxide_PerCapita",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Annual Amount of Emissions: Biogenic Emission Source, Carbon Dioxide",
+              "types": ["StatisticalVariable"],
+              "dcid": "Annual_Emissions_CarbonDioxide_Biogenic",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Carbon Dioxide",
+              "types": ["StatisticalVariable"],
+              "dcid": "Annual_Emissions_CarbonDioxide_NonBiogenic",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "types": ["StatisticalVariable"],
+              "dcid": "dc/pelkj2pkyww1",
+              "provenanceId": "dc/6zzrcr2"
+            }
+          ]
+        }
+      }
+    },
+    {
+      "node": "Methane",
+      "triples": {
+        "contaminant": {
+          "nodes": [
+            {
+              "name": "Whether Atmosphere is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_Atmosphere",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether EPA_OtherContaminatedThing is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_EPAOtherContaminatedThing",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether GroundWater is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_GroundWater",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether LandfillGas is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_LandfillGas",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether Leachate is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_Leachate",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether SoilGas is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_SoilGas",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether Soil is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_Soil",
+              "provenanceId": "dc/d7tbsb1"
+            },
+            {
+              "name": "Whether SolidWaste is contaminated with Methane.",
+              "types": ["StatisticalVariable"],
+              "dcid": "IsContaminated_Methane_SolidWaste",
+              "provenanceId": "dc/d7tbsb1"
+            }
+          ]
+        },
+        "emittedThing": {
+          "nodes": [
+            {
+              "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Methane",
+              "types": ["StatisticalVariable"],
+              "dcid": "Annual_Emissions_Methane_NonBiogenic",
+              "provenanceId": "dc/d7tbsb1"
+            }
+          ]
+        }
+      }
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/bulk/variables.html b/api/rest/v1/bulk/variables.html new file mode 100644 index 000000000..ba24e872e --- /dev/null +++ b/api/rest/v1/bulk/variables.html @@ -0,0 +1,749 @@ + + + + + Variables - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/bulk/variables

+ +

Get all variables with data associated with a +specific entity, for multiple entities.

+ + + +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v1/bulk/variables?entities={entity_dcid_1}&entities={entity_dcid_2}&key={your_api_key} +
+ +
+URL: +https://api.datacommons.org/v1/bulk/variables + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ + "entities": + [ + "{entity_dcid_1}", + "{entity_dcid_2}", + ... + ] +} + +
+ + + + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
variables
Required
listList of variables associated with the entity queried.
+ +

Response

+ +

The response looks like:

+ +
{
+  "data":
+  [
+    {
+      "entity": "entity_dcid_1",
+      "variables":
+      [
+        "variable_dcid_1",
+        "variable_dcid_2",
+        ...
+      ]
+    },
+    {
+      "entity": "entity_dcid_2",
+      "variables":
+      [
+        "variable_dcid_1",
+        "variable_dcid_2",
+        ...
+      ], ...
+    }
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entitystringDCID of the entity queried.
variableslistList of variables connected to the entity queried.
+ +

Examples

+ +

Example 1: Get variables associated with multiple entities.

+ +

Get variables for the cities of Tokyo, Japan (DCID: wikidataId/Q1490) and +Seoul, South Korea (DCID: wikidataId/Q8684).

+ +
+ +
    + +
  • +

    Request:

    + +
    $ curl --request GET --url \
    +'https://api.datacommons.org/v1/bulk/variables?entities=wikidataId/Q1490&entities=wikidataId/Q8684&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
    +
    + +
  • + +
  • +

    Request:

    + +
    $ curl --request POST \
    +--url https://api.datacommons.org/v1/bulk/variables \
    +--header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
    +--data '{"entities":["wikidataId/Q1490", "wikidataId/Q8684"]}'
    +
    + +
  • + +
+ + +
+ +

Response:

+ +
{
+  "data":
+  [
+    {
+      "entity": "wikidataId/Q1490",
+      "variables":
+      [
+        "Count_CycloneEvent",
+        "Count_CycloneEvent_TropicalStorm",
+        "Count_Person",
+        < ... output truncated for brevity ... >
+        "Min_Rainfall",
+        "Min_Snowfall",
+        "Min_Temperature"
+      ]
+    },
+    {
+      "entity": "wikidataId/Q8684",
+      "variables":
+      [
+        "Count_Death",
+        "Count_Death_10To14Years_Female",
+        "Count_Death_10To14Years_Male",
+        < ... output truncated for brevity ...>
+        "dc/sw43w4pbtgq4d",
+        "dc/x73k9t2mzzcs2",
+        "dc/xh9d9e2le1r41"
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/find/entities.html b/api/rest/v1/find/entities.html new file mode 100644 index 000000000..5af2f5366 --- /dev/null +++ b/api/rest/v1/find/entities.html @@ -0,0 +1,664 @@ + + + + + Find Entities - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/find/entities

+ +

Find the DCID of a given entity.

+ +

Given the description of an entity, this endpoint searches for an entry in the Data Commons knowledge graph and returns the DCIDs of matches. For example, you could query for “San Francisco, CA” or “San Francisco” to find that its DCID is geoId/0667000. You can also provide the type of entity (country, city, state, etc.) to disambiguate (Georgia the country vs. Georgia the US state).

+ + + + + + + +

Request

+ +

GET Request

+ +
+URL: +https://api.datacommons.org/v1/find/entities?key={your_api_key}&description={entity_description} +
+ + +

Path Parameters

+ +

There are no path parameters for this end point.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
description
Required
stringDescription of the entity. Typically the name of the place.
type
Optional
stringThe type of entity, specified as a DCID. Common values are “Country”, “State”, “County”, “City”.
+ +

Response

+ +

The response looks like:

+ +
{
+  "dcids": ["dcid"]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + +
NameTypeDescription
dcidslistDCIDs matching the description you provided. If no matches are found, this field will not be returned.
+ +

Examples

+ +

Example 1: Find the DCID of a place

+ +

This queries for the DCID of “Georgia”. Notice that specifying “Georgia” without specifying type returned the DCID of the US state.

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/find/entities?description=Georgia&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{"dcids":["geoId/13"]}
+
+
+ +

Example 2: Find the DCID of a place, including a type

+ +

This queries for the DCIDs of “Georgia” while specifying we want the country.

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/find/entities?description=Georgia&type=Country&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{"dcids":["country/GEO"]}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/getting_started.html b/api/rest/v1/getting_started.html new file mode 100644 index 000000000..60d1a4053 --- /dev/null +++ b/api/rest/v1/getting_started.html @@ -0,0 +1,828 @@ + + + + + Getting Started Guide - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Getting Started Guide

+ +

Welcome! Whether you’re new to Data Commons or are just looking for a refresher, this guide gives an overview of what you need to know to get started using our REST API.

+ +

Use the links below to jump to any section:

+ + + +

What is a REST API?

+ +

Our REST API follows the RESTful architectural style to allow you to query the Data Commons Knowledge Graph via HTTP. This allows you to explore the local graph and query data from specific variables and entities programatically.

+ +

How to Use the REST API

+ +

Our REST API can be used with any tool or language that supports HTTP. You can make queries on the command line (e.g. using cURL), by scripting HTTP requests in another language like javascript, or even by entering an endpoint into your web browser!

+ +

Following HTTP, a REST API call consists of a request that you provide, and a response from our servers with the data you requested in JSON format. The next section details how to assemble a request.

+ +

Assembling a Request

+ +

Endpoints

+ +

Requests are made through API endpoints. We provide endpoints for many different queries (see the list of available endpoints here).

+ +

Each endpoint can be acessed using its unique URL, which is a combination of a base URL and the endpoint’s URI.

+ +

The base URL for all REST endpoints is:

+ +
https://api.datacommons.org
+
+ +

And a URI looks like /v1/observation/point. To access a particular endpoint, append the URI to the base URL (e.g. https://api.datacommons.org/v1/observation/point ).

+ +

Parameters

+ +

Endpoints take a set of parameters which allow you to specify which entities, variables, timescales, etc. you are interested in. There are two kinds of parameters: path parameters and query parameters.

+ +
Path Parameters
+ +

Path parameters must be passed in a specific order as part of the URL. For example, /v1/observations/point requires the DCIDs of the entity and variable to query, in that order. This would look something like:

+ +
https://api.datacommons.org/v1/observations/point/entity_DCID/variable_DCID
+
+ +
Query Parameters
+ +

Query parameters are chained at the end of a URL behind a ? symbol. Separate multiple parameter entries with an & symbol. For example, this would look like:

+ +
https://api.datacommons.org/v1/observations/point/variable_DCID/entity_DCID?date=YYYY&facet=XXXXXXXXXXX
+
+ +

Still confused? Each endpoint’s documentation page has examples at the bottom tailored to the endpoint you’re trying to use.

+ +

Finding Available Entities, Variables, and their DCIDs

+ +

Most requests require the DCID of the entity or variable you wish to query. Curious what entities and variables are available? Want to find a DCID? Take a look at our explorer tools:

+ + + +

Finding Datetimes for Observations

+ +

Many endpoints allow the user to filter their results to specific dates. When querying for data at a specific date, the string passed for the date queried must match the date format (in ISO-8601) used by the target variable. An easy way to see what date format a variable uses is to look up your variable of interest in the Statistical Variable Explorer.

+ +

Bulk Retrieval

+ +

Many of our APIs come in both “simple” and “bulk” versions. The simple versions of endpoints have prefix /v1/ and are designed for handling single requests with a simplified return structure. The bulk versions of endpoints have prefix /v1/bulk/ and are meant for querying multiple variables or entities at once, and provide richer details in the response.

+ +

POST requests

+ +

Some bulk endpoints allow for POST requests. For POST requests, feed all parameters in JSON format. For example, in cURL, this would look like:

+ +
curl -X POST \
+--url https://api.datacommons.org/v1/bulk/observations/point \
+--data '{
+  "entities": [
+    "entity_dcid_1",
+    "entity_dcid_2",
+    ...
+  ],
+  "variables: [
+    "variable_dcid_1",
+    "variable_dcid_2",
+    ...
+  ]
+}'
+
+ +

Authentication

+ + + +

Using API Keys

+ +

API keys are required in any REST API request. To include an API key, add your API key to the URL as a query parameter by appending ?key=<YOUR_API_KEY_HERE>.

+ +

For GET requests, this looks like:

+ +
https://api.datacommons.org/v1/end/point?key=<YOUR_KEY_HERE>
+
+ +

If the key is not the first query parameter, use &key=<YOUR_API_KEY_HERE> instead. This looks like:

+ +
https://api.datacommons.org/v1/end/point?query=value&key=<YOUR_KEY_HERE>
+
+ +

For POST requests, pass the key as a header. For example, in cURL, this looks like:

+ +
curl -X POST \
+--url https://api.datacommons.org/v1/bulk/end/point \
+--header 'X-API-Key: <YOUR_KEY_HERE>' \
+--data '{
+  "entities": [
+    "entity_dcid_1",
+    "entity_dcid_2",
+    ...
+  ],
+  "variables: [
+    "variable_dcid_1",
+    "variable_dcid_2",
+    ...
+  ]
+}'
+
+ +

Getting API Keys

+ +

We’ve provided a trial API key for general public use. This key will let you try the API and make single requests.

+ + + +

The trial key is capped with a limited quota for requests. If you are planning on using our APIs more rigorously (e.g. for personal or school projects, developing applications, etc.) please go to the portal at https://apikeys.datacommons.org and request a key for api.datacommons.org.

+ +

Pagination

+ +

When the response to a request is too long, the returned payload is +paginated. Only a subset of the response is returned, along with a long string +of characters called a token. To get the next set of entries, repeat the +request with nextToken as an query parameter, with the token as its value.

+ +

For example, the request:

+ +
 $ curl --request GET \
+   `https://api.datacommons.org/v1/triples/in/geoId/06`
+
+ +

will return something like:

+ +
{
+  "triples": {
+    < ... output truncated for brevity ...>
+    {
+      "name":"Business Fire 2014 (472130)",
+      "types":["WildlandFireEvent"],
+      "dcid":"fire/imsrBusinessFire2014472130",
+      "provenanceId":"dc/y6lf8n"
+    }
+  },
+  "nextToken":"SoME_veRy_L0ng_S+rIng"
+}
+
+ +

To get the next set of entries, use the command:

+ +
 $ curl --request GET \
+   `https://api.datacommons.org/v1/triples/in/geoId/06?nextToken=SoME_veRy_L0ng_S+rIng`
+
+ +

Similarly for POST requests, this would look like:

+ +
$ curl --request POST \
+--url https://api.datacommons.org/v1/bulk/triples/in \
+--data '{
+  "entities": "geoId/06",
+  "nextToken": "SoME_veRy_L0ng_S+rIng"
+}'
+
+ +

Troubleshooting

+ +

Common Error Responses

+ +

“Method does not exist”

+ +
{
+  "code": 5,
+  "message": "Method does not exist.",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "service_control"
+    }
+  ]
+}
+
+ +

This is most commonly seen when the endpoint is misspelled or otherwise malformed. Check the spelling of your endpoint and that all required path parameters are provided in the right order.

+ +

“Invalid request URI”

+ +
{
+  "code": 3,
+  "message": "Invalid request URI",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +

This is most commonly seen when your request is missing a required path parameter. Make sure endpoints and parameters are both spelled correctly and provided in the right order.

+ +

Empty Response

+ +
{}
+
+ +

Sometimes your query might return an empty result. This is most commonly seen when the value provided for a parameter is misspelled or doesn’t exist. Make sure the values you are passing for parameters are spelled correctly.

+ +

“Could not find field <field> in the type”

+ +
{
+  "code": 3,
+  "message": "Could not find field \"variables\" in the type \"datacommons.v1.BulkVariableInfoRequest\".",
+  "details": [
+    {
+      "@type": "type.googleapis.com/google.rpc.DebugInfo",
+      "stackEntries": [],
+      "detail": "internal"
+    }
+  ]
+}
+
+ +

This is most commonly seen when a query parameter is misspelled or incorrect. Check the spelling of query parameters.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/info/place.html b/api/rest/v1/info/place.html new file mode 100644 index 000000000..8b6a312aa --- /dev/null +++ b/api/rest/v1/info/place.html @@ -0,0 +1,740 @@ + + + + + Place Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/info/place

+ +

Get basic information about a place.

+ +

This API returns basic information on a place, given the place’s DCID. The information provided includes the place’s name, type (city, state, country, etc.), as well as information on all parent places that contain the place queried.

+ + + + + +

Request

+

GET Request

+ +
+https://api.datacommons.org/v1/info/place/{PLACE_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
PLACE_DCID
Required
DCID of the place to query information for.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+    "entity": "Place DCID",
+    "info":
+    {
+        "self":
+        {
+            "dcid": "Place DCID",
+            "name": "Place Name",
+            "type": "State/City/Country/Etc"
+        },
+        "parents":
+        [
+            {
+                "dcid": "Containing Place DCID",
+                "name": "Containing Place Name",
+                "type": "State/City/Country/Etc"
+            }, ...
+        ]
+    }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entitystringDCID of the place queried.
infoobjectInformation about the place queried. Includes the name and type (city, state, country, etc.) of the place, as well as those of all “parent” places that contain the place queried (e.g. North America is a parent place of the United States).
+ +

Examples

+ +

Example 1: Get information on a single place

+ +

Get basic information about New York City (DCID: geoId/3651000).

+ +

Request:

+
$ curl --request GET --url \
+'https://api.datacommons.org/v1/info/place/geoId/3651000?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+
{
+  "entity": "geoId/3651000",
+  "info":
+  {
+    "self":
+    {
+      "dcid": "geoId/3651000",
+      "name": "New York",
+      "type": "City"
+    },
+    "parents":
+    [
+      {
+        "dcid": "geoId/36085",
+        "name": "Richmond County",
+        "type": "County"
+      },
+      {
+        "dcid": "geoId/36081",
+        "name": "Queens",
+        "type": "County"
+      },
+      {
+        "dcid": "geoId/36061",
+        "name": "Manhattan",
+        "type": "County"
+      },
+      {
+        "dcid": "geoId/36047",
+        "name": "Brooklyn",
+        "type": "County"
+      },
+      {
+        "dcid": "geoId/36005",
+        "name": "Bronx County",
+        "type": "County"
+      },
+      {
+        "dcid": "geoId/36",
+        "name": "New York",
+        "type": "State"
+      },
+      {
+        "dcid": "geoId/3651000",
+        "name": "New York",
+        "type": "City"
+      },
+      {
+        "dcid": "usc/MiddleAtlanticDivision",
+        "name": "Middle Atlantic Division",
+        "type": "CensusDivision"
+      },
+      {
+        "dcid": "country/USA",
+        "name": "United States",
+        "type": "Country"
+      },
+      {
+        "dcid": "usc/NortheastRegion",
+        "name": "Northeast Region"
+      },
+      {
+        "dcid": "northamerica",
+        "name": "North America",
+        "type": "Continent"
+      },
+      {
+        "dcid": "Earth",
+        "name": "Earth",
+        "type": "Place"
+      }
+    ]
+  }
+}
+
+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/info/variable-group.html b/api/rest/v1/info/variable-group.html new file mode 100644 index 000000000..e45c242df --- /dev/null +++ b/api/rest/v1/info/variable-group.html @@ -0,0 +1,717 @@ + + + + + Variable Group Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/info/variable-group

+ +

Get basic information about a variable group.

+ +

This API returns basic information of a variable group, given the variable group’s +DCID. The information provided includes the +display name, a list of child variables with their information, a list of child variable groups +with their information and the number of descendent variables.

+ + + + +

Request

+ +

GET Request

+ +
+https://api.datacommons.org/v1/info/variable-group/{VARIABLE_GROUP_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
VARIABLE_GROUP_DCID
Required
DCID of the variable group to query information for.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
constrained_entities
Optional
Repeated stringDCIDs of entities to filter by. If provided, the results will be filtered to only include the queried variable group’s descendent variables that have data for the queried entities.
+ +

Response

+ +

The response looks like:

+ +
{
+  "node": "dcid",
+  "info": {
+    "absoluteName": "variable group name",
+    "childStatVars": [
+      {
+        "id": "variable_id",
+        "displayName": "variable_name",
+        "searchNames": [
+          "search name"
+        ],
+        "definition": "variable_definition",
+        "hasData": true
+      },
+      ...
+    ],
+    "childStatVarGroups": [
+      {
+        "id": "child_variable_group_id",
+        "specializedEntity": "property name",
+        "displayName": "variable_name",
+        "descendentStatVarCount": 20
+      },
+      ...
+    ],
+    "descendentStatVarCount": 100,
+    "parentStatVarGroups": [
+      "parent_group_id"
+    ]
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the variable group queried.
infoobjectInformation about the variable group queried. Includes child variables and variable group information, number of descendent variables and all the parent variable groups.
+ +

Examples

+ +

Example 1: Get information on a single variable group

+ +

Get basic information about the variable group of female population (DCID: +dc/g/Person_Gender-Female).

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/info/variable-group/dc/g/Person_Gender-Female?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "node": "dc/g/Person_Gender-Female",
+  "info": {
+    "absoluteName": "Person With Gender = Female",
+    "childStatVars": [
+      {
+        "id": "LifeExpectancy_Person_Female",
+        "displayName": "Life expectancy at birth, female (years)",
+        "searchNames": [
+          "Life Expectancy of Person With Gender is Female"
+        ],
+        "definition": "mp=lifeExpectancy,pt=Person,gender=Female",
+        "hasData": true
+      },
+      ...
+    ],
+    "childStatVarGroups": [
+      {
+        "id": "dc/g/Person_ActivityDuration_Gender-Female",
+        "specializedEntity": "Activity Duration",
+        "displayName": "Person With Activity Duration, Gender = Female",
+        "descendentStatVarCount": 101
+      },
+      ...
+    ],
+    "descendentStatVarCount": 8949,
+    "parentStatVarGroups": [
+      "dc/g/Person_Gender"
+    ]
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/info/variable.html b/api/rest/v1/info/variable.html new file mode 100644 index 000000000..fd84730be --- /dev/null +++ b/api/rest/v1/info/variable.html @@ -0,0 +1,780 @@ + + + + + Variable Info - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/info/variable

+ +

Get basic information about a variable.

+ +

This API returns basic information on a variable, given the variable’s +DCID. The information provided includes the +number of entities that have data for the variable, the minimum and maximum +value observed, and the name and DCID of the top 3 entities with highest +observed values for that variable. The information is grouped by place type +(country, state, county, etc.).

+ + + + + +

Request

+ +

GET Request

+ +
+https://api.datacommons.org/v1/info/variable/{VARIABLE_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
VARIABLE_DCID
Required
DCID of the variable to query information for.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "node": "dcid",
+  "info": {
+    "placeTypeSummary": {
+      "Country/State/City/Etc": {
+        "topPlaces": [{ "dcid": "dcid", "name": "Place Name" }],
+        "placeCount": 123,
+        "minValue": 123456,
+        "maxValue": 123456
+      }, ...
+    },
+    "provenanceSummary": {
+      "provenance_dcid": {
+        "importName": "Import_Name",
+        "releaseFrequency": "P<N>Y",
+        "seriesSummary": [
+          {
+            "seriesKey": { "observationPeriod": "P<N>Y" },
+            "earliestDate": "YYYY-MM-DD",
+            "latestDate": "YYYY-MM-DD",
+            "placeTypeSummary": {
+              "County/Country/State/Etc": {
+                "topPlaces": [
+                  { "dcid": "dcid", "name": "Place Name" },
+                  { "dcid": "dcid", "name": "Place Name" },
+                  { "dcid": "dcid", "name": "Plance Name" }
+                ],
+                "placeCount": 123,
+                "minValue": 12,
+                "maxValue": 123456
+              }, ...
+            },
+            "minValue": 12,
+            "maxValue": 123456,
+            "observationCount": 123,
+            "timeSeriesCount": 123
+          }
+        ],
+        "observationCount": 1234,
+        "timeSeriesCount": 1234
+      }
+    }
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the variable queried.
infoobjectInformation about the variable queried. Includes maximum and minimum values, and number of places with data on the variable queried, grouped by place type (country-level, state-level, city-level, etc. statistics are grouped together). Also includes information about the provenance of data for the variable queried.
+ +

Examples

+ +

Example 1: Get information on a single variable

+ +

Get basic information about the variable for number of farms (DCID: +Count_Farm).

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/info/variable/Count_Farm?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "node": "Count_Farm",
+  "info": {
+    "placeTypeSummary": {
+      "Country": {
+        "topPlaces": [{ "dcid": "country/USA", "name": "United States" }],
+        "placeCount": 1,
+        "minValue": 123456,
+        "maxValue": 2042220
+      },
+      "State": {
+        "topPlaces": [
+          { "dcid": "geoId/06", "name": "California" },
+          { "dcid": "geoId/48", "name": "Texas" },
+          { "dcid": "geoId/12", "name": "Florida" }
+        ],
+        "placeCount": 50,
+        "minValue": 990,
+        "maxValue": 248416
+      },
+      "County": {
+        "topPlaces": [
+          { "dcid": "geoId/06037", "name": "Los Angeles County" },
+          { "dcid": "geoId/17031", "name": "Cook County" },
+          { "dcid": "geoId/48201", "name": "Harris County" }
+        ],
+        "placeCount": 3076,
+        "minValue": 2,
+        "maxValue": 5551
+      }
+    },
+    "provenanceSummary": {
+      "dc/m02b5p": {
+        "importName": "USDA_AgricultureCensus",
+        "releaseFrequency": "P5Y",
+        "seriesSummary": [
+          {
+            "seriesKey": { "observationPeriod": "P5Y" },
+            "earliestDate": "2017",
+            "latestDate": "2017",
+            "placeTypeSummary": {
+              "County": {
+                "topPlaces": [
+                  { "dcid": "geoId/06037", "name": "Los Angeles County" },
+                  { "dcid": "geoId/17031", "name": "Cook County" },
+                  { "dcid": "geoId/48201", "name": "Harris County" }
+                ],
+                "placeCount": 3076,
+                "minValue": 2,
+                "maxValue": 5551
+              },
+              "Country": {
+                "topPlaces": [
+                  { "dcid": "country/USA", "name": "United States" }
+                ],
+                "placeCount": 1,
+                "minValue": 2042220,
+                "maxValue": 2042220
+              },
+              "State": {
+                "topPlaces": [
+                  { "dcid": "geoId/06", "name": "California" },
+                  { "dcid": "geoId/48", "name": "Texas" },
+                  { "dcid": "geoId/12", "name": "Florida" }
+                ],
+                "placeCount": 50,
+                "minValue": 990,
+                "maxValue": 248416
+              }
+            },
+            "minValue": 2,
+            "maxValue": 2042220,
+            "observationCount": 3127,
+            "timeSeriesCount": 3127
+          }
+        ],
+        "observationCount": 3127,
+        "timeSeriesCount": 3127
+      }
+    }
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/observations/point.html b/api/rest/v1/observations/point.html new file mode 100644 index 000000000..a2f7e67e9 --- /dev/null +++ b/api/rest/v1/observations/point.html @@ -0,0 +1,696 @@ + + + + + Single Observation - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/observations/point

+ +

Retrieve a specific observation at a set date from a variable for an entity from the +preferred facet. If no date is provided, the latest +observation is returned.

+ + + +

Request

+ +

GET Request

+ +
+https://api.datacommons.org/v1/observations/point/{ENTITY_DCID}/{VARIABLE_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + + + + + +
NameDescription
VARIABLE_DCID
Required
DCID of the variable to query a value for.
ENTITY_DCID
Required
DCID of the entity that the variable describes.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
date
Optional
typeDatetime of measurement of the value requested in ISO 8601 format. To see the dates available, look up the variable in the Statistical Variable Explorer. If date is not provided, the latest available datapoint is returned.
+ +

Response

+ +

The response looks like:

+ +
{
+ "date": "YYYY-MM-DD",
+ "value": 1234,
+ "facet": {...},
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
valuetypeValue of the variable queried for the queried entity.
datestringDatetime the value returned was measured.
facetdictMetadata on the facet the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get latest observation for given variable and entity

+ +

Get the population count (DCID: Count_Person ) for the United States of America (DCID: country/USA ). Note that the latest entry available will be returned.

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/observations/point/country/USA/Count_Person?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "date": "2020",
+  "value": 331449281,
+  "facet": {
+    "importName": "USDecennialCensus_RedistrictingRelease",
+    "provenanceUrl": "https://www.census.gov/programs-surveys/decennial-census/about/rdo/summary-files.html",
+    "measurementMethod": "USDecennialCensus"
+  }
+}
+
+ +

Example 2: Get single observation at a specific date, for given variable and entity

+ +

Get the annual electricity generation (DCID: Annual_Generation_Electricity ) of California (DCID: geoId/06 ) in 2018.

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/observations/point/geoId/06/Annual_Generation_Electricity?date=2018&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+ {
+   "date": "2018",
+   "value": 195465638180,
+   "facet": {
+     "importName": "EIA_Electricity",
+     "provenanceUrl": "https://www.eia.gov/opendata/qb.php?category=0",
+     "unit": "KilowattHour"
+   }
+ }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/observations/series.html b/api/rest/v1/observations/series.html new file mode 100644 index 000000000..8e485b97b --- /dev/null +++ b/api/rest/v1/observations/series.html @@ -0,0 +1,687 @@ + + + + + Series of Observations - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/observations/series

+ +

Retrieve series of observations from a specific variable for an entity from the preferred facet.

+ + + +

Request

+

GET Request

+ +
+https://api.datacommons.org/v1/observations/series/{ENTITY_DCID}/{VARIABLE_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + + + + + +
NameDescription
VARIABLE_DCID
Required
DCID of the variable to query a value for.
ENTITY_DCID
Required
DCID of the entity that the variable describes.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "observations": [
+    {
+      "date": "YYYY-MM-DD",
+      "value": 1234
+    }, ...
+  ],
+  "facet": {
+    "importName": "Name",
+      "provenanceUrl": "https://provenance.url/",
+      "measurementMethod": "MeasurementMethod",
+      "unit": "unit"
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
observationslistA list of {date, value} pairs for the variable queried, where date is the date of measurement and value the measured value for the variable. Pairs are returned in chronological order.
facetdictMetadata on the facet the data came from. Can include things like provenance, measurement method, and units.
+ +

Examples

+ +

Example 1: Get the time series for a given variable and entity from a preferred facet.

+ +

Get the mean rainfall (DCID: Mean_Rainfall ) for New Delhi, India (DCID: wikidataId/Q 987).

+ +

Request:

+ +
$ curl --request GET --url \
+'https://api.datacommons.org/v1/observations/series/wikidataId/Q987/Mean_Rainfall?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "observations": [
+    {
+      "date": "1901-01",
+      "value": 1.13871
+    },
+    {
+      "date": "1901-02",
+      "value": 0.487143
+    },
+      
+    <... output truncated for brevity ...>
+ 
+    {
+      "date": "2022-02",
+      "value": 1.07331
+    },
+    {
+      "date": "2022-03"
+    }
+  ],
+  "facet": {
+    "importName": "NOAA_EPA_Observed_Historical_Weather",
+    "provenanceUrl": "https://www.noaa.gov/",
+    "measurementMethod": "NASAGSOD_NASAGHCN_EPA",
+    "unit": "Millimeter"
+  }
+}
+ 
+
+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/properties.html b/api/rest/v1/properties.html new file mode 100644 index 000000000..30586b3bf --- /dev/null +++ b/api/rest/v1/properties.html @@ -0,0 +1,734 @@ + + + + + Properties - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/properties

+ +

Get all properties associated with a specific node.

+ +

More specifically, this endpoint returns the labels of the edges connected to a +specific node in the Data Commons Knowledge Graph. Edges in the graph are +directed, so properties can either be labels for edges towards or away from +the node. Outgoing edges correspond to properties of the node. Incoming edges +denote that the node is the value of this property for some other node.

+ + + +

Request

+ +

GET Request

+ +
+http://api.datacommons.org/v1/properties/{EDGE_DIRECTION}/{NODE_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out.

If in, returns properties for which the queried node is a value. If out, returns properties that describe the queried node.
NODE_DCID
Required
DCID of the node to query.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "node": "Node DCID",
+  "properties": [
+    "property_name_1",
+    "property_name_2",
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringDCID of the node queried.
propertieslistList of properties connected to the node queried, for the direction specified in the request.
+ +

Examples

+ +

Example 1: Get properties describing a node

+ +

Get all properties that describe the city of Chicago, IL, USA (DCID: +geoId/1714000).

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/properties/out/geoId/1714000'
+
+ +

Response:

+ +
{
+  "node": "geoId/1714000",
+  "properties": [
+    "alternateName",
+    "ansiCode",
+    "archinformLocationId",
+    "babelnetId",
+    "brockhausEncylcopediaOnlineId",
+    "censusAreaDescriptionCode",
+    "censusFunctionalStatusCode",
+    "containedInPlace",
+    "czechNkcrAutId",
+    "encyclopediaBritannicaOnlineId",
+    "encyclopediaUniversalisId",
+    "facebookPlacesId",
+    "finlandYsoId",
+    "fips553",
+    "franceNationalLibraryId",
+    "geoId",
+    "geoJsonCoordinates",
+    "geoOverlaps",
+    "gettyThesaurusOfGeographicNamesId",
+    "gndId",
+    "gnisId",
+    "granEnciclopediaCatalanaId",
+    "iataAirportCode",
+    "israelNationalLibraryId",
+    "kmlCoordinates",
+    "landArea",
+    "latitude",
+    "libraryOfCongressAuthorityId",
+    "longitude",
+    "musicbrainzAreaId",
+    "name",
+    "nameWithLanguage",
+    "nationalDietLibraryId",
+    "nearbyPlaces",
+    "osmRelationId",
+    "postalCode",
+    "provenance",
+    "quoraTopicId",
+    "swedishNationalEncyclopediaId",
+    "typeOf",
+    "unitedKingdomParliamentThesaurusId",
+    "unitedNationsLocode",
+    "unitedStatesNationalArchivesIdentifier",
+    "uppsalaUniversityAlvinId",
+    "viafId",
+    "waterArea",
+    "whereOnEarthId",
+    "whosOnFirstId",
+    "wikidataId",
+    "worldcatIdentitiesId"
+  ]
+}
+
+ +

Example 2: Get properties that have the queried node as a value

+ +

Find all properties that have carbon dioxide (DCID: CarbonDioxide) as a value.

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/properties/in/CarbonDioxide?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "node": "CarbonDioxide",
+  "properties": ["emittedThing"]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/property/values.html b/api/rest/v1/property/values.html new file mode 100644 index 000000000..013a90f4a --- /dev/null +++ b/api/rest/v1/property/values.html @@ -0,0 +1,728 @@ + + + + + Property Values - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/property/values

+ +

Get the values of a property for a specific node.

+ +

Data Commons represents properties as labels of directed edges between nodes, +where the successor node is a value of the property. Thus, this endpoint returns +nodes connected to the queried node via the property queried.

+ +

Note: If you want to query values for the property containedInPlace, consider +using /v1/property/values/linked +instead.

+ + + +

Request

+ +

GET Request

+ +
+http://api.datacommons.org/v1/property/values/{EDGE_DIRECTION}/{NODE}/{PROPERTY}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out.

If in, returns nodes for which the queried node is a property value. If out, returns values of properties describing the node queried.
NODE
Required
DCID of the node to query.
PROPERTY
Required
DCID of the property to query.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "values":
+  [
+    {
+      "property_1_of_connected_node": "value",
+      "property_2_of_connected_node": "value",
+      ...
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + +
NameTypeDescription
valuesobjectvalues of the property queried, for the node queried.
+ +

Examples

+ +

Example 1: Get the value of a property for an node

+ +

Get the name of the node with DCID geoId/sch3620580 by querying the property +name.

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/property/values/out/geoId/sch3620580/name?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "values": [
+    {
+      "provenanceId": "dc/sm3m2w3",
+      "value": "New York City Department Of Education"
+    }
+  ]
+}
+
+ +

Example 2: Get the nodes that have the queried node as a property value

+ +

Get a list of natural disasters in Madagascar (DCID: country/MDG) by querying +the property affectedPlace.

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/property/values/in/country/MDG/affectedPlace?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "values":
+  [
+    {
+      "name": "Unnamed SouthIndian Cyclone (1912324S11066)",
+      "types":
+      [
+        "CycloneEvent"
+      ],
+      "dcid": "cyclone/ibtracs_1912324S11066",
+      "provenanceId": "dc/xwq0y5"
+    },
+    {
+      "name": "Unnamed SouthIndian Cyclone (1913022S12053)",
+      "types":
+      [
+        "CycloneEvent"
+      ],
+      "dcid": "cyclone/ibtracs_1913022S12053",
+      "provenanceId": "dc/xwq0y5"
+    },
+    < ... output  truncated for brevity ... >
+    {
+      "name": "32 km SSE of Maroantsetra, Madagascar",
+      "types":
+      [
+        "EarthquakeEvent"
+      ],
+      "dcid": "earthquake/usp000h6zw",
+      "provenanceId": "dc/xz8ndk3"
+    },
+    {
+      "name": "23 km ENE of Amparafaravola, Madagascar",
+      "types":
+      [
+        "EarthquakeEvent"
+      ],
+      "dcid": "earthquake/usp000jgbb",
+      "provenanceId": "dc/xz8ndk3"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/property/values/in/linked.html b/api/rest/v1/property/values/in/linked.html new file mode 100644 index 000000000..487b41542 --- /dev/null +++ b/api/rest/v1/property/values/in/linked.html @@ -0,0 +1,685 @@ + + + + + Property Values (linked) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/property/values/in/linked

+ +

Return property values for properties that can be +chained for multiple degrees in the knowledge graph.

+ + + +

For example, in the following diagram:

+ +

Example of a chained property

+ +

The property containedInPlace is chained. Buenos Aires is contained in +Argentina, which is itself contained in South America – implying Buenos Aires +is also contained in South America. With this endpoint, you could query for +countries in South America (returning Argentina) or for cities in South America +(returning Buenos Aires).

+ + + +

Request

+ +

GET Request

+ +
+http://api.datacommons.org/v1/property/values/in/linked/{CONTAINING_PLACE}/containedInPlace?value_node_type={place_type}&key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
CONTAINING_PLACE
Required
DCID of the parent place to query.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
value_node_type
Required
stringThe type of place to get results for (e.g. state, country, city, county). For a list of available values, see the Knowledge Graph page on Place.
+ +

Response

+ +

The response looks like:

+ +
{
+  "values":
+  [
+    {
+      "name": "Place Name",
+      "dcid": "Place DCID"
+    }, ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + +
NameTypeDescription
valueslistList of place nodes that are contained in the queried parent place.
+ +

Examples

+ +

Example 1: Get all states in a country.

+ +

Get all states in India (DCID: country/IND).

+ +

Request:

+
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/property/values/in/linked/country/IND/containedInPlace?value_node_type=State&key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+
{
+  "values":
+  [
+    {
+      "name": "Gujarat",
+      "dcid": "wikidataId/Q1061"
+    },
+    {
+      "name": "Andhra Pradesh",
+      "dcid": "wikidataId/Q1159"
+    },
+    < ... output truncated for brevity ...>
+    {
+      "name": "Daman and Diu",
+      "dcid": "wikidataId/Q66710"
+    },
+    {
+      "name": "Telangana",
+      "dcid": "wikidataId/Q677037"
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/query.html b/api/rest/v1/query.html new file mode 100644 index 000000000..049d8c37e --- /dev/null +++ b/api/rest/v1/query.html @@ -0,0 +1,746 @@ + + + + + SPARQL - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/query

+ +

Query the Data Commons knowledge graph using +SPARQL.

+ +

This endpoint makes it possible to query the Data Commons knowledge graph using +SPARQL. SPARQL is a query language developed to retrieve data from RDF graph +content on the web. It leverages the graph structure innate in the data it +queries to return specific information to an end user.

+ +

Request

+ +

POST Request

+ +
+URL: +https://api.datacommons.org/v1/query + +Header: +X-API-Key: {your_api_key} + +JSON Data: +{ "sparql": "your SPARQL query here" } +
+ + + +

Path Parameters

+ +

There are no path parameters for this endpoint.

+ +

Query Parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
sparql
Required
stringA SPARQL query string.
In the query, each variable should have a typeOf condition (e.g. ?var typeOf City).
+ +

Response

+ +

The response looks like:

+ +
{
+  "header": [
+    <String>
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": <String>
+        }
+      ]
+    },
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerlistList of strings corresponding to the query variables.
rowslistList of row objects, with each containing a list of cells and its cell values.
cellsobjectContains string field value corresponding to the queried variable.
+ +

Examples

+ +

Example 1: Query the Data Commons knowledge graph with SPARQL

+ +

Retrieve a list of 10 biological specimens (DCID: BiologicalSpecimen) in +reverse alphabetical order.

+ +

Request:

+ +
curl --request POST \
+  --url https://api.datacommons.org/v1/query \
+  --header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
+  --data '{
+            "sparql": "SELECT ?name \
+                WHERE { \
+                  ?biologicalSpecimen typeOf BiologicalSpecimen . \
+                  ?biologicalSpecimen name ?name
+                }
+                ORDER BY DESC(?name)
+                LIMIT 10"
+}'
+
+ +

Response:

+ +
{
+  "header": ["?name"],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "x Triticosecale"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/triples.html b/api/rest/v1/triples.html new file mode 100644 index 000000000..76e5decd1 --- /dev/null +++ b/api/rest/v1/triples.html @@ -0,0 +1,763 @@ + + + + + Triples - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/triples

+ +

Get a triple.

+ +

Useful for finding local connections between nodes of the Data Commons knowledge +graph.

+ + + +

Request

+ +

GET Request

+ +
+http://api.datacommons.org/v1/triples/{EDGE_DIRECTION}/{NODE_DCID}?key={api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + + + + + +
NameDescription
EDGE_DIRECTION
Required
One of in or out. Denotes direction of edges to get triples for.

If in, returns triples with edges pointing toward the node provided. If out, returns triples with edges pointing away from the node provided.
NODE_DCID
Required
DCID of the node to query.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "triples":
+  {
+    "property_describing_node_queried_1":
+    {
+      "nodes":
+      [
+        {
+          "property_1": "value",
+          "property_2": "value",
+          ...
+        }, ...
+      ]
+    }, ...
+  }
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + +
NameTypeDescription
triplesobjectA nested JSON object containing DCIDs of both properties that describe the node queried, and nodes connected to the queried node via those properties.
+ +

Examples

+ +

Example 1: Get triples of outgoing edges

+ +

Get triples for the node representing Carbon Dioxide (DCID: CarbonDioxide), +where edges point away from the node for Carbon Dioxide.

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/triples/out/CarbonDioxide?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "triples": {
+    "description": {
+      "nodes": [
+        {
+          "provenanceId": "dc/5l5zxr1",
+          "value": "A colorless gas consisting of a carbon atom covalently double bonded to two oxygen atoms."
+        }
+      ]
+    },
+    "descriptionUrl": {
+      "nodes": [
+        {
+          "provenanceId": "dc/5l5zxr1",
+          "value": "https://en.wikipedia.org/wiki/Carbon_dioxide"
+        }
+      ]
+    },
+    "name": {
+      "nodes": [
+        {
+          "provenanceId": "dc/5l5zxr1",
+          "value": "Carbon Dioxide"
+        },
+        {
+          "provenanceId": "dc/5l5zxr1",
+          "value": "CarbonDioxide"
+        }
+      ]
+    },
+    "provenance": {
+      "nodes": [
+        {
+          "name": "https://datacommons.org",
+          "types": ["Provenance"],
+          "dcid": "dc/5l5zxr1",
+          "provenanceId": "dc/5l5zxr1"
+        }
+      ]
+    },
+    "typeOf": {
+      "nodes": [
+        {
+          "name": "GasType",
+          "types": ["Class"],
+          "dcid": "GasType",
+          "provenanceId": "dc/5l5zxr1"
+        },
+        {
+          "name": "GreenhouseGas",
+          "types": ["Class"],
+          "dcid": "GreenhouseGas",
+          "provenanceId": "dc/5l5zxr1"
+        }
+      ]
+    }
+  }
+}
+
+ +

Example 2: Get triples of incoming edges

+ +

Get triples for the node representing Carbon Dioxide (DCID: CarbonDioxide), +where edges point towards the node Carbon Dioxide.

+ +

Request:

+ +
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/triples/in/CarbonDioxide?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
+
+ +

Response:

+ +
{
+  "triples": {
+    "emittedThing": {
+      "nodes": [
+        {
+          "name": "CO2 Emissions Per Capita",
+          "types": ["StatisticalVariable"],
+          "dcid": "Amount_Emissions_CarbonDioxide_PerCapita",
+          "provenanceId": "dc/d7tbsb1"
+        },
+        {
+          "name": "Annual Amount of Emissions: Biogenic Emission Source, Carbon Dioxide",
+          "types": ["StatisticalVariable"],
+          "dcid": "Annual_Emissions_CarbonDioxide_Biogenic",
+          "provenanceId": "dc/d7tbsb1"
+        },
+        {
+          "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Carbon Dioxide",
+          "types": ["StatisticalVariable"],
+          "dcid": "Annual_Emissions_CarbonDioxide_NonBiogenic",
+          "provenanceId": "dc/d7tbsb1"
+        },
+        {
+          "types": ["StatisticalVariable"],
+          "dcid": "dc/pelkj2pkyww1",
+          "provenanceId": "dc/6zzrcr2"
+        }
+      ]
+    }
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v1/variables.html b/api/rest/v1/variables.html new file mode 100644 index 000000000..ffb7c8e7f --- /dev/null +++ b/api/rest/v1/variables.html @@ -0,0 +1,663 @@ + + + + + Variables - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v1/variables

+ +

Get all variables with data associated with a specific entity.

+ + + +

Request

+ +

GET Request

+ +
+http://api.datacommons.org/v1/variables/{ENTITY_DCID}?key={your_api_key} +
+ + + +

Path Parameters

+ + + + + + + + + + + + + + +
NameDescription
ENTITY_DCID
Required
DCID of the entity to query.
+ +

Query Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the page on authentication for a demo key, as well as instructions on how to get your own key.
+ +

Response

+ +

The response looks like:

+ +
{
+  "entity": "Entity DCID",
+  "variables": [
+    "variable_dcid_1",
+    "variable_dcid_2",
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entitystringDCID of the entity queried.
variableslistList of variables associated with the entity queried.
+ +

Examples

+ +

Example 1: Get variables for an entity

+ +

Get all properties that describe the city of Hagåtña, the capital of Guam. (DCID: wikidataId/Q30988).

+ +

Request:

+
  $ curl --request GET --url \
+  'https://api.datacommons.org/v1/variables/wikidataId/Q30988'
+
+ +

Response:

+
{
+  "entity": "wikidataId/Q30988",
+  "variables": [
+    "Count_Person",
+    "Max_Rainfall",
+    "Max_Snowfall",
+    "Max_Temperature",
+    "Mean_BarometricPressure",
+    "Mean_Rainfall",
+    "Mean_Snowfall",
+    "Mean_Temperature",
+    "Mean_Visibility",
+    "Min_Rainfall",
+    "Min_Snowfall",
+    "Min_Temperature"
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/getting_started.html b/api/rest/v2/getting_started.html new file mode 100644 index 000000000..39814bd49 --- /dev/null +++ b/api/rest/v2/getting_started.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/api/rest/v2/index.html b/api/rest/v2/index.html new file mode 100644 index 000000000..e1f977090 --- /dev/null +++ b/api/rest/v2/index.html @@ -0,0 +1,861 @@ + + + + + REST (V2) - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons REST API V2

+ + + +

Overview

+ +

The Data Commons REST API is a +REST library +that enables developers to programmatically access data in the Data Commons +knowledge graph, using HTTP. This allows you to explore the structure of the +graph, integrate statistics from the graph into data analysis applications and +much more.

+ +

Following HTTP, a REST API call consists of a request that you provide, and a response from the Data Commons servers with the data you requested, in JSON format. You can use the REST API with any tool or language that supports HTTP. You can make queries on the command line (e.g. using cURL), by scripting HTTP requests in another language like Javascript, or even by entering an endpoint into your web browser!

+ +

What’s new in V2

+ +

The V2 API collapses functionality from the V1 API into a smaller number of endpoints, by introducing a syntax for relation expressions, described below. Each API endpoint can also handle both single and bulk requests.

+ +

Service endpoints

+ +

You make requests through API endpoints. You access each endpoint using its unique URL, which is a combination of a base URL and the endpoint’s URI.

+ +

The base URL for all REST endpoints is:

+ +
+https://api.datacommons.org/VERSION
+
+ +

The current version is v2.

+ +

To access a particular endpoint, append the URI to the base URL (e.g. https://api.datacommons.org/v2/node ). +The URIs for the V2 API are below:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
APIURI pathDescription
Node/nodeFetches information about edges and neighboring nodes
Observation/observationFetches statistical observations
Resolve entities/resolveReturns a Data Commons ID (DCID) for entities in the graph
SPARQL/v2/sparqlReturns matches to a SPARQL graph query
+ +

Endpoints for custom instances

+ +

If you are running your own Data Commons, the URL/URI endpoints are slightly different:

+ +
+CUSTOM_URL/core/api/v2
+
+ +

Query parameters

+ +

Endpoints take a set of parameters which allow you to specify the entities, variables, timescales, etc. you are interested in. The V2 APIs only use query parameters.

+ +

Query parameters are chained at the end of a URL behind a ? symbol. Separate multiple parameter entries with an & symbol. For example, this would look like:

+ +
+https://api.datacommons.org/v2/node?key=API_KEY&nodes=DCID1&nodes=DCID2&property=<-*
+
+ +

Still confused? Each endpoint’s documentation page has examples at the bottom tailored to the endpoint you’re trying to use.

+ +

POST requests

+ +

All V2 endpoints allow for POST requests. For POST requests, feed all parameters in JSON format. For example, in cURL, this would look like:

+ +
+curl -X POST \
+-H "X-API-Key: API_KEY" \
+--url https://api.datacommons.org/v2/node \
+--data '{
+  "nodes": [
+    "geoId/06085",
+    "geoId/06086"
+  ],
+  "property": "->[name, latitude, longitude]"
+}'
+
+ +

Authentication

+ +

All access to base Data Commons using the REST APIs must be authenticated and authorized with an API key.

+ +

We provide a trial API key for general public use. This key will let you try the API and make single requests.

+ + + +

The trial key is capped with a limited quota for requests. If you are planning on using our APIs more rigorously (e.g. for personal or school projects, developing applications, etc.) please request an official key without any quota limits; please see Obtain an API key for information.

+ +
+

Note: If you are sending API requests to a custom Data Commons instance, do not include any API key in the requests.

+
+ +

To include an API key, add your API key to the URL as a query parameter by appending ?key=API_KEY.

+ +

For GET requests, this looks like:

+ +
+https://api.datacommons.org/v2/ENDPOINT?key=API_KEY
+
+ +

If the key is not the first query parameter, use &key=API_KEY instead. This looks like:

+ +
+https://api.datacommons.org/v2/ENDPOINT?QUERY=VALUE&key=API_KEY
+
+ +

For POST requests, pass the key as a header. For example, in cURL, this looks like:

+ +
+curl -X POST \
+--url https://api.datacommons.org/v2/node \
+--header 'X-API-Key: API_KEY' \
+--data '{
+  "nodes": [
+    "ENTITY_DCID_1",
+    "ENTITY_DCID_2",
+    ...
+  ],
+  "property: "RELATION_EXPRESSION"
+}'
+
+ +

Find available entities, variables, and their DCIDs

+ +

Many requests require the DCID of the entity or variable you wish to query. For tips on how to find relevant DCIDs, entities and variables, please see the Key concepts document, specifically the following sections:

+ + + +

Relation expressions

+ +

Data Commons represents real world entities and data as nodes. These +nodes are connected by directed edges, or arcs, to form a knowledge graph. The +label of the arc is the name of the property.

+ +

Relation expressions include arrow annotation and other symbols in the syntax to +represent neighboring nodes, and to support chaining and filtering. +These new expressions allow all of the functionality of the V1 API to be +expressed with fewer API endpoints in V2. All V2 API calls require relation +expressions in the property or expression parameter.

+ +

The following table describes symbols in the V2 API relation expressions:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
->An outgoing arc
<-An incoming arc
{PROPERTY:VALUE}Filtering; identifies the property and associated value
[]Multiple properties, separated by commas
*All properties linked to this node
+One or more expressions chained together for indirect relationships, like containedInPlace+{typeOf:City}
+ +

Incoming and outgoing arcs

+ +

Arcs in the Data Commons Graph have directions. In the example below, for the node Argentina, the property containedInPlace exists in both in and out directions, illustrated in the following figure:

+ +

+ +

Note the directionality of the property containedInPlace: incoming arc represents “Argentina contains Buenos Aires”, while the outgoing arc represents “Argentina is in South America”.

+ +

Nodes for outgoing arcs are represented by ->, while nodes for incoming arcs +arcs are represented by <-. To illustrate using the above example:

+ +
    +
  • Regions that include Argentina (DCID: country/ARG): country/ARG->containedInPlace
  • +
  • All cities directly contained in Argentina (DCID: country/ARG): country/ARG<-containedInPlace{typeOf:City}
  • +
+ +

Filters

+ +

You can use filters to reduce results to only match nodes with a specified property and value. Use {} to specify property:value pairs to define the filter. Using the same example, country/ARG<-containedInPlace+{typeOf:City} only returns nodes with the typeOf:City, filtering out typeOf:AdministrativeArea1 and so on.

+ +

Specify multiple properties

+ +

You can combine multiple properties together within []. For example, to request a few outgoing arcs for a node, use +->[name, latitude, longitude]. See more in this Node API example).

+ +

Wildcard

+ +

To retrieve all properties linked to a node, use the * wildcard, e.g. <-*. +See more in this Node API example.

+ +

Chain properties

+ +

Use + to express a chain expression. A chain expression represents requests for information about nodes +which are connected by the same property, but are a few hops away. This is supported only for the containedInPlace property.

+ +

To illustrate again using the Argentina example:

+
    +
  • All cities directly contained in Argentina (dcid: country/ARG): country/ARG<-containedInPlace{typeOf:City}
  • +
  • All cities indirectly contained in Argentina (dcid: country/ARG): country/ARG<-containedInPlace+{typeOf:City}
  • +
+ +

URL-encoding reserved characters in GET requests

+ +

HTTP GET requests do not allow some of the characters used by Data Commons DCIDs and relation expressions. When sending GET requests, you may need to use the corresponding percent codes for reserved characters. For example, a query string such as the following:

+ +
https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*
+
+

should be encoded as:

+ +
https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId%2F06&property=%3C-%2A
+
+ +

Although sometimes the original characters may work, it’s safest to always encode them.

+ +
+

Tip: Don’t URL-encode delimiters between parameters (&), separators between parameter names and values (=), or -.

+
+ +

See https://www.w3schools.com/tags/ref_urlencode.ASP for a handy reference.

+ +

Pagination

+ +

When the response to a request is too long, the returned payload is +paginated. Only a subset of the response is returned, along with a long string +of characters called a token. To get the next set of entries, repeat the +request with nextToken as an query parameter, with the token as its value.

+ +

For example, the request:

+ +
curl --request GET \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId%2F06&property=%3C-%2A'
+
+ +

will return something like:

+ +
{
+  "data": {
+    "geoId/06": {
+      "arcs": < ... output truncated for brevity ...>
+    },
+  },
+  "nextToken": "SoME_veRy_L0ng_STrIng"
+}
+
+ +

To get the next set of entries, repeat the previous command and append the nextToken:

+ +
curl --request GET \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId%2F06&property=%3C-%2A&nextToken=SoME_veRy_L0ng_STrIng'
+
+ +

Similarly for POST requests, this would look like:

+ +
curl -X POST \
+-H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+--url https://api.datacommons.org/v2/node \
+--data '{
+  "nodes": "geoId/06",
+  "property": "<-*",
+  "nextToken": "SoME_veRy_L0ng_STrIng"
+}'
+
+

You must URL-encode any special characters that appear in the string.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/node.html b/api/rest/v2/node.html new file mode 100644 index 000000000..3a6f5bb78 --- /dev/null +++ b/api/rest/v2/node.html @@ -0,0 +1,1285 @@ + + + + + Get node properties - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v2/node

+ + + +

Data Commons represents node relations as directed edges between nodes, or +properties. The name of the property is a label, while the target node is the value of +the property. The Node API returns the property labels and values that are +connected to the queried node. This is useful for +finding local connections between nodes of the Data Commons knowledge graph.

+ +

More specifically, this API can perform the following tasks:

+
    +
  • Get all property labels associated with individual or multiple nodes.
  • +
  • Get the values of a property for individual or multiple nodes. These can also +be chained for multiple hops in the graph.
  • +
  • Get all connected nodes that are linked with individual or multiple nodes.
  • +
+ +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=DCID_LIST&property=RELATION_EXPRESSION +
+ +
+URL: +https://api.datacommons.org/v2/node + +Header: +X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI + +JSON data: +{ + "nodes": [ + "NODE_DCID_1", + "NODE_DCID_2", + ... + ], + "property": "RELATION_EXPRESSION" +} + +
+ + + + + +

Query parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the section on authentication for details.
nodes
Required
list of stringsList of the DCIDs of the nodes to query.
property
Required
stringProperty to query, represented with symbols including arrow notation. For more details, see relation expressions. By using different property parameters, you can query node information in different ways, such as getting the edges and neighboring node values. Examples below show how to request this information for one or multiple nodes.
+ +

Response

+ +

The response looks like:

+ +
+{
+  "data": {
+    "NODE_DCID": {
+      "arcs": {
+        "LABEL": {
+          "nodes": [
+            ...
+          ]
+        }
+        ...
+      },
+      "properties": [
+        "VALUE",
+      ],
+    }
+  }
+  "nextToken": "TOKEN_STRING"
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
dataobjectData of the property label and value information, keyed by the queried nodes
nextTokenstringA token used to query next page of data
+ +

Examples

+ +

Example 1: Get all incoming arc labels for a given node

+ +

Get all incoming arc property labels of the node with DCID geoId/06 by querying all properties with the <- symbol. This returns just the property labels but not the property values.

+ +

Parameters:

+ +
nodes: "geoId/06"
+property: "<-"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId%2F06&property=%3C-'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["geoId/06"], "property": "<-"}'
+
+ +

Response:

+ +
{
+  "data": {
+    "geoId/06": {
+      "properties": [
+        "affectedPlace",
+        "containedInPlace",
+        "location",
+        "member",
+        "overlapsWith"
+      ]
+    }
+  }
+}
+
+ +

Example 2: Get one property for a given node

+ +

Get a name property for a given node with DCID dc/03lw9rhpendw5 by querying the ->name symbol.

+ +

Parameters:

+ +
nodes: "dc/03lw9rhpendw5"
+property: "->name"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=dc%2F03lw9rhpendw5&property=-%3Ename'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["dc/03lw9rhpendw5"], "property": "->name"}'
+
+ +

Response:

+ +
{
+  "data": {
+    "dc/03lw9rhpendw5": {
+      "arcs": {
+        "name": {
+          "nodes": [
+            {
+              "provenanceId": "dc/base/EIA_860",
+              "value": "191 Peachtree Tower"
+            }
+          ]
+        }
+      }
+    }
+  }
+}
+
+ +

Example 3: Get multiple property values for multiple nodes

+ +

Get name, latitude, and longitude values for several nodes: geoId/06085 +and geoId/06087. Note that multiple properties for a given node must be +enclosed in square brackets [].

+ +

Parameters:

+ +
nodes: "geoId/06085", "geoId/06087"
+property: "->[name, latitude, longitude]"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId%2F06085&nodes=geoId%2F06087&property=-%3E%5Bname,%20latitude,%20longitude%5D'
+
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["geoId/06085", "geoId/06087"], "property": "->[name, latitude, longitude]"}'
+
+ +

Response:

+ +
{
+   "data" : {
+      "geoId/06085" : {
+         "arcs" : {
+            "latitude" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "37.221614"
+                  },
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "37.36"
+                  }
+               ]
+            },
+            "longitude" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "-121.68954"
+                  },
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "-121.97"
+                  }
+               ]
+            },
+            "name" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "Santa Clara County"
+                  }
+               ]
+            }
+         }
+      },
+      "geoId/06087" : {
+         "arcs" : {
+            "latitude" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "37.012347"
+                  },
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "37.03"
+                  }
+               ]
+            },
+            "longitude" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "-122.007789"
+                  },
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "-122.01"
+                  }
+               ]
+            },
+            "name" : {
+               "nodes" : [
+                  {
+                     "provenanceId" : "dc/base/WikidataOtherIdGeos",
+                     "value" : "Santa Cruz County"
+                  }
+               ]
+            }
+         }
+      }
+   }
+}
+
+ +

Example 4: Get all incoming arc values (properties) for a node

+ +

Get all the incoming linked nodes for node PowerPlant, using <-*. Note that, unlike example 1, this query returns the actual property values, not just their labels.

+ +

Also note that the response contains a nextToken, so to get all the data, you need to send additional requests with continuation tokens, until no nextToken is returned.

+ +

Parameters:

+ +
nodes: "PowerPlant"
+property: "<-*"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=PowerPlant&property=%3C-%2A'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["PowerPlant"], "property": "<-*"}'
+
+ +

Response:

+ +
{
+  "data": {
+    "PowerPlant": {
+      "arcs": {
+        "subClassOf": {
+          "nodes": [
+            {
+              "name": "PowerPlantUnit",
+              "types": [
+                "Class"
+              ],
+              "dcid": "PowerPlantUnit",
+              "provenanceId": "dc/base/BaseSchema"
+            }
+          ]
+        },
+        "subClassOf" : {
+          "nodes" : [
+            {
+              "dcid" : "PowerPlantUnit",
+              "name" : "PowerPlantUnit",
+              "provenanceId" : "dc/base/BaseSchema",
+              "types" : [
+                "Class"
+              ]
+            }
+          ]
+        },
+        "typeOf" : {
+          "nodes": [
+            {
+              "name": "Suzlon Project VIII LLC",
+              "types": [
+                "PowerPlant"
+              ],
+              "dcid": "dc/000qxlm93vn93",
+              "provenanceId": "dc/base/EIA_860"
+            },
+            {
+              "name": "NYC-HH - CONEY ISLAND HOSPITAL",
+              "types": [
+                "PowerPlant"
+              ],
+              "dcid": "dc/002x855kf3wv3",
+              "provenanceId": "dc/base/EIA_860"
+            },
+            {
+              "name": "Bridgeport Gas Processing Plant",
+              "types": [
+                "PowerPlant"
+              ],
+              "dcid": "dc/0053j61z19gn6",
+              "provenanceId": "dc/base/EIA_860"
+            },
+            {
+              "name": "Hennepin Island",
+              "types": [
+                "PowerPlant"
+              ],
+              "dcid": "dc/005r26ht43r1f",
+              "provenanceId": "dc/base/EIA_860"
+            },
+            {
+              "name": "Bountiful City",
+              "types": [
+                "PowerPlant"
+              ],
+              "dcid": "dc/006cgl79w0bj9",
+              "provenanceId": "dc/base/EIA_860"
+           } ...
+          ]
+        },
+        "domainIncludes": {
+          "nodes": [
+            {
+              "types": [
+                "Property"
+              ],
+              "dcid": "ashImpoundmentStatus",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "co2Mass",
+              "types": [
+                "Property"
+              ],
+              "dcid": "co2Mass",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "co2Rate",
+              "types": [
+                "Property"
+              ],
+              "dcid": "co2Rate",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "eiaPlantCode",
+              "types": [
+                "Property"
+              ],
+              "dcid": "eiaPlantCode",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "types": [
+                "Property"
+              ],
+              "dcid": "fercCogenerationDocketNumber",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "types": [
+                "Property"
+              ],
+              "dcid": "fercExemptWholesaleGeneratorDocketNumber",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "types": [
+                "Property"
+              ],
+              "dcid": "fercSmallPowerProducerDocketNumber",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "types": [
+                "Property"
+              ],
+              "dcid": "fercStatus",
+              "provenanceId": "dc/base/BaseSchema"
+            } ...
+          ]
+        }
+      }
+    }
+  },
+  "nextToken": "H4sIAAAAAAAA/0zIMQ6CMBjFcfus9fnpYP4Xs4MXYCgTAUKaEG7PyvqLf0Rd9rbVaZh7lH6s7TdejRtyQhbyHTkjP5AL8hPZyC/kQH6T/fmmEwAA//8BAAD///dHSrJWAAAA"
+}
+
+ +

Example 5: Get a list of all existing statistical variables

+ +

Get all incoming linked nodes of node StatisticalVariable, with the typeof property. Since StatisticalVariable is a top-level entity, or entity type, this effectively gets all statistical variables.

+ +

Also note that the response contains a nextToken, so to get all the data, you need to send additional requests with continuation tokens, until no nextToken is returned.

+ +

Parameters:

+ +
nodes: "StatisticalVariable"
+property: "<-typeOf"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=StatisticalVariable&property=%3C-typeOf'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["StatisticalVariable"], "property": "<-typeOf"}'
+
+ +

Response:

+ +
{
+  "data": {
+    "StatisticalVariable": {
+      "arcs": {
+        "typeOf": {
+          "nodes": [
+            {
+              "name": "Max Temperature (Difference Relative To Base Date): Relative To 1990, Highest Value, Median Across Models",
+              "types": [
+                "StatisticalVariable"
+              ],
+              "dcid": "AggregateMax_MedianAcrossModels_DifferenceRelativeToBaseDate1990_Max_Temperature",
+              "provenanceId": "dc/base/HumanReadableStatVars"
+            },
+            {
+              "name": "Max Temperature (Difference Relative To Base Date): Relative To Between 2006 And 2020, Based on RCP 4.5, Highest Value, Median Across Models",
+              "types": [
+                "StatisticalVariable"
+              ],
+              "dcid": "AggregateMax_MedianAcrossModels_DifferenceRelativeToBaseDate2006To2020_Max_Temperature_RCP45",
+              "provenanceId": "dc/base/HumanReadableStatVars"
+            },
+            {
+              "name": "Max Temperature (Difference Relative To Base Date): Relative To Between 2006 And 2020, Based on RCP 8.5, Highest Value, Median Across Models",
+              "types": [
+                "StatisticalVariable"
+              ],
+              "dcid": "AggregateMax_MedianAcrossModels_DifferenceRelativeToBaseDate2006To2020_Max_Temperature_RCP85",
+              "provenanceId": "dc/base/HumanReadableStatVars"
+            },
+            {
+              "name": "Max Temperature (Difference Relative To Base Date): Relative To 2006, Based on RCP 4.5, Highest Value, Median Across Models",
+              "types": [
+                "StatisticalVariable"
+              ],
+              "dcid": "AggregateMax_MedianAcrossModels_DifferenceRelativeToBaseDate2006_Max_Temperature_RCP45",
+              "provenanceId": "dc/base/HumanReadableStatVars"
+            },
+            {
+              "name": "Max Temperature (Difference Relative To Base Date): Relative To 2006, Based on RCP 8.5, Highest Value, Median Across Models",
+              "types": [
+                "StatisticalVariable"
+              ],
+              "dcid": "AggregateMax_MedianAcrossModels_DifferenceRelativeToBaseDate2006_Max_Temperature_RCP85",
+              "provenanceId": "dc/base/HumanReadableStatVars"
+            }...
+          ]
+        }
+      }
+    }
+  },
+  "nextToken": "H4sIAAAAAAAA/2zJsQ6CMBQFUHut9fp0MNcPcyBhf5CSNOlA4C38PT/AfGyx3xAebY82ex99az71aiWOtf6vUTdlpm8SCIF3gVngQ2AR+BRIgS+BJvAt8HMCAAD//wEAAP//522gCWgAAAA="
+}
+
+ +

Example 6: Get a list of all existing entity types

+ +

Get all incoming linked nodes of node Class, with the typeof property. Since Class is the top-level entity in the knowledge graph, getting all directly linked nodes effectively gets all entity types.

+ +

Also note that the response contains a nextToken, so you need to send additional requests with the continuation tokens to get all the data.

+ +

Parameters:

+ +
nodes: "Class"
+property: "<-typeOf"
+
+ +

GET Request:

+ +
curl --request GET --url \
+  'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=Class&property=%3C-typeOf'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/node \
+  -d '{"nodes": ["Class"], "property": "<-typeOf"}'
+
+ +

Response:

+ +
{
+  "data": {
+    "Class": {
+      "arcs": {
+        "typeOf": {
+          "nodes": [
+            {
+              "name": "ACLGroup",
+              "types": [
+                "Class"
+              ],
+              "dcid": "ACLGroup",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "ACSEDChild",
+              "types": [
+                "Class"
+              ],
+              "dcid": "ACSEDChild",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "ACSEDParent",
+              "types": [
+                "Class"
+              ],
+              "dcid": "ACSEDParent",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "APIReference",
+              "types": [
+                "Class"
+              ],
+              "dcid": "APIReference",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AboutPage",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AboutPage",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AcademicAssessmentEvent",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AcademicAssessmentEvent",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AcademicAssessmentTypeEnum",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AcademicAssessmentTypeEnum",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AcceptAction",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AcceptAction",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "Accommodation",
+              "types": [
+                "Class"
+              ],
+              "dcid": "Accommodation",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AccountingService",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AccountingService",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "AchieveAction",
+              "types": [
+                "Class"
+              ],
+              "dcid": "AchieveAction",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "Action",
+              "types": [
+                "Class"
+              ],
+              "dcid": "Action",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "ActionStatusType",
+              "types": [
+                "Class"
+              ],
+              "dcid": "ActionStatusType",
+              "provenanceId": "dc/base/BaseSchema"
+            },
+            {
+              "name": "ActivateAction",
+              "types": [
+                "Class"
+              ],
+              "dcid": "ActivateAction",
+              "provenanceId": "dc/base/BaseSchema"
+            }...
+          ]
+        }
+      }
+    }
+  },
+  "nextToken": "H4sIAAAAAAAA/yzHsQ5EQBiF0Z27O7PXTyFf5X20Es+goFJIRuPtRaI7J6bI477UGuW8jnXe3vKhOPVp+CEL+Yv8OCMX5D+ykRvkQG6RuxsAAP//AQAA//8tG+Q2TgAAAA=="
+}         
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/observation.html b/api/rest/v2/observation.html new file mode 100644 index 000000000..70f6cf9f8 --- /dev/null +++ b/api/rest/v2/observation.html @@ -0,0 +1,1015 @@ + + + + + Get statistical observations - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v2/observation

+ +

The Observation API fetches statistical observations. An observation is associated with an +entity and variable at a particular date: for example, “population of USA in +2020”, “GDP of California in 2010”, and so on.

+ +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&date=DATE_EXPRESSION&variable.dcids=DCID_LIST&entity.dcids|expression=DCID_LIST_OR_RELATION_EXPRESSION&select=variable&select=entity[&select=value][&select=date] +
+ +
+URL: +https://api.datacommons.org/v2/observation + +Header: +X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI + +JSON data: +{ + "date": "DATE_EXPRESSION", + "variable": { + "dcids": [ + "VARIABLE_DCID_1", + "VARIABLE_DCID_2", + ... + ] + }, + "entity": { + "dcids":[ + "ENTITY_DCID_1", + "ENTITY_DCID_2", + ... + ] + "expression": "ENTITY_EXPRESSION" + }, + "select": ["date", "entity", "variable", "value"] +} +
+ + + + + +

Query parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the section on authentication for details.
date
Required
stringSee below for allowable values.
variable.dcids
Required
list of stringsList of DCIDs for the statistical variable to be queried.
entity.dcidslist of stringsComma-separated list of DCIDs of entities to query. One of entity.dcids or entity.expression is required. Multiple entity.dcids parameters are allowed.
entity.expressionstringRelation expression that represents the entities to query. One of entity.dcids or entity.expression is required.
select
Required
string literalselect=variable and select=entity are required. If specifed without select=date and select=value, no observations are returned. You can use this to first check the existence of variable-entity pairs in the data and fetch all the variables that have data for given entities.
select
Optional
string literalIf used, you must specify both select=date and select=value. Returns actual observations, with the date and value for each variable and entity queried.
+ +

Date-time string formats

+ +

Here are the possible values for specifying dates/times:

+
    +
  • LATEST: Fetch the latest observations only.
  • +
  • DATE_STRING: Fetch observations matching the specified date(s) and time(s). The value must be in the ISO-8601 format used by the target variable; for example, 2020 or 2010-12. To look up the format of a statistical variable, see below.
  • +
  • "": Return observations for all dates.
  • +
+ +

Find the date format for a statistical variable

+ +

Statistical variable dates are defined as yearly, monthly, weekly, or daily. For most variables, you can find out the correct date format by searching for the variable in the +Statistical Variable Explorer and looking for the Date range. For example, for the variable Gini Index of Economic Activity, the date-time format is yearly, i.e. in YYYY format:

+ +

date time example 1

+ +

For other cases, you may need to drill down further to a timeline graph to view specific observations. For example, Mean Wind Direction, is measured at the sub-daily level, but the frequency is not clear (hourly or every two hours, etc.)

+ +

date time example 2

+ +

In these cases, do the following:

+ +
    +
  1. In the Statistical Variable Explorer, click on an example place to link to the variable’s page in the Knowledge Graph Browser.
  2. +
  3. Scroll to the Observations section and click Show Table to get a list of observations.
  4. +
+ +

For example, in the case of Mean Wind Direction for Ibrahimpur, India, the observations table shows that the variable is measured every four hours, starting at midnight.

+ +

date time example 3

+ +

Response

+ +

Without select=date and select=value specified, the response looks like:

+ +
+{
+  "byVariable": {
+    "VARIABLE_DCID_1": {
+      "byEntity": {
+        "ENTITY_DCID_1": {},
+        "ENTITY_DCID_2": {},
+        ...
+      }
+    "VARIABLE_DCID_2": {
+      ...
+  }
+}
+
+ +

With select=date and select=value specified, the response looks like:

+ +
+{
+  "byVariable": {
+    "VARIABLE_DCID_1": {
+      "byEntity": {
+        "ENTITY_DCID_1": {
+          "orderedFacets": [
+            {
+              "facetId": "FACET_ID",
+              "earliestDate" : "DATE_STRING", 
+              "latestDate" : "DATE_STRING", 
+              "obsCount" : "NUMBER_OF_OBSERVATIONS",
+              "observations": [
+                {
+                  "date": "OBSERVATION_DATE",
+                  "value": "OBSERVATION_VALUE"
+                },
+                ...
+              ]
+            },
+            ...
+        },
+        ...
+      },
+      ...
+    }
+  "facets" {
+    "FACET_ID": {
+      "importName": "...",
+      "provenanceUrl": "...",
+      "measurementMethod": "...",
+      "observationPeriod": "..."
+    },
+    ...
+  }
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
orderedFacetslist of objectsMetadata about the observations returned, keyed first by variable, and then by entity, such as the date range, the number of observations included in the facet etc.
observationslist of objectsDate and value pairs for the observations made in the time period
facetsobjectVarious properties of reported facets, where available, including the provenance of the data, etc.
+ +

Examples

+ +

Example 1: Get the latest observation for given entities

+ +

Specify date=LATEST to get the latest observations and values. In this example, we select the entity by its DCID using entity.dcids.

+ +

Parameters:

+ +
date: "LATEST"
+variable.dcids: "Count_Person"
+entity.dcids: "country/USA"
+select: "entity"
+select: "variable"
+select: "value"
+select: "date"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&date=LATEST&variable.dcids=Count_Person&entity.dcids=country%2FUSA&select=entity&select=variable&select=value&select=date'
+
+

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/observation \
+  -d '{"date": "LATEST", "variable": { "dcids": ["Count_Person"] }, "entity": { "dcids": ["country/USA"] }, "select": ["entity", "variable", "value", "date"] }'
+
+ +

Response:

+ +
{
+  "byVariable": {
+    "Count_Person": {
+      "byEntity": {
+        "country/USA": {
+          "orderedFacets": [
+           {
+              "earliestDate" : "2022",
+              "facetId" : "2176550201",
+              "latestDate" : "2022",
+              "obsCount" : 1,
+              "observations" : [
+                {
+                  "date" : "2022",
+                  "value" : 333287557
+                }
+              ]
+            },
+            {
+              "earliestDate" : "2022",
+              "facetId" : "1273233945",
+              "latestDate" : "2022",
+              "obsCount" : 1,
+              "observations" : [
+               {
+                  "date" : "2022",
+                  "value" : 334369975
+                }
+                ]
+            },
+            ...
+          ]
+        }
+      }
+    }
+  },
+  "facets": {
+    "2176550201" : {
+      "importName" : "USCensusPEP_Annual_Population",
+      "measurementMethod" : "CensusPEPSurvey",
+      "observationPeriod" : "P1Y",
+      "provenanceUrl" : "https://www2.census.gov/programs-surveys/popest/tables"
+    },
+    "1273233945": {
+      "importName": "CensusACS5YearSurvey_AggCountry",
+      "provenanceUrl": "https://www.census.gov/",
+      "measurementMethod": "CensusACS5yrSurvey"
+    },
+    ...
+  }
+}
+
+ +

Example 2: Get the observations at a particular date for given entities

+ +

This queries for observations in 2015 for the variable +Count_Person +for two specified entities: +country/USA and +geoId/06.

+ +

Parameters:

+ +
date: "2015"
+variable.dcids: "Count_Person"
+entity.dcids: "country/USA"
+entity.dcids: "geoId/06"
+select: "date"
+select: "entity"
+select: "value"
+select: "variable"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&date=2015&variable.dcids=Count_Person&entity.dcids=country%2FUSA&entity.dcids=geoId%2F06&select=date&select=entity&select=value&select=variable'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/observation \
+  -d '{"date": "2015", "variable": { "dcids": ["Count_Person"] }, "entity": { "dcids": ["country/USA", "geoId/06"] }, "select": ["entity", "variable", "value", "date"] }'
+
+ +

Response:

+ +
{
+  "byVariable": {
+    "Count_Person": {
+      "byEntity": {
+        "country/USA": {
+          "orderedFacets": [
+             {
+              "earliestDate" : "2015",
+              "facetId" : "2176550201",
+              "latestDate" : "2015",
+              "obsCount" : 1,
+              "observations" : [
+                {
+                  "date" : "2015",
+                  "value" : 320738994
+                }
+              ]
+            },
+            ...
+          ]
+        },
+        "geoId/06": {
+          "orderedFacets": [
+            "earliestDate" : "2015",
+            "facetId" : "2176550201",
+            "latestDate" : "2015",
+            "obsCount" : 1,
+            "observations" : [
+              {
+                "date" : "2015",
+                "value" : 38904296
+              }
+            ]
+          },
+          ...
+          ]
+        }
+      }
+    }
+  },
+  "facets" {
+      "2176550201" : {
+         "importName" : "USCensusPEP_Annual_Population",
+         "measurementMethod" : "CensusPEPSurvey",
+         "observationPeriod" : "P1Y",
+         "provenanceUrl" : "https://www2.census.gov/programs-surveys/popest/tables"
+      },
+    ...
+  }
+}
+
+ +

Example 3: Get the latest observations for all California counties

+ +

In this example, we use the chained expression +(+) to specify “all contained places in +California (dcid: geoId/06) of +type County”. Then we specify the select fields to request actual observations +with date and value for each variable +(Count_Person) and +entity (all counties in California).

+ +

Parameters:

+ +
date: "LATEST"
+variable.dcids: "Count_Person"
+entity.expression: "geoId/06<-containedInPlace+{typeOf:County}"
+select: "date"
+select: "entity"
+select: "value"
+select: "variable"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&date=2015&date=LATEST&variable.dcids=Count_Person&entity.expression=geoId%2F06%3C-containedInPlace%2B%7BtypeOf%3ACounty%7D&select=date&select=entity&select=value&select=variable'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/observation \
+  -d '{"date": "LATEST", "variable": { "dcids": ["Count_Person"] }, "entity": { "expression": "geoId/06<-containedInPlace+{typeOf:County}"}, "select": ["entity", "variable", "value", "date"] }'
+
+ +

Response:

+ +
{
+  "byVariable": {
+    "Count_Person": {
+      "byEntity": {
+        "geoId/06003": {
+          "orderedFacets": [
+            {
+              "facetId": "2176550201",
+              "observations": [
+                {
+                  "date": "2021",
+                  "value": 1235
+                }
+              ]
+            },
+            ...
+          ]
+        },
+        "geoId/06009": {
+          "orderedFacets": [
+            {
+              "facetId": "2176550201",
+              "observations": [
+                {
+                  "date": "2021",
+                  "value": 46221
+                }
+              ]
+            },
+            ...
+          ]
+        },
+        ...
+      }
+    }
+  },
+  "facets": {
+    "2176550201": {
+      "importName": "USCensusPEP_Annual_Population",
+      "measurementMethod" : "CensusPEPSurvey",
+      "observationPeriod" : "P1Y",
+      "provenanceUrl" : "https://www2.census.gov/programs-surveys/popest/tables"
+    },
+    ...
+  }
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/resolve.html b/api/rest/v2/resolve.html new file mode 100644 index 000000000..d5b122c74 --- /dev/null +++ b/api/rest/v2/resolve.html @@ -0,0 +1,952 @@ + + + + + Resolve entities - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v2/resolve

+ +

The Resolve API returns a Data Commons ID (DCID) for entities in the graph. +Each entity in Data Commons has an associated DCID which is used to refer to it +in other API calls or programs. An important step for a Data Commons developer is to +identify the DCIDs of entities they care about. This API searches for an entry in the +Data Commons knowledge graph and returns the DCIDs of matches. You can use +common properties or even descriptive words to find entities.

+ +

For example, you could query for “San Francisco, CA” or “San Francisco” to find +that its DCID is geoId/0667000. You can also provide the type of entity +(country, city, state, etc.) to disambiguate (Georgia the country vs. Georgia +the US state).

+ +
+

Note: Currently, this endpoint only supports place entities.

+
+ +
+

IMPORTANT: + This endpoint relies on name-based geocoding and is prone to inaccuracies. + One common pattern is ambiguous place names that exist in different + countries, states, etc. For example, there is at least one popular city + called “Cambridge” in both the UK and USA. Thus, for more precise results, + please provide as much context in the description as possible. For example, + to resolve Cambridge in USA, pass “Cambridge, MA, USA” if you can.

+
+ +

Request

+ +
+ + +
+ +
+https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=DCID_LIST&property=RELATION_EXPRESSION +
+ +
+URL: +https://api.datacommons.org/v2/resolve + +Header: +X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI + +JSON data: +{ + "nodes": [ + "NODE_DCID_1", + "NODE_DCID_2", + ... + ], + "property": "RELATION_EXPRESSION" +} + +
+ + + + + +

Query parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the section on authentication for details.
nodes
Required
list of stringsComma-separated list of property values (e.g. entity name or DCID), or description of the node. This currently only supports the name of a place.
property
Required
stringRelation expression that represents the relation of the given nodes to the queried entities. Note that this should always end with ->dcid
+ +

Response

+ +

The response looks like:

+ +
+{
+  "entities": [
+    {
+      "node": "NODE_1",
+      "candidates": [
+        {
+          "dcid": "DCID_1",
+          "dominantType": "TYPE_OF_DCID_1"
+        },
+      ]
+    },
+    {
+      "node": "NODE_2",
+      "candidates": [
+        {
+          "dcid": "DCID_2",
+          "dominantType": "TYPE_OF_DCID_2"
+        },
+      ]
+    },
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
nodestringThe property value or description provided.
candidateslistDCIDs matching the description you provided.
dominantTypestringOptional field which, where present, disambiguates between multiple results.
+ +
+

Note: + There is a deprecated field resolvedIds that is currently returned by the API. It will be removed soon. Examples below omit this redundant field.

+
+ +

Examples

+ +

Example 1: Find the DCID of a place by another known ID

+ +

This queries for the DCID of a place by its Wikidata ID. This property is represented in the graph by wikidataId.

+ +

Parameters:

+ +
nodes: "Q30"
+property: "<-wikidataId->dcid"
+
+

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=Q30&property=%3C-wikidataId-%3Edcid'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/resolve \
+  -d '{"nodes": ["Q30"], "property": "<-wikidataId->dcid"}'
+
+ +

Response:

+ +
{
+   "entities" : [
+      {
+         "node" : "Q30",
+         "candidates" : [
+            {
+               "dcid" : "country/USA"
+            }
+         ],
+      }
+   ]
+}
+
+ +

Example 2: Find the DCID of a place by coordinates

+ +

This queries for the DCID of “Mountain View” by its coordinates. This is most often represented by the latitude and longitude properties on a node. Since the API only supports querying a single property, use the synthetic geoCoordinate property. To specify the latitude and longitude, use the # sign to separate both values. This returns all the places in the graph that contains the coordinate.

+ +

Parameters:

+ +
nodes: "37.42#-122.08"
+property: "<-geoCoordinate->dcid"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=37.42%23-122.08&property=%3C-geoCoordinate-%3Edcid'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/resolve \
+  -d '{"nodes": ["37.42#-122.08"], "property": "<-geoCoordinate->dcid"}'
+
+ +

Response:

+ +
{
+   "entities" : [
+      {
+         "node" : "37.42#-122.08",
+         "candidates" : [
+            {
+               "dcid" : "geoId/0649670",
+               "dominantType" : "City"
+            },
+            {
+               "dcid" : "geoId/06085",
+               "dominantType" : "County"
+            },
+            {
+               "dcid" : "geoId/06",
+               "dominantType" : "State"
+            },
+            {
+               "dcid" : "country/USA",
+               "dominantType" : "Country"
+            },
+            {
+               "dcid" : "geoId/06085504601",
+               "dominantType" : "CensusTract"
+            },
+            {
+               "dcid" : "geoId/060855046011",
+               "dominantType" : "CensusBlockGroup"
+            },
+            {
+               "dcid" : "geoId/0608592830",
+               "dominantType" : "CensusCountyDivision"
+            },
+            {
+               "dcid" : "geoId/0618",
+               "dominantType" : "CongressionalDistrict"
+            },
+            {
+               "dcid" : "geoId/sch0626280",
+               "dominantType" : "SchoolDistrict"
+            },
+            {
+               "dcid" : "ipcc_50/37.25_-122.25_USA",
+               "dominantType" : "IPCCPlace_50"
+            },
+            {
+               "dcid" : "zip/94043",
+               "dominantType" : "CensusZipCodeTabulationArea"
+            }
+         ],
+      }
+   ]
+}
+
+ +

Example 3: Find the DCID of a place by name

+ +

This queries for the DCID of “Georgia”. Notice that specifying Georgia without a type filter returns all possible DCIDs with the same name: the state of Georgia in USA (geoId/13), the country Georgia (country/GEO) and the city Georgia in the US state of Vermont (geoId/5027700).

+ +

Note the description property in the request. This currently only supports resolving place entities by name.

+ +

Parameters:

+ +
nodes: "Georgia"
+property: "<-description->dcid"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=Georgia&property=%3C-description-%3Edcid'
+
+

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/resolve \
+  -d '{"nodes": ["Georgia"], "property": "<-description->dcid"}'
+
+ +

Response:

+ +
{ 
+   "entities" : [
+      {
+        "node" : "Georgia",
+        "candidates" : [
+            {
+               "dcid" : "geoId/13"
+            },
+            {
+               "dcid" : "country/GEO"
+            },
+            {
+               "dcid" : "geoId/5027700"
+            }
+         ],
+      }
+   ]
+}
+
+ +

Example 4: Find the DCID of a place by name, with a type filter

+ +

This queries for the DCID of “Georgia”. Unlike in the previous example, here +we also specify its type using a filter and only get one place in the response.

+ +

Parameters:

+ +
nodes: "Georgia"
+property: "<-description{typeOf:State}->dcid"
+
+ +

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=Georgia&property=%3C-description%7BtypeOf:State%7D-%3Edcid'
+
+

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/resolve \
+  -d '{"nodes": ["Georgia"], "property": "<-description{typeOf:State}->dcid"}'
+
+ +

Response:

+ +
{
+   "entities" : [
+      {
+         "node" : "Georgia",
+         "candidates" : [
+            {
+               "dcid" : "geoId/13"
+            }
+         ],
+      }
+   ]
+}
+
+ +

Example 5: Find the DCID of multiple places by name, with a type filter

+ +

This queries for the DCIDs of “Mountain View” and “New York City”.

+ +

Parameters:

+ +
nodes: "Mountain View, CA", "New York City"
+property: "<-description{typeOf:City}->dcid"
+
+

GET Request:

+ +
curl --request GET --url \
+'https://api.datacommons.org/v2/resolve?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=Mountain%20View,%20CA&nodes=New%20York%20City&property=%3C-description%7BtypeOf:City%7D-%3Edcid'
+
+ +

POST Request:

+ +
curl -X POST -H "X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI" \
+  https://api.datacommons.org/v2/resolve \
+  -d '{"nodes": ["Mountain View, CA", "New York City"], "property": "<-description{typeOf:City}->dcid"}'
+
+ +

Response:

+ +
{
+   "entities" : [
+      {
+         "node" : "Mountain View, CA",
+         "candidates" : [
+            {
+               "dcid" : "geoId/0649670"
+            },
+            {
+               "dcid" : "geoId/0649651"
+            }
+         ],
+      },
+      {
+         "node" : "New York City",
+         "candidates" : [
+            {
+               "dcid" : "geoId/3651000"
+            }
+         ],
+      }
+   ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/sparql.html b/api/rest/v2/sparql.html new file mode 100644 index 000000000..45f4f92e3 --- /dev/null +++ b/api/rest/v2/sparql.html @@ -0,0 +1,848 @@ + + + + + Query with SPARQL - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

/v2/sparql

+ +

This endpoint makes it possible to query the Data Commons knowledge graph using +SPARQL. SPARQL is a query language developed to retrieve data from RDF graph content on the web. It leverages the graph structure innate in the data it +queries to return specific information.

+ +
+

Note: Data Commons only supports a limited subset of SPARQL functionality at this time: specifically, only the keywords WHERE, ORDER BY, DISTINCT, and LIMIT are supported.

+
+ +

Request

+ +
+

Note: GET requests are not provided because they are inconvenient to use with SPARQL.

+
+ +

+POST request +

+ +

+URL: https://api.datacommons.org/v2/sparql + +Header: X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI + +JSON data: { "query": "SPARQL_QUERY" } +

+ + + + + +

Query parameters

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key
Required
stringYour API key. See the the section on authentication for details.
query
Required
stringA SPARQL query string.
In the query, all desired entities must be specified; wildcards are not supported. Each node or entity should have a typeOf condition, for example, ?ENTITY_NAME typeOf City.
+ +

Response

+ +

The response looks like:

+ +
+{
+  "header": [
+    STRING
+  ],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": STRING
+        }
+      ]
+    },
+    ...
+  ]
+}
+
+ +

Response fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerlistList of strings corresponding to the query variables.
rowslistList of row objects, with each containing a list of cells and its cell values.
cellsobjectContains string field value corresponding to the queried variable.
+ +

Examples

+ +

Example 1: Get a list of all cities with a particular property

+ +

Retrieve a list of the DCIDs of cities that have the property unDataLabel.

+ +

Request:

+ +
curl --request POST \
+  --url https://api.datacommons.org/v2/sparql \
+  --header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
+  --data '{
+            "query": "SELECT DISTINCT ?subject  \
+                WHERE { \
+                  ?subject unDataLabel ?object . \
+                  ?subject typeOf City 
+                }
+                LIMIT 10"
+  }'
+
+ +

Response:

+ +
{
+   "header" : [
+      "?subject"
+   ],
+   "rows" : [
+      {
+         "cells" : [
+            {
+               "value" : "nuts/DED12"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q623736"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q33986"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q221921"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q841241"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q200797"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "undata-geo/C16801100"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "undata-geo/C07501077"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "undata-geo/C23400001"
+            }
+         ]
+      },
+      {
+         "cells" : [
+            {
+               "value" : "wikidataId/Q1005090"
+            }
+         ]
+      }
+   ]
+}
+
+ +

Example 2: Get a list of biological specimens

+ +

Retrieve a list of 10 biological specimens (DCID: BiologicalSpecimen) in +reverse alphabetical order.

+ +

Request:

+ +
curl --request POST \
+  --url https://api.datacommons.org/v2/sparql \
+  --header 'X-API-Key: AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI' \
+  --data '{
+            "query": "SELECT ?name \
+                WHERE { \
+                  ?biologicalSpecimen typeOf BiologicalSpecimen . \
+                  ?biologicalSpecimen name ?name
+                }
+                ORDER BY DESC(?name)
+                LIMIT 10"
+}'
+
+ +

Response:

+ +
{
+  "header": ["?name"],
+  "rows": [
+    {
+      "cells": [
+        {
+          "value": "x Triticosecale"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Silene"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    },
+    {
+      "cells": [
+        {
+          "value": "x Pseudelymus saxicola (Scribn. & J.G.Sm.) Barkworth & D.R.Dewey"
+        }
+      ]
+    }
+  ]
+}
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/rest/v2/troubleshooting.html b/api/rest/v2/troubleshooting.html new file mode 100644 index 000000000..333b90cc8 --- /dev/null +++ b/api/rest/v2/troubleshooting.html @@ -0,0 +1,588 @@ + + + + + Troubleshooting - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Troubleshoot common error responses

+ + + +

Missing API key

+ +
{
+ "code": 16,
+ "message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.",
+ "details": [
+  {
+   "@type": "type.googleapis.com/google.rpc.DebugInfo",
+   "stackEntries": [],
+   "detail": "service_control"
+  }
+ ]
+}
+
+ +

The request is missing an API key or the parameter specifying it is misspelled. Please request your own API key.

+ +

Empty response

+ +
{}
+
+ +

This is most commonly seen when the value provided for a query parameter is misspelled or doesn’t exist. Make sure the values you are passing for parameters are spelled correctly, that you are correctly URL-encoding special characters in parameter values, and not URL-encoding parameter delimiters.

+ +

Marshaling errors

+ +
{
+ "code": 13,
+ "message": "grpc: error while marshaling: proto: Marshal called with nil",
+ "details": [
+  {
+   "@type": "type.googleapis.com/google.rpc.DebugInfo",
+   "stackEntries": [],
+   "detail": "internal"
+  }
+ ]
+}
+
+ +

This is most commonly seen when a query parameter is missing, misspelled or incorrect. Check the spelling of query parameters, ensure all required parameters are sent in the request, that you are correctly URL-encoding special characters in parameter values, and not URL-encoding parameter delimiters.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/get_cohort_members.html b/api/sheets/get_cohort_members.html new file mode 100644 index 000000000..820b71f3c --- /dev/null +++ b/api/sheets/get_cohort_members.html @@ -0,0 +1,574 @@ + + + + + Get members of a cohort - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve members of a cohort

+ +

The DCCOHORTMEMBERS formula returns the members of each cohort provided. Here a cohort is a general term for a group of entities, like the CDC’s list of the United States’ 500 largest cities.

+ +

Formula

+ +
=DCCOHORTMEMBERS(dcids)
+
+ +

Required arguments

+
    +
  • dcids - A single node or range of cells representing nodes, identified by their DCIDs, whose members are sought.
  • +
+ +

Returns

+ +

The DCIDs of the cohort members. For a single DCID, the result is a column of members of the cohort represented by that DCID. For a row of DCIDs, the result is a matrix with each column the members of the cohort whose DCID serves as the column’s index. For a column of DCIDs, the result is a matrix with each row the members of the cohort whose DCID serves as the row’s index.

+ +

Example: Retrieve the list of cities that are members of the CDC 500 cohort

+ +
+

Note: Be sure to follow the instructions for for enabling the Sheets add-on before trying this example.

+
+ +

To retrieve the members of the CDC 500 cities cohort:

+ +
    +
  1. Place your cursor in any cell, say A1, and enter CDC500_City.
  2. +
  3. +

    In cell B1, enter =DCCOHORTMEMBERS(A1).

    + +

    DCCOHORTMEMBERS example

    + +

    The list of member DCIDs populates column B.

    + +

    DCCOHORTMEMBERS example

    +
  4. +
  5. (Optional) To get the names of the members, in cell C1, enter DCGETNAME(B1:B500).
  6. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/get_name.html b/api/sheets/get_name.html new file mode 100644 index 000000000..1afedebf3 --- /dev/null +++ b/api/sheets/get_name.html @@ -0,0 +1,606 @@ + + + + + Get names associated with DCIDs - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Return the names associated with DCIDs

+ +

The =DCGETNAME formula returns the names associated with given DCIDs to a cell or range of cells.

+ +

Formula

+ +
=DCGETNAME(dcids)
+
+ +

Required arguments

+ +
    +
  • dcids - A node or range of cells representing multiple nodes, identified by their DCIDs.
  • +
+ +

Returns

+ +

The names associated with given node DCIDs to a cell or a range of cells.

+ +

Examples

+ +

This section contains examples of using DCGETNAME to return the names associated with given DCIDs.

+ +
+

Note: Be sure to follow the instructions for for enabling the Sheets add-on before trying these examples.

+
+ +

Example 1: Retrieve the name of a place by its DCID

+ +

To retrieve the name of a place by its DCID:

+ +
    +
  1. Place your cursor in the cell where you want to add a DCID; in this case, cell A1, and enter geoId/06.
  2. +
  3. Move to the cell where you want to retrieve the place name.
  4. +
  5. Enter the formula =DCGETNAME(A1) to retrieve the name. California populates the cell.
  6. +
+ +

DCGETNAME example 1

+ +

Example 2: Retrieve the names of a list of power plants

+ +

To retrieve the names of a list of power plants:

+ +
    +
  1. Enter into column A the DCIDs that are shown in the following image.
  2. +
  3. In cell B2, enter the formula =DCGETNAME(A2:A4). The names of the power plants for each DCID populate column B.
  4. +
+ +

DCGETNAME example 2

+ +

Example 3: Retrieve the names of a list of statistical variables

+ +

Statistical variables are also nodes in the Data Commons knowledge with a DCID. To retrieve the names of a list of statistical variables:

+ +
    +
  1. Enter into column A the DCIDs that are shown in the following image.
  2. +
  3. In cell B2, enter the formula =DCGETNAME(A2:A4). The names of the variables for each DCID populate column B.
  4. +
+ +

DCGETNAME example 3

+ +

Error responses

+ +

If a DCID does not exist, the =DCGETNAME formula does not return a value. For example, because the DCID geoId/123123123 does not exist, no value is returned to cell B1 in the following sheet:

+ +

DCGETNAME error example

+ +

If you provide an empty cell for a DCID, the =DCGETNAME formula returns a value of #ERROR!, as shown show in the following image:

+ +

DGCETNAME error example

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/get_property.html b/api/sheets/get_property.html new file mode 100644 index 000000000..ef71f32b0 --- /dev/null +++ b/api/sheets/get_property.html @@ -0,0 +1,617 @@ + + + + + Get node property values - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve node property values

+ +

The =DCPROPERTY formula returns values associated with the given property for a single place DCID or list of places.

+ +

Formula

+ +
=DCPROPERTY(dcids, property)
+
+ +

Required arguments

+ +
    +
  • dcids: A single place node or range of cells representing nodes, identified by their DCIDs.
  • +
  • property: The label of the property whose value you are interested in, such as name for the name of a node, or typeOf for the type of a node. If you aren’t sure what properties are available for a particular DCID, you can use the Data Commons Knowledge Graph to look up the DCID of interest and see what properties it is associated with.
  • +
+ +

Returns

+ +

The values of the property label for the specified DCIDs.

+ +

Examples

+ +

This section contains examples of using the =DCPROPERTY to return values associated with the given property.

+ +
+

Note: Be sure to follow the instructions for for enabling the Sheets add-on before trying these examples.

+
+ +

Example 1: Retrieve the common name of a country by its DCID

+ +

To retrieve the name of a country by its DCID:

+ +
    +
  1. Place your cursor in the cell where you want to add a DCID; in this case, cell A1.
  2. +
  3. Enter country/CIV for the country Ivory Coast.
  4. +
  5. Place your cursor in cell B2 and enter =DCPROPERTY(A1, "name") to retrieve the Ivory Coast country names in column B; note that the French and English spellings for Ivory Coast appear in column B.
  6. +
+ +

DCPROPERTY example 1

+ +

Example 2: Retrieve the order to which a plant belongs

+ +

To retrieve the order to which the plant Austrobaileya Scandens belongs:

+ +
    +
  1. Place your cursor in the cell where you want to add a DCID; in this case, cell A1.
  2. +
  3. Enter dc/bsmvthtq89217 for the plant Austrobaileya Scandens.
  4. +
  5. Place your cursor in cell B2 and enter =DCPROPERTY(A1, "order"). Austrobaileyales appears in cell B2.
  6. +
+ +

DCPROPERTY example 2

+ +

Example 3: Retrieve the addresses of two high schools

+ +

To retrieve the addresses of Stuyvesant High School in New York and Gunn High School in California:

+ +
    +
  1. Place your cursor in cell A1 and enter nces/360007702877 for Stuyvesant Hight School in New York.
  2. +
  3. Place your cursor in cell A2 and enter nces/062961004587 for Gunn High School in California.
  4. +
  5. Place your cursor in cell B2, and enter the formula =DCPROPERTY(A1:A2, "address"). The addresses of both high schools are populated in column B.
  6. +
+ +

DCPROPERTY example 3

+ +

Error responses

+ +

If you pass a nonexistent property, an empty value is returned. For example, because the “nonexistent property” does not exist, no value is returned to cell B1 in the following sheet:

+ +

DCPROPERTY error example

+ +

If you pass a bad DCID, an empty value is returned:

+ +

DCPROPERTY error example

+ +

If you pass an empty DCID, a response of #ERROR! is returned:

+ +

DCPROPERTY error example

+ +

If you do not pass a required property argument, a response of #ERROR! is returned:

+ +

DCPROPERTY error example

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/get_variable.html b/api/sheets/get_variable.html new file mode 100644 index 000000000..97c443695 --- /dev/null +++ b/api/sheets/get_variable.html @@ -0,0 +1,665 @@ + + + + + Get statistical variable values - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve the value of a statistical variable at a given place and time

+ +

The=DCGET formula returns the measurements of a specified statistical variable at a given place and optional time based on a list of parent place DCIDs. A complete list of variables can be found in the Statistical Variable Explorer.

+ +

Formula

+ +
=DCGET(dcids, variable, [date])
+
+ +

Required arguments

+ +
    +
  • dcids: A single place node or range of cells represening place nodes, identified by their DCIDs.
  • +
  • variable: The statistical variable whose measurements you want to query.
  • +
+ +

Optional arguments

+ +

date: The date or dates of interest. If this argument is not specified, the API returns the latest variable observation. You can specify this argument as a single value, row, or column. All dates must be in ISO 8601 format (such as 2017, “2017”, “2017-12”) or as a Google sheets date value.

+ +

Returns

+ +

The value of the variable at those places on the specified date or on the latest available date, if no date is specified.

+ +

Examples

+ +

This section contains examples of using the =DCGET formula to returns the values of statistical variables such as Count_Person and Median_Income_Person.

+ +
+

Note: Be sure to follow the instructions for for enabling the Sheets add-on before trying these examples.

+
+ +

Example 1: Get the total population of Hawaii in 2017

+ +

To get the total population of Hawaii in 2017:

+ +
    +
  1. Place your cursor in the desired cell.
  2. +
  3. Enter the formula =DCGET("geoId/15", "Count_Person", 2017). The value 1425763 populates the cell.
  4. +
+ +

Example 2: Get the population of five Hawaii counties in 2017

+ +

To get the population of the five counties in 2017:

+ +
    +
  1. Place your cursor in the desired cell; in this case A2, and enter the DCID of Hawaii, namely geoId/15.
  2. +
  3. In cell B2, enter the formula =DCPLACESIN(A2, "County"). The DCIDs of the Hawaii counties populate column B.
  4. +
  5. (Optional) In cell C2, enter =DCGETNAME(B2:B6) to retrieve the names of the counties in column C.
  6. +
  7. +

    In cell D2, enter the formula =DCGET(B2:B6, "Count_Person", 2017).

    + +

    DCGET example 2

    + +

    The values populate column D.

    + +

    DCGET example 2

    +
  8. +
+ +

Example 3: Get the median income of a single place in multiple years

+ +

This example shows how to get the median income in Hawaii for the years 2011 - 2013, with dates as columns:

+ +
    +
  1. In a new sheet, in row 1, create cells with the headings shown in the image below.
  2. +
  3. In cell A2, enter Hawaii, and in cell B2, geoId/15.
  4. +
  5. +

    Select cells C2 to E2, and enter the formula =DCGET(B2, "Median_Income_Person", C1:E1).

    + +

    DCGET example 3

    + +

    The values populate C2, D2 and E2.

    + +

    DCGET example 3

    +
  6. +
+ +

Example 4: Get the median age of multiple places in multiple years

+ +

The following examples demonstrate how to retrieve the median age of five counties in Hawaii for the years 2011 - 2015.

+ +

To get the results with the counties in rows and the dates in columns, do the following:

+ +
    +
  1. In a new sheet, in row 1, create cells with the headings shown in the image below, with columns for each year 2011 to 2015.
  2. +
  3. In cell A2, enter Hawaii, and in cell B2, geoId/15.
  4. +
  5. In cell C2, enter the formula =DCPLACESIN(, "County"). The county DCIDs populate column C.
  6. +
  7. In cell D2, enter the formula =DCGETNAME(C2:C6) . The county names populate column D.
  8. +
  9. Place your cursor in cell E2 and enter the formula =DCGET(C2:C6, "Median_Age_Person", E1:I1). The ages for each county and year appear in columns E to I.
  10. +
+ +

DCGET example 4

+ +

To get the results with the counties in columns and the dates in rows, do the following:

+ +
    +
  1. In a new sheet, in column A, create cells with the headings shown in the image below.
  2. +
  3. In cell B1, enter Hawaii, and in cell B2, geoId/15
  4. +
  5. Manually enter the DCIDs for each county, in cells B3 to F3, as shown in the image below.
  6. +
  7. Place your cursor in cell B4 and enter the formula =DCGETNAME(B3:F3) . The county names populate column D.
  8. +
  9. +

    Place your cursor in cell B5 and enter the formula =DCGET(B3:F3, "Median_Age_Person", A5:A9).

    + +

    DCGET example 4

    + +

    The ages for each county and year appear in rows 5 to 9.

    + +

    DCGET example 4

    +
  10. +
+ +

Error responses

+ +

The =DCGET formula returns a blank value under the following circumstances:

+ +
    +
  • A DCID does not exist (e.g. geoId/123123123)
  • +
  • You provide a nonexistent statistical variable (e.g. Count)
  • +
  • You provide an incorrectly formatted date (e.g. July 12, 2013)
  • +
+ +

For example, because the geoId/123123123 DCID does not exist, no value is returned to cell B1 in the following sheet for the formula =DCGET(A1, "Count_Person"):

+ +

DCGET error example

+ +

If you fail to provide all required arguments, you will get a response of #ERROR!:

+ +

DCGET error example

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/index.html b/api/sheets/index.html new file mode 100644 index 000000000..2c136d0cc --- /dev/null +++ b/api/sheets/index.html @@ -0,0 +1,631 @@ + + + + + Analyze data with Google Sheets - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Data Commons Sheets add-on

+ +

The Data Commons Google Sheets add-on allows you to import data from the Data Commons knowledge graph. The add-on provides an interface for finding a location’s unique Data Commons identifier (DCID), and several custom functions for importing data into a spreadsheet.

+ +

Read our step-by-step guides for examples on using the add-on for various analysis and visualization use cases.

+ +

Install and enable the Sheets add-on

+ +
    +
  1. Go to the Google Workspace Marketplace page for Data Commons.
  2. +
  3. Click Install.
  4. +
  5. Open a new spreadsheet.
  6. +
  7. Select Extensions > Data Commons > Fill place dcids.
  8. +
+ +
+

Note: None of the Data Commons Sheets functions will work in a spreadsheet until you have enabled the add-on by opening the Fill place dcids sidebar. You need to open the sidebar every time you reopen the Sheets application or create a new sheet.

+
+ +

Find a place’s DCID

+ +

The Data Commons Sheets add-on provides the ability to look up a place’s DCID by using the Fill place dcids feature. To find a place’s DCID:

+ +
    +
  1. In Google Sheets, open a new or existing spreadsheet.
  2. +
  3. Select the destination cell where you want to add a place’s DCID.
  4. +
  5. +

    Select Extensions > Data Commons > Fill place dcids.

    + +

    Sheets menu bar

    +
  6. +
  7. In the Fill place dcids for selected cells sidebar that appears, start typing the name of the place you are searching for.
  8. +
  9. +

    From the drop-down menu, select the place you want, and its DCID appears in the cell that you selected. For example, the following image shows the place names that match “Hawaii”.

    + +

    Google Sheets search box

    +
  10. +
+ +

Data Commons Sheets functions

+ +

The Data Commons Sheets add-on includes the five formulas listed in the following table. Click the links in the table for detailed information on each formula.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FormulaDescription
=DCGETNAME(dcids)Returns the names associated with a DCID.
=DCPLACESIN(dcids, place_type)Returns places contained in other places.
=DCGET(dcids, variable_name, [date])Returns statistical observations.
=DCPROPERTY(dcids, property)Returns node property values.
=DCCOHORTMEMBERS(dcids)Returns the cohort members of a node.
+ +

You supply arguments as follows:

+
    +
  • A single value can be a string literal, such as "geoId/05" or "County" and must be enclosed quotation marks.
  • +
  • Multiple values must be a range of cells (row or column), such as A2:A5, and are not enclosed in quotation marks.. +See below for examples.
  • +
+ +
+

Note: It’s always best to minimize the number of calls to Data Commons functions by using arguments containing a column or row of values. This is because a spreadsheet will make one call to a Google server per function call, so if your sheet contains thousands of separate calls to a function, it will be slow and return with errors.

+
+ +

Get started with Data Commons functions

+ +

Here’s a quick demo on using several of the Data Commons functions to get population data for all counties in the state of California.

+ +
    +
  1. Open a new sheet and create 3 column headings: DCID, County name, and Population.
  2. +
  3. Select cell A2 and enter the following formula to get a list of the DCIDs of all counties in California, whose DCID is geoId/06: =DCPLACESIN("geoId/06", "County"). The column fills with 58 DCIDs.
  4. +
  5. Select cell B2 and enter the following formula to get the names corresponding to all the DCIDs: =DCGETNAME(A2:A59)
  6. +
  7. Select cell C3 and enter the following formula to get the populations of each of the counties, using the statistical variable Count_Person: =DCGET(A2:A59, "Count_Person")
  8. +
+ +

Your spreadsheet should now look like this:

+ +

Sheets first demo

+ +

Sort data

+ +

Because the Data Commons add-on does not actually store values, but only formulas, in a sheet, you can’t directly sort the data. To sort the data, you need to copy it as values to a new sheet and then sort as usual:

+ +
    +
  1. Select all the columns in the sheet and select Edit > Copy.
  2. +
  3. Select Insert > Sheet to create a new sheet.
  4. +
  5. Select Edit > Paste special > Values only. You can now sort each column as desired.
  6. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/places_in.html b/api/sheets/places_in.html new file mode 100644 index 000000000..e8b876de5 --- /dev/null +++ b/api/sheets/places_in.html @@ -0,0 +1,603 @@ + + + + + Get places contained in another place - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Retrieve places contained within another place

+ +

The =DCPLACESIN formula returns lists of child places from a list of parent Place DCIDs. It only returns children with a place type that matches the place_type parameter, such as State, Country, and so on.

+ +

Formula

+ +
=DCPLACESIN(dcids, place_type)
+
+ +

Required arguments

+ +
    +
  • dcids: A single place node or range of cells representing place nodes, identified by their DCIDs.
  • +
  • place_type: The type of the contained child place nodes to filter by. For example,City and Countyare contained within State. For a full list of available types, see the place types page.
  • +
+ +

Returns

+ +

A list of child place DCIDs of the specified place DCIDs, of the specified place type.

+ +

Examples

+ +

This section contains examples of using the =DCPLACESIN formula to return places contained in another place.

+ +
+

Note: Be sure to follow the instructions for for enabling the Sheets add-on before trying these examples.

+
+ +

Example 1: Retrieve a list of counties in Delaware

+ +

To retrieve a list of counties in Delaware:

+
    +
  1. Place your cursor in the cell where you want to add the DCID for Delaware; in this case, cell A2.
  2. +
  3. Enter the Delaware DCID of geoId/10.
  4. +
  5. (Optional) In cell B2, enter DCGETNAME(A2) to retrieve Delaware’s name from the DCID in cell A2.
  6. +
  7. In cell C2, enter the formula =DCPLACESIN(A2, "County"). The DCIDs for the three Delaware counties populate column C.
  8. +
  9. In cell D2, enter the formula DCGETNAME(C2:C4) to retrieve the names of the counties.
  10. +
+ +

DCPLACESIN example 1

+ +

Example 2: Retrieve congressional districts in Alaska and Hawaii

+ +

To retrieve the congressional districts in Alaska and Hawaii:

+ +
    +
  1. In cell A2, enter geoId/02 for the DCID of Alaska and in cell A3, enter geoId/15 for the DCID of Hawaii.
  2. +
  3. (Optional) In cell B1, enter =DCGETNAME(A2:A3) to retrieve the names of Alaska and Hawaii into column B.
  4. +
  5. In cell C2, enter =DCPLACESIN(A2:A3, "CongressionalDistrict") to retrieve the DCIDs of the congressional districts.
  6. +
  7. In cell D2, enter =DCGETNAMES(C2:C4) to retrieve the names of the congressional districts.
  8. +
+ +

DCGETPLACESIN example 2

+ +

Error responses

+ +

If a DCID does not exist, the =DCPLACESIN formula returns a value of #REF!. For example, because the geoId/123123123 DCID does not exist, an error of #REF! is returned to cell B1 in the following sheet:

+ +

DCPLACESIN error example

+ +

If you provide an empty cell for a DCID, the =DCPLACESIN formula returns a value of #ERROR!, as shown show in the following image:

+ +

DCPLACESIN error example

+ +

Finally, if you provide an invalid property to the =DCPLACESIN formula, an error of #REF! is also returned, as follows:

+ +

DCPLACESIN error example

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/tutorials/index.html b/api/sheets/tutorials/index.html new file mode 100644 index 000000000..acb199020 --- /dev/null +++ b/api/sheets/tutorials/index.html @@ -0,0 +1,544 @@ + + + + + Tutorials - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Tutorials

+ +

Get familiar with the [Data Commons Google Sheets add-on with these step-by-step guides:

+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/tutorials/sheets_covid.html b/api/sheets/tutorials/sheets_covid.html new file mode 100644 index 000000000..fab236eac --- /dev/null +++ b/api/sheets/tutorials/sheets_covid.html @@ -0,0 +1,587 @@ + + + + + Sheets COVID-19 analysis - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Analyze the COVID-19 pandemic

+ +

Introduction

+

Throughout COVID-19 pandemic, the Data Commons team worked to upload COVID-19 data as it became available, helping public and private sector analysts create evidence-based policy to combat the public health crisis. This tutorial presents an example of how to obtain use Google Sheets to obtain the data from Data Commons and create visualizations for it.

+ +

Step 1: Setup

+

Pull up Google Sheets and create a new, blank spreadsheet. You can title it Data Commons COVID-19 analysis or any other name of your choosing.

+ +

+ +

To enable the Data Commons API in your spreadsheet, ensure that the Data Commons extension is installed and available under the Extensions menu. Hover over the Data Commons menu item, then click on the Fill place DCIDs option.

+ +

+ +

A menu should pop up on the right side of the Sheets web application. Type the name of any place desired; its DCID should populate into the A1 entry of the chart. This step is required to enable the Data Commons API.

+ +

+ +

Next, double-click on A1 in the chart and type country/USA.

+ +

+ +

Step 2: Retrieve place names and DCIDs

+

To obtain the DCIDs for all the states, you can use the plugin function DCPLACESIN. In cell B1, type =DCPLACESIN(A1, "State"). Sheets provides pointers to help guide your function inputs. Your spreadsheet output should look like this:

+ +

+ +

Finally, you’ll want to retrieve the state names and position them conveniently near these DCIDs. You can use the add-on function DCGETNAME to access this information. In cell C1, type =DCGETNAME(B1:B). Your final output should look like this:

+ +

+ +

Step 3: Populate the spreadsheet with COVID information

+

Let’s analyze each state’s cumulative count of deaths due to COVID as of December 31, 2022. To do this, we get the value of the statistical variable CumulativeCount_MedicalConditionIncident_COVID_19_PatientDeceased for each state on the date specified. You can use the DCGET method to do this.

+ +

In cell D1, type =DCGET(B1:B, "CumulativeCount_MedicalConditionIncident_COVID_19_PatientDeceased", "2022-12-31"). Your final output should look like this:

+ +

+ +

Step 4: Visualize the data

+

As a final step, you can use Google Sheets’ Chart option to map this data! Select cells C1 to D52, then select Insert > Chart. Your spreadsheet will look like this:

+ +

+ +

Feel free to drag the histogram out of the way of the numbers! As a final step, in the right sidebar Chart editor, from the Setup > Chart type drop-down menu, select Map. Then, from the Customize > Geo > Region drop-down menu, select the United States. Your final sheet should look something like this:

+ +

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/tutorials/sheets_latitude.html b/api/sheets/tutorials/sheets_latitude.html new file mode 100644 index 000000000..d028a0c51 --- /dev/null +++ b/api/sheets/tutorials/sheets_latitude.html @@ -0,0 +1,579 @@ + + + + + Sheets South American latitudes - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Obtain latitude information for country capitals in South America

+ +

Introduction

+

The Data Commons Sheets add-on allows you to obtain basic information about the entities in the knowledge graph by retrieving their properties. This tutorial walks you through the DCPROPERTY function that enables this.

+ +

Step 1: Setup

+

Pull up Google Sheets and create a new, blank spreadsheet. You can title it Data Commons South American capitals’ latitude or any other name of your choosing.

+ +

+ +

To enable the Data Commons API in your spreadsheet, ensure that the Data Commons extension is installed and available under the Extensions menu. Hover over the Data Commons menu item, then click on the Fill place DCIDs option.

+ +

+ +

Step 2: Retrieve place names and DCIDs

+

Double-click on the A1 cell and enter southamerica (the DCID for the continent of South America).

+ +

+ +

To obtain the DCIDs for all the countries, you can use the add-on function DCPLACESIN. In cell B1, type =DCPLACESIN(A1, "Country"). Sheets provides pointers to help guide your function inputs. Your spreadsheet output should look like this:

+ +

+ +

Next, you’ll want to retrieve the country names and position them conveniently near these DCIDs. You can use the addon-on function DCGETNAME to access this information. In cell C1, type =dcgetname(B1:B). Your final output will look like this:

+ +

+ +

Step 3: Populate the spreadsheet with capital and latitude information

+

In this step, you will obtain all South American countries’ capitals and latitudes. To do this, you will need to get the value of the property names latitude and administrativeCapital for each country on the date specified. (As an aside, if you’d like to see what properties are available for any given entity, Data Commons provides a Knowledge Graph tool enabling you to look up any entity in the graph and view its associated properties.) You can use the DCPROPERTY method to do this.

+ +

In cell D1, =DCPROPERTY(B1:B, "administrativeCapital"). Your output should look like this:

+ +

+ +

Now, to get the latitude of each capital, in cell E1, type =DCPROPERTY(D1:D, "latitude").

+ +

+ +

Finally, use the DCGETNAME function again, against column D, to get the names of the capitals. Try it yourself!

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/sheets/tutorials/sheets_sleep.html b/api/sheets/tutorials/sheets_sleep.html new file mode 100644 index 000000000..3e63b6455 --- /dev/null +++ b/api/sheets/tutorials/sheets_sleep.html @@ -0,0 +1,585 @@ + + + + + Sheets CDC 500 cities sleep health - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Analyze the CDC 500 cities for sleep health

+ +

Introduction

+ +

The Data Commons API enables easy access to health data for the 500 cities the U.S. Centers for Disease Control and Prevention (CDC) has prioritized for public health information tracking. This tutorial will walk you through accessing and analyzing that information and scoring each of the cities according to adults residents’ excellence in sleep habits, for the year 2020.

+ +

Step 1: Setup

+

Pull up Google Sheets and create a new, blank spreadsheet. You can title it Data Commons CDC 500 sleep analysis or any other name of your choosing.

+ +

+ +

To enable the Data Commons API in your spreadsheet, ensure that the Data Commons extension is installed and available under the Extensions menu. Hover over the Data Commons menu item, then click on the Fill place DCIDs option.

+ +

+ +

Step 2: Get the DCIDs and names of cohort members

+

Data Commons provides the method DCCOHORTMEMBERS for obtaining the members of a Data Commons cohort. Here, you’ll use this method to retrieve the cities in the CDC 500 cohort. Start by double-clicking on A1 in the chart and enter CDC500_City.

+ +

+ +

In cell B1, enter =DCCOHORTMEMBERS(A1). The output should look like this:

+ +

+ +

To get the names of these cities, enter =DCGETNAME(B1:B) into cell C1. The output should look like this:

+ +

+ +

Step 3: Obtain the sleep health level for each city

+

We will use the percentage of chronically restless residents in each city using the DCGET method with the statistical variable Percent_Person_SleepLessThan7Hours. (More information on statistical variables is available in the glossary.) Enter =DCGET(B1:B, "Percent_Person_SleepLessThan7Hours", "2020") into cell D1 in your spreadsheet. The output should look like this:

+ +

+ +

Step 4: Sort on sleep score

+ +
    +
  1. Select columns B, C, and D, and choose Edit > Copy.
  2. +
  3. Select Insert > Sheet to add a new sheet.
  4. +
  5. Select Edit > Paste special > Values only.
  6. +
  7. Select column C, click the down arrow, and select Sort sheet Z to A.
  8. +
+ +

Your final output should look like this:

+ +

sorted

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/bar.html b/api/web_components/bar.html new file mode 100644 index 000000000..4922ef1ee --- /dev/null +++ b/api/web_components/bar.html @@ -0,0 +1,805 @@ + + + + + Bar chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons bar chart Web Component

+ +

Data Commons Web Component for visualizing one or more statistical variables around one or more places on a bar chart.

+ + + +

Usage

+ +
+ + +
+ +
<datacommons-bar
+  header="Populations of USA, India, and China"
+  places="country/USA country/IND country/CHN"
+  variables="Count_Person"
+  maxPlaces="15"
+></datacommons-bar>
+
+ +
<datacommons-bar
+  header="Most populous states in the US"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variables="Count_Person"
+  maxPlaces="15"
+></datacommons-bar>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types to plot. Example: State. For a list of available place types, see the place types page.
Optional if places is specified.
headerstringChart title.
parentPlacestringParent place DCID to plot. Example: country/USA.
Optional if places is specified.
placeslistPlaces DCIDs to plot, as a space separated list of strings. Example: "geoId/12 geoId/13".
Optional if childPlaceType and parentPlace are specified.
variableslistVariable DCID(s) to plot, as a space separated list of strings. Example: "Count_Person Count_Farm".
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
barHeightnumberBar height (in px) for horizontal charts.
colorslistSpecify custom color for each variable. Pass in colors in the same order as variables.

Values should follow CSS specification (keywords, rgb, rgba, hsl, #hex). Separate multiple values with spaces, e.g., "#ff0000 #00ff00 #0000ff". Make sure individual colors have no spaces. For example, use rgba(255,0,0,0.3) instead of rgba(255, 0, 0, 0.3).
disableEntityLinkbooleanInclude to disable entity (place) links in the x-axis. Default: false (links are enabled)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
horizontalbooleanInclude to draw bars horizontally instead of vertically.
lollipopbooleanInclude to draw lollipops instead of bars.
maxPlacesnumberMaximum number of child places to plot. Default: 7.
maxVariablesnumberMaximum number of varibales to plot. Default: show all variables.
sortstringBar chart sort order.

Options:
- ascending (ascending by the variable’s value)
- descending (descending by variable’s value)
- ascendingPopulation (ascending by the place’s population)
-descendingPopulation (descending by the place’s population)

Default: descendingPopulation
stackedbooleanInclude to draw as stacked bar chart instead of grouped chart.
subscribestringListen for data changes on this event channel. Channel name should match the publish name on a control component. Example: datacommons-slider
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
defaultVariableNamestringTo be used with variableNameRegex. If specified and no variable name is extracted out with the regex, use this as the variable name. e.g., if the variableNameRegex is “(.*?)(?=:)”, and the defaultVariableName is “Total”, for a variable named “variable 1”, it will become “Total”.
placeNamePropstringOptionally specify the property to use to get the place names.
showExploreMorebooleanInclude to show “Explore more” link in the footer, which takes the user to Datacommons.org’s visualization tools.
variableNameRegexstringOptionally specify regex to use to extract out variable name. e.g., if the variableNameRegex is “(.*?)(?=:)”, only the part before a “:” will be used for variable names. So “variable 1: test” will become “variable 1”.
yAxisMarginnumberSet size (in px) of y-axis’ margin to fit the axis label text. Default: 60px.
+ +

Examples

+ +

Example 1: A bar chart of population for states in the US

+ +

Code:

+
<datacommons-bar
+  header="Population of US States"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variables="Count_Person"
+></datacommons-bar>
+
+ +
+ +
+ +

Example 2: A bar chart of population for specific US states

+ +

Code:

+
<datacommons-bar
+  header="Population of US States"
+  variables="Count_Person"
+  places="geoId/01 geoId/02"
+></datacommons-bar>
+
+ +
+ +
+ +

Example 3: A stacked bar chart of population by gender for specific US states

+ +

Code:

+
<datacommons-bar
+  header="Population of US States"
+  variables="Count_Person"
+  places="geoId/01 geoId/02"
+  stacked
+></datacommons-bar>
+
+ +
+ +
+ +

Example 4: A horizontal, stacked bar chart of median income for specific US states

+ +

Code:

+
<datacommons-bar
+  header="Median income by gender"
+  variables="Median_Income_Person_15OrMoreYears_Male_WithIncome Median_Income_Person_15OrMoreYears_Female_WithIncome"
+  places="geoId/01 geoId/02 geoId/04 geoId/20 geoId/21 geoId/22 geoId/23 geoId/24 geoId/25"
+  stacked
+  horizontal
+  sort="descending"
+></datacommons-bar>
+
+ +
+ +
+ +

Example 5: A lollipop chart of population for states in the US

+ +

Code:

+
<datacommons-bar
+  header="Population of US States"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variables="Count_Person"
+  lollipop
+></datacommons-bar>
+
+ +
+ +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/gauge.html b/api/web_components/gauge.html new file mode 100644 index 000000000..bc40b7020 --- /dev/null +++ b/api/web_components/gauge.html @@ -0,0 +1,654 @@ + + + + + Gauge chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons gauge chart Web Component

+ +

Data Commons Web Component for visualizing a single statistical variable about a single place.

+ +

Usage

+ +
+ +
+ +
<datacommons-gauge
+  header="Title here"
+  place="place_dcid"
+  variable="variable_dcid"
+  min="0"
+  max="100"
+></datacommons-gauge>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerstringChart title.
maxnumberGauge maximum value.
minnumberGauge mininmum value.
placestringPlace DCID to plot.
variablestringVariable DCID to plot.
+ +

Optional

+ + + + + + + + + + + + + + + + +
NameTypeDescription
colorslistOptionally specify a custom chart color scheme for the display variable. Will interpolate colors linearly depending on how many are passed in.

Values should follow CSS specification (keywords, rgb, rgba, hsl, #hex). Separate multiple values with spaces, e.g., "#ff0000 #00ff00 #0000ff". Make sure individual colors have no spaces. For example, use rgba(255,0,0,0.3) instead of rgba(255, 0, 0, 0.3).
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
+ +

Examples

+ +

Example 1: Show percentage of US population that are internet users

+ +

Code:

+
<datacommons-gauge
+  header="Percentage of US Population that are Internet Users"
+  place="country/USA"
+  variable="Count_Person_IsInternetUser_PerCapita"
+  min="0"
+  max="100"
+></datacommons-gauge>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/highlight.html b/api/web_components/highlight.html new file mode 100644 index 000000000..3aa309893 --- /dev/null +++ b/api/web_components/highlight.html @@ -0,0 +1,646 @@ + + + + + Highlight tile - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons highlight chart Web Component

+ +

Data Commons Web Component for highlighting a specific +variable value from a specific variable about a single place.

+ +

Usage

+ +
+ +
+ +
<datacommons-highlight
+  header="Title here"
+  place="place_dcid"
+  variable="variable_dcid"
+></datacommons-highlight>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerstringText to show next to the variable value highlighted.
placetypePlace DCID to plot.
variabletypeVariable DCID to plot.
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
datestringSpecific date to show data for. ISO 8601 format (e.g. “YYYY”, “YYYY-MM”, “YYYY-MM-DD”).

Note: Ensure your variable has data available at the specified date using the Stat Var Explorer

Default: Most recent data available.
unitstringUnit the variable is measured in.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
+ +

Examples

+ +

Example 1: Show percentage of US population that are internet users

+ +

Code:

+
<datacommons-highlight
+  header="Percentage of US Population that are Internet Users"
+  place="country/USA"
+  variable="Count_Person_IsInternetUser_PerCapita"
+></datacommons-highlight>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/index.html b/api/web_components/index.html new file mode 100644 index 000000000..5cdcbc27a --- /dev/null +++ b/api/web_components/index.html @@ -0,0 +1,791 @@ + + + + + Embed data and visualizations in your own website - Docs - Data Commons + + + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Data Commons Web Components

+ +

Embed Data Commons +statistical variable observation +visualizations in your web application.

+ +

+ + + +

Usage

+ +

Include datacommons.js in your html’s +<head>...</head> tag. Then use Data Commons +web component +tags (e.g. datacommons-line) to add embedded data visualizations.

+ +

For example, to embed a line chart:

+ +
<html>
+  <head>
+    <script src="https://datacommons.org/datacommons.js"></script>
+  </head>
+  <body>
+    <datacommons-line
+      header="US Population Over Time"
+      place="country/USA"
+      variables="Count_Person"
+    ></datacommons-line>
+  </body>
+</html>
+
+ +

See a live version of this example you can play around with in +Playground +(source).

+ +

Components

+ + + +

Code Playground Examples

+ + + +

Variables and places

+ +

Data Commons web components visualize statistical variables about one or more +places. Variables and places are identified by +Data Commons Identifiers, or +DCIDs.

+ +

To look up a DCID for an entity or variable, see the different methods described in this page.

+ +

To find places available for a statistical variable, see this page.

+ +

Styling

+ +

Custom styles are supported through +CSS shadow parts.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CSS ::partDescriptionComponents
containerChart container elementAll
legendChart legendbar, line, map,pie
place-pathGeo boundarymap
place-path-<dcid>Geo boundary for a particular place. Example: place-path-geoId\/12 *map
seriesSeries data (line, bar, lollipop, etc)bar, line. pie
series-place-<dcid>Series data for a particular place. Example: series-place-geoId\/12 *bar, line. pie
series-place-<dcid>-variable-<dcid>Series data for a particular place and variable. Example: series-place-geoId\/12-variable-Count_Person *bar, line
series-variable-<dcid>Series data for a variable. Example: series-place-variable-Count_Personbar, line. pie
headerChart titleAll
subheaderChart subtitle (if provided in slot="subheader")All
footerChart footer (if provided in slot="footer")All
x-axisX-axis linebar, line
x-axis-textX-axis label textbar, line
x-axis-tickX-axis tick markbar, line
y-axis-textY-Axis label textbar, line
y-axis-tickY-Axis tick markbar, line
+ +

Additionally, the following css variables are supported:

+ + + + + + + + + + + + + + + + + + + + + +
CSS variableDescriptionDefault
--dc-headings-font-familyFont family for web component headings (h1 through h6)Google Sans
--dc-font-familyFont family for web component body textGoogle Sans Text
+ +

Styling Example

+ +

See a live version of this example you can play around with in +Playground +(source).

+ +
<html>
+  <head>
+    <style>
+      #styled-map {
+        --dc-headings-font-family: monospace;
+      }
+      #styled-map::part(container) {
+        border-radius: 10px;
+        border: 1px solid #f5f5f5;
+        box-shadow: 1px 2px 6px rgba(3, 7, 18, 0.04),
+          5px 8px 25px rgba(3, 7, 18, 0.08);
+      }
+      #styled-map::part(legend) {
+        border: 1px solid #e1e1e1;
+        padding: 5px 8px;
+        border-radius: 10px;
+      }
+      #styled-map::part(title) {
+        font-weight: 200;
+        font-size: 16px;
+        margin-bottom: 16px;
+        color: #111a1b;
+      }
+      #styled-map::part(place-path) {
+        fill: #e9e9e9;
+      }
+      #styled-map::part(place-path-geoId\/12),
+      #styled-map::part(place-path-geoId\/13),
+      #styled-map::part(place-path-geoId\/06) {
+        fill-opacity: 1;
+        fill: #e76f51;
+        stroke: #b72a53;
+        stroke-width: 2px;
+      }
+    </style>
+  </head>
+  <body>
+    <datacommons-map
+      id="styled-map"
+      header="Three most populous US states"
+      parentPlace="country/USA"
+      childPlaceType="State"
+      variable="Count_Person"
+    ></datacommons-map>
+  </body>
+</head>
+
+ +

License

+ +

Apache 2.0

+ +

Support

+ +

For general questions or issues, please open an issue on our +issues page. For all other +questions, please send an email to support@datacommons.org.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/line.html b/api/web_components/line.html new file mode 100644 index 000000000..14cc3d2b0 --- /dev/null +++ b/api/web_components/line.html @@ -0,0 +1,729 @@ + + + + + Line chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons line chart Web Component

+ +

Data Commons Web Component for visualizing one or more statistical variables about a number of places as a line chart.

+ +

Usage

+ +
+ + +
+ +
<datacommons-line
+  places="place_dcid_1 place_dcid_2"
+  variables="var_dcid_1 var_dcid_2"
+  header="Chart title"
+></datacommons-line>
+
+ +
<datacommons-line
+  parentPlace="parent_place_dcid"
+  childPlaceType="type"
+  variables="var_dcid_1 var_dcid_2"
+  header="Chart title"
+></datacommons-line>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types to plot. Example: State. For a list of available place types, see the place types page.
Optional if places is specified.
headerstringChart title.
parentPlacestringParent place DCID to plot. Example: country/USA.
Optional if places is specified.
placeslistPlaces DCIDs to plot, as a space separated list of strings. Example: "geoId/12 geoId/13".
Optional if childPlaceType and parentPlace are specified.
variableslistVariable DCID(s) to plot, as a space separated list of strings. Example: "Count_Person Count_Farm".
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
colorslistSpecify custom color for each variable. Pass in colors in the same order as variables.

Values should follow CSS specification (keywords, rgb, rgba, hsl, #hex). Separate multiple values with spaces, e.g., "#ff0000 #00ff00 #0000ff". Make sure individual colors have no spaces. For example, use rgba(255,0,0,0.3) instead of rgba(255, 0, 0, 0.3).
timeScalestringOne of "year", "month", or "day". If provided, the x-axis will draw a tick mark and label at that time scale.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
defaultVariableNamestringTo be used with variableNameRegex. If specified and no variable name is extracted out with the regex, use this as the variable name. e.g., if the variableNameRegex is “(.*?)(?=:)”, and the defaultVariableName is “Total”, for a variable named “variable 1”, it will become “Total”.
placeNamePropstringOptionally specify the property to use to get the place names.
showExploreMorebooleanInclude to show “Explore more” link in the footer, which takes the user to Datacommons.org’s visualization tools.
variableNameRegexstringOptionally specify regex to use to extract out variable name. e.g., if the variableNameRegex is “(.*?)(?=:)”, only the part before a “:” will be used for variable names. So “variable 1: test” will become “variable 1”.
+ +

Examples

+ +

Example 1: Plot a single variable over time for a single place

+ +

Show the number of people under poverty level in the US over time.

+ +

Code:

+
<datacommons-line
+  header="Population Below Poverty Level Status in United States"
+  places="country/USA"
+  variables="Count_Person_BelowPovertyLevelInThePast12Months"
+></datacommons-line>
+
+ + + +

Example 2: Plot a single variable over time for multiple places

+ +

Code:

+
<datacommons-line
+  header="Population for USA, India, and China"
+  places="country/USA country/IND country/CHN"
+  variables="Count_Person"
+></datacommons-line>
+
+ + + +

Example 3: Plot a single variable for all child places in a parent place

+ +

Show population for all counties in Alaska, USA.

+ +

Code:

+
<datacommons-line
+  header="Population of counties in Alaska"
+  parentPlace="geoId/02"
+  childPlaceType="County"
+  variables="Count_Person"
+></datacommons-line>
+
+ + + +

Example 4: Plot multiple variables for a single place

+ +

Show number of households without internet and number of households without health insurance for California, USA.

+ +

Code:

+
<datacommons-line
+  header="Population by gender of California"
+  places="geoId/06"
+  variables="Count_Household_InternetWithoutSubscription Count_Household_NoHealthInsurance"
+></datacommons-line>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/map.html b/api/web_components/map.html new file mode 100644 index 000000000..f4535f02d --- /dev/null +++ b/api/web_components/map.html @@ -0,0 +1,680 @@ + + + + + Map chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons map chart Web Component

+ +

Data Commons Web Component for visualizing a single statistical variables around one or more places on a map.

+ +

Usage

+ +
+ +
+ +
<datacommons-map
+  header="Chart title"
+  parentPlace="place_dcid"
+  childPlaceType="place_type_dcid"
+  variable="variable_dcid"
+></datacommons-map>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types to plot. Example: State. For a list of available place types, see the place types page.
Optional if places is specified.
headerstringChart title.
parentPlacestringParent place DCID to plot. Example: country/USA.
Optional if places is specified.
variablestringVariable DCID to plot.
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
allowZoombooleanInclude to allow zooming and panning using the mouse and show zoom-in and zoom-out buttons.
colorslistList up to three colors to define a custom color scale.

Values should follow CSS specification (keywords, rgb, rgba, hsl, #hex). Separate multiple values with spaces, e.g., "#ff0000 #00ff00 #0000ff". Make sure individual colors have no spaces. For example, use rgba(255,0,0,0.3) instead of rgba(255, 0, 0, 0.3).

- If one color is given: a luminance based color scale will be used
- If two colors are given: a divergent color scale will be used, with the first color corresponding to the min value, and the second color corresponding to the max value.
- If three colors are given: a color scale with the first three colors corresponding to [min, mean, max] values will be used.
datestringSpecific date to show data for. ISO 8601 format (e.g. “YYYY”, “YYYY-MM”, “YYYY-MM-DD”).

Note: Ensure your variable has data available at the specified date using the Stat Var Explorer

Default: Most recent data available.
subscribestringListen for data changes on this event channel. Channel name should match the publish name on a control component. Example: datacommons-slider
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
geoJsonPropstringOptionally specify the property to use to get geojsons.
placeNamePropstringOptionally specify the property to use to get the place names.
showExploreMorebooleanInclude to show “Explore more” link in the footer, which takes the user to Datacommons.org’s visualization tools.
+ +

Examples

+ +

Example 1: Show a population map for the year 2020

+ +

A map of population below poverty level in US States in the year 2020.

+ +

Code:

+
<datacommons-map
+  header="Population Below Poverty Level Status in Past Year in States of United States (2020)"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variable="Count_Person_BelowPovertyLevelInThePast12Months"
+  date="2020"
+></datacommons-map>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/pie.html b/api/web_components/pie.html new file mode 100644 index 000000000..2c42ebf86 --- /dev/null +++ b/api/web_components/pie.html @@ -0,0 +1,667 @@ + + + + + Pie chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons pie chart Web Component

+ +

Data Commons Web Component for visualizing multiple statistical variables around a single place on a pie/donut chart.

+ +

Usage

+ +
+ +
+ +
<datacommons-pie
+  header="Chart title"
+  place="place_dcid"
+  variables="variable_dcid_1 variable_dcid_2 variable_dcid_3"
+></datacommons-pie>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerstringChart title.
placestringPlaces DCID to plot.
variableslistVariable DCID(s) to plot, as a space separated list of strings. Example: "Count_Person Count_Farm".
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
colorslistSpecify custom color for each variable. Pass in colors in the same order as variables.

Values should follow CSS specification (keywords, rgb, rgba, hsl, #hex). Separate multiple values with spaces, e.g., "#ff0000 #00ff00 #0000ff". Make sure individual colors have no spaces. For example, use rgba(255,0,0,0.3) instead of rgba(255, 0, 0, 0.3).
donutbooleanInclude to draw as a donut chart instead of a pie chart.
subheaderstringText to add under the header.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
+ +

Examples

+ +

Example 1: Multiple variables for a single place

+ +

Show the split of median income by gender in California as a pie chart.

+ +

Code:

+
<datacommons-pie
+  header="Median Income by gender in California"
+  place="geoId/06"
+  variables="Median_Income_Person_15OrMoreYears_Male_WithIncome Median_Income_Person_15OrMoreYears_Female_WithIncome"
+></datacommons-pie>
+
+ + + +

Example 2: Multiple variables for a single place, as a donut chart

+ +

Show the split of median income by gender in California as a donut chart.

+ +

Code:

+
<datacommons-pie
+  header="Median Income by gender in California"
+  place="geoId/06"
+  variables="Median_Income_Person_15OrMoreYears_Male_WithIncome Median_Income_Person_15OrMoreYears_Female_WithIncome"
+  donut
+></datacommons-pie>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/ranking.html b/api/web_components/ranking.html new file mode 100644 index 000000000..b885b3b5e --- /dev/null +++ b/api/web_components/ranking.html @@ -0,0 +1,720 @@ + + + + + Ranking chart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons ranking chart Web Component

+ +

Data Commons Web Component for listing statistical variables around a single place in descending or ascending order.

+ +

Usage

+ +
+ +
+ +
<datacommons-ranking
+  header="US States with the Highest Population"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variable="Count_Person"
+></datacommons-ranking>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types to plot. Example: State. For a list of available place types, see the place types page.
headerstringChart title.
parentPlacestringParent place DCID to plot. Example: country/USA.
variablestringVariable DCID to plot.
variableslistA list of variable DCIDs to plot. Entries in the list should be separated by spaces. Example: "dcid1 dcid2".

optional if variable is provided.
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
highestTitlestringChart title to show if header is not provided. Will only show if a highest-to-lowest ranking is shown.
lowestTitlestringChart title to show if header is not provided. Will only show if a lowest-to-highest ranking is shown.
perCapitalistA list of variable DCIDs to rank by per capita value. Entries in the list should be separated by spaces. Example: "dcid1 dcid2".
rankingCountintegerHow many places to show, e.g. the “N” in “Top-N”.

Default: 5.
showHighestLowestbooleanInclude to show both the top and bottom places, ordered highest-to-lowest, in one chart.

Default: false.
showLowestbooleanInclude to sort values in ascending order. Ignored if showHighestLowest is true.
showMultiColumnbooleanInclude to show variables across multiple columns in one table, with a header for each variable. The last variable provided is used for ranking.

Default: false. If multiple variables are provided, a separate ranking table is generated for each variable.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
hideFooterbooleanInclude to hide footer with download link.

Default: false.
showExploreMorebooleanInclude to show “Explore more” link in the footer, which takes the user to Datacommons.org’s visualization tools.
+ +

Examples

+ +

Example 1: Show a ranking of US states by population, highest to lowest

+ +

Code:

+
<datacommons-ranking
+  header="US States with the Highest Population"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variable="Count_Person"
+></datacommons-ranking>
+
+ + + +

Example 2: Show a ranking of US states by population, lowest to highest

+ +

Code:

+
<datacommons-ranking
+  header="US States with the Lowest Population"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variable="Count_Person"
+  showLowest
+></datacommons-ranking>
+
+ + + +

Example 3: Show both highest and lowest US states by population

+ +

Code:

+
<datacommons-ranking
+  header="US States Ranking by Population"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variable="Count_Person"
+  showHighestLowest
+></datacommons-ranking>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/scatter.html b/api/web_components/scatter.html new file mode 100644 index 000000000..1e05a4810 --- /dev/null +++ b/api/web_components/scatter.html @@ -0,0 +1,683 @@ + + + + + Scatter plot - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons scatter plot chart Web Component

+ +

Data Commons Web Component for visualizing the relationship +between two variables.

+ +

Usage

+ +
+ +
+ +
<datacommons-TYPE
+  parentPlace="parent_place_dcid"
+  childPlaceType="type"
+  variables="var_dcid_1 var_dcid_2"
+  header="Chart title"
+></datacommons-TYPE>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types to plot. Example: State. For a list of available place types, see the place types page.
headerstringChart title.
parentPlacestringParent place DCID to plot. Example: country/USA.
variableslistVariable DCID(s) to plot, as a space separated list of strings. Example: "Count_Person Count_Farm". At least 2 variables must be provided, and only the first 2 variables will be plotted.
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
highlightBottomLeftbooleanInclude to label outliers in the bottom left quadrant. Defaults to false.
highlightBottomRightbooleanInclude to label outliers in the bottom right quadrant. Defaults to false.
highlightTopLeftbooleanInclude to label outliers in the top left quadrant. Defaults to false.
highlightTopRightbooleanInclude to label outliers in the top right quadrant. Defaults to false.
showPlaceLabelsbooleanInclude to label all points with the place they correspond to. Defaults to false.
showQuadrantsbooleanInclude to show grid lines delimiting top right, top left, bottom right, and bottom left quadrants. Defaults to false.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
placeNamePropstringOptionally specify the property to use to get the place names.
showExploreMorebooleanInclude to show “Explore more” link in the footer, which takes the user to Datacommons.org’s visualization tools.
+ +

Examples

+ +

Example 1: Plot population vs median household income for US states

+ +

Code:

+
<datacommons-scatter
+  header="Population vs Median Household Income for US States"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  variables="Count_Person Median_Income_Household"
+></datacommons-scatter>
+
+ + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/api/web_components/slider.html b/api/web_components/slider.html new file mode 100644 index 000000000..47df3ab44 --- /dev/null +++ b/api/web_components/slider.html @@ -0,0 +1,730 @@ + + + + + Slider control - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons slider Web Component

+ +

Data Commons Web Component for controlling the date in datacommons-map or +datacommons-bar.

+ +

Usage

+ +
+ + +
+ +
<!-- Map being controlled -->
+<datacommons-map
+  [...other map attributes here]
+  subscribe="event-name-here"
+></datacommons-map>
+
+<!-- Slider  -->
+<datacommons-slider
+  publish="event-name-here"
+  variable="variable_dcid"
+  parentPlace="place_dcid"
+  childPlaceType="child_place_type_dcid"
+></datacommons-slider>
+
+ +
<!-- Bar chart listening for date change events on the "dc-bar" channel -->
+<datacommons-bar
+  header="Population below the poverty line in the US, Russia, and Mexico (${date})"
+  variables="sdg/SI_POV_DAY1"
+  places="country/USA country/RUS country/MEX"
+  subscribe="dc-bar"
+  date="HIGHEST_COVERAGE"
+>
+  <!-- Place slider in the component's footer and publish events on the "dc-bar" channel -->
+  <datacommons-slider
+    variables="sdg/SI_POV_DAY1"
+    places="country/USA country/RUS country/MEX"
+    publish="dc-bar"
+    slot="footer"
+    >
+  </datacommons-slider>
+</datacommons-bar>
+
+ + + + + +

Attributes

+ +

Required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
childPlaceTypestringChild place types of date range. Example: State. For a list of available place types, see the place types page.

optional if dates is specified.
dateslistSet date option range. Example: "2001 2002 2003"

optional if variable, parentPlace, and childPlaceType are specified.
parentPlacestringParent place DCID of date range. Example: country/USA.

optional if dates is specified.
publishstringEvent name to publish on slider change.
variablestringVariable DCID of date range. Example: Count_Person.

optional if dates is specified.
+ +

Optional

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerstringOverride default header text.
valuenumberInitial slider value.
+ +

Advanced Configuration

+ + + + + + + + + + + + + + + + +
NameTypeDescription
apiRootstringDomain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: https://datacommons.org.
+ +

Examples

+ +

Example 1: Use slider to change dates on a datacommons-map web component

+ +

Code:

+
<!-- Listen for date changes on the "dc-map" channel -->
+<datacommons-map
+  header="Population"
+  parentPlace="country/USA"
+  childPlaceType="State"
+  subscribe="dc-map"
+  variable="Count_Person"
+></datacommons-map>
+
+<!-- Publish date changes on the "dc-map" channel  -->
+<datacommons-slider
+  publish="dc-map"
+  variable="Count_Person"
+  parentPlace="country/USA"
+  childPlaceType="State"
+></datacommons-slider>
+
+ + + + + + + +

Example 2: Use slider to change dates on a datacommons-bar web component

+ +

Code:

+
<!-- Bar chart listening for date change events on the "dc-bar" channel -->
+<datacommons-bar
+  header="Population below the poverty line in the US, Russia, and Mexico (${date})"
+  variables="sdg/SI_POV_DAY1"
+  places="country/USA country/RUS country/MEX"
+  subscribe="dc-bar"
+  date="HIGHEST_COVERAGE"
+>
+  <!-- Place slider in the component's footer and publish events on the "dc-bar" channel -->
+  <datacommons-slider
+    variables="sdg/SI_POV_DAY1"
+    places="country/USA country/RUS country/MEX"
+    publish="dc-bar"
+    slot="footer"
+    >
+  </datacommons-slider>
+</datacommons-bar>
+
+ + + + + + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 000000000..b4ea7f018 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,48 @@ +.tab { + display: flex; + flex-wrap: wrap; + margin-left: -20px; + padding: 0; + list-style: none; + position: relative; +} + +.tab > * { + flex: none; + padding-left: 20px; + position: relative; +} + +.tab > * > a { + display: block; + text-align: center; + padding: 9px 20px; + color: #999; + border-bottom: 2px solid transparent; + border-bottom-color: transparent; + font-size: 12px; + text-transform: uppercase; + transition: color .1s ease-in-out; + line-height: 20px; +} + +.tab > .active > a { + color:#222; + border-color: #1e87f0; +} + +.tab li a { + text-decoration: none; + cursor: pointer; +} + +.tab-content{ + padding: 0; +} + +.tab-content li { + display: none; +} +.tab-content li.active { + display: initial; +} \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 000000000..2440b2ef9 --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1 @@ +/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none !important}a{background-color:transparent}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}*{box-sizing:border-box}input,select,textarea,button{font-family:inherit;font-size:inherit;line-height:inherit}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:1.5;color:#24292e;background-color:#fff}a{color:#0366d6;text-decoration:none}a:hover{text-decoration:underline}b,strong{font-weight:600}hr,.rule{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #dfe2e5}hr::before,.rule::before{display:table;content:""}hr::after,.rule::after{display:table;clear:both;content:""}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}button{cursor:pointer;border-radius:0}[hidden][hidden]{display:none !important}details summary{cursor:pointer}details:not([open])>*:not(summary){display:none !important}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0}h1{font-size:32px;font-weight:600}h2{font-size:24px;font-weight:600}h3{font-size:20px;font-weight:600}h4{font-size:16px;font-weight:600}h5{font-size:14px;font-weight:600}h6{font-size:12px;font-weight:600}p{margin-top:0;margin-bottom:10px}small{font-size:90%}blockquote{margin:0}ul,ol{padding-left:0;margin-top:0;margin-bottom:0}ol ol,ul ol{list-style-type:lower-roman}ul ul ol,ul ol ol,ol ul ol,ol ol ol{list-style-type:lower-alpha}dd{margin-left:0}tt,code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}pre{margin-top:0;margin-bottom:0;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.octicon{vertical-align:text-bottom}.anim-fade-in{animation-name:fade-in;animation-duration:1s;animation-timing-function:ease-in-out}.anim-fade-in.fast{animation-duration:300ms}@keyframes fade-in{0%{opacity:0}100%{opacity:1}}.anim-fade-out{animation-name:fade-out;animation-duration:1s;animation-timing-function:ease-out}.anim-fade-out.fast{animation-duration:0.3s}@keyframes fade-out{0%{opacity:1}100%{opacity:0}}.anim-fade-up{opacity:0;animation-name:fade-up;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-out;animation-delay:1s}@keyframes fade-up{0%{opacity:0.8;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}.anim-fade-down{animation-name:fade-down;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-in}@keyframes fade-down{0%{opacity:1;transform:translateY(0)}100%{opacity:0.5;transform:translateY(100%)}}.anim-grow-x{width:0%;animation-name:grow-x;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease;animation-delay:0.5s}@keyframes grow-x{to{width:100%}}.anim-shrink-x{animation-name:shrink-x;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-in-out;animation-delay:0.5s}@keyframes shrink-x{to{width:0%}}.anim-scale-in{animation-name:scale-in;animation-duration:0.15s;animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5)}@keyframes scale-in{0%{opacity:0;transform:scale(0.5)}100%{opacity:1;transform:scale(1)}}.anim-pulse{animation-name:pulse;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes pulse{0%{opacity:0.3}10%{opacity:1}100%{opacity:0.3}}.anim-pulse-in{animation-name:pulse-in;animation-duration:0.5s}@keyframes pulse-in{0%{transform:scale3d(1, 1, 1)}50%{transform:scale3d(1.1, 1.1, 1.1)}100%{transform:scale3d(1, 1, 1)}}.hover-grow{transition:transform 0.3s;backface-visibility:hidden}.hover-grow:hover{transform:scale(1.025)}.border{border:1px #e1e4e8 solid !important}.border-y{border-top:1px #e1e4e8 solid !important;border-bottom:1px #e1e4e8 solid !important}.border-0{border:0 !important}.border-dashed{border-style:dashed !important}.border-blue{border-color:#0366d6 !important}.border-blue-light{border-color:#c8e1ff !important}.border-green{border-color:#34d058 !important}.border-green-light{border-color:#a2cbac !important}.border-red{border-color:#d73a49 !important}.border-red-light{border-color:#cea0a5 !important}.border-purple{border-color:#6f42c1 !important}.border-yellow{border-color:#d9d0a5 !important}.border-gray-light{border-color:#eaecef !important}.border-gray-dark{border-color:#d1d5da !important}.border-black-fade{border-color:rgba(27,31,35,0.15) !important}.border-top{border-top:1px #e1e4e8 solid !important}.border-right{border-right:1px #e1e4e8 solid !important}.border-bottom{border-bottom:1px #e1e4e8 solid !important}.border-left{border-left:1px #e1e4e8 solid !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.rounded-0{border-radius:0 !important}.rounded-1{border-radius:3px !important}.rounded-2{border-radius:6px !important}.rounded-top-0{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-top-1{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.rounded-top-2{border-top-left-radius:6px !important;border-top-right-radius:6px !important}.rounded-right-0{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-right-1{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important}.rounded-right-2{border-top-right-radius:6px !important;border-bottom-right-radius:6px !important}.rounded-bottom-0{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.rounded-bottom-1{border-bottom-right-radius:3px !important;border-bottom-left-radius:3px !important}.rounded-bottom-2{border-bottom-right-radius:6px !important;border-bottom-left-radius:6px !important}.rounded-left-0{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-left-1{border-bottom-left-radius:3px !important;border-top-left-radius:3px !important}.rounded-left-2{border-bottom-left-radius:6px !important;border-top-left-radius:6px !important}@media (min-width: 544px){.border-sm-top{border-top:1px #e1e4e8 solid !important}.border-sm-right{border-right:1px #e1e4e8 solid !important}.border-sm-bottom{border-bottom:1px #e1e4e8 solid !important}.border-sm-left{border-left:1px #e1e4e8 solid !important}.border-sm-top-0{border-top:0 !important}.border-sm-right-0{border-right:0 !important}.border-sm-bottom-0{border-bottom:0 !important}.border-sm-left-0{border-left:0 !important}.rounded-sm-0{border-radius:0 !important}.rounded-sm-1{border-radius:3px !important}.rounded-sm-2{border-radius:6px !important}.rounded-sm-top-0{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-sm-top-1{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.rounded-sm-top-2{border-top-left-radius:6px !important;border-top-right-radius:6px !important}.rounded-sm-right-0{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-sm-right-1{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important}.rounded-sm-right-2{border-top-right-radius:6px !important;border-bottom-right-radius:6px !important}.rounded-sm-bottom-0{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.rounded-sm-bottom-1{border-bottom-right-radius:3px !important;border-bottom-left-radius:3px !important}.rounded-sm-bottom-2{border-bottom-right-radius:6px !important;border-bottom-left-radius:6px !important}.rounded-sm-left-0{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-sm-left-1{border-bottom-left-radius:3px !important;border-top-left-radius:3px !important}.rounded-sm-left-2{border-bottom-left-radius:6px !important;border-top-left-radius:6px !important}}@media (min-width: 768px){.border-md-top{border-top:1px #e1e4e8 solid !important}.border-md-right{border-right:1px #e1e4e8 solid !important}.border-md-bottom{border-bottom:1px #e1e4e8 solid !important}.border-md-left{border-left:1px #e1e4e8 solid !important}.border-md-top-0{border-top:0 !important}.border-md-right-0{border-right:0 !important}.border-md-bottom-0{border-bottom:0 !important}.border-md-left-0{border-left:0 !important}.rounded-md-0{border-radius:0 !important}.rounded-md-1{border-radius:3px !important}.rounded-md-2{border-radius:6px !important}.rounded-md-top-0{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-md-top-1{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.rounded-md-top-2{border-top-left-radius:6px !important;border-top-right-radius:6px !important}.rounded-md-right-0{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-md-right-1{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important}.rounded-md-right-2{border-top-right-radius:6px !important;border-bottom-right-radius:6px !important}.rounded-md-bottom-0{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.rounded-md-bottom-1{border-bottom-right-radius:3px !important;border-bottom-left-radius:3px !important}.rounded-md-bottom-2{border-bottom-right-radius:6px !important;border-bottom-left-radius:6px !important}.rounded-md-left-0{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-md-left-1{border-bottom-left-radius:3px !important;border-top-left-radius:3px !important}.rounded-md-left-2{border-bottom-left-radius:6px !important;border-top-left-radius:6px !important}}@media (min-width: 1012px){.border-lg-top{border-top:1px #e1e4e8 solid !important}.border-lg-right{border-right:1px #e1e4e8 solid !important}.border-lg-bottom{border-bottom:1px #e1e4e8 solid !important}.border-lg-left{border-left:1px #e1e4e8 solid !important}.border-lg-top-0{border-top:0 !important}.border-lg-right-0{border-right:0 !important}.border-lg-bottom-0{border-bottom:0 !important}.border-lg-left-0{border-left:0 !important}.rounded-lg-0{border-radius:0 !important}.rounded-lg-1{border-radius:3px !important}.rounded-lg-2{border-radius:6px !important}.rounded-lg-top-0{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-lg-top-1{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.rounded-lg-top-2{border-top-left-radius:6px !important;border-top-right-radius:6px !important}.rounded-lg-right-0{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-lg-right-1{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important}.rounded-lg-right-2{border-top-right-radius:6px !important;border-bottom-right-radius:6px !important}.rounded-lg-bottom-0{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.rounded-lg-bottom-1{border-bottom-right-radius:3px !important;border-bottom-left-radius:3px !important}.rounded-lg-bottom-2{border-bottom-right-radius:6px !important;border-bottom-left-radius:6px !important}.rounded-lg-left-0{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-lg-left-1{border-bottom-left-radius:3px !important;border-top-left-radius:3px !important}.rounded-lg-left-2{border-bottom-left-radius:6px !important;border-top-left-radius:6px !important}}@media (min-width: 1280px){.border-xl-top{border-top:1px #e1e4e8 solid !important}.border-xl-right{border-right:1px #e1e4e8 solid !important}.border-xl-bottom{border-bottom:1px #e1e4e8 solid !important}.border-xl-left{border-left:1px #e1e4e8 solid !important}.border-xl-top-0{border-top:0 !important}.border-xl-right-0{border-right:0 !important}.border-xl-bottom-0{border-bottom:0 !important}.border-xl-left-0{border-left:0 !important}.rounded-xl-0{border-radius:0 !important}.rounded-xl-1{border-radius:3px !important}.rounded-xl-2{border-radius:6px !important}.rounded-xl-top-0{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-xl-top-1{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.rounded-xl-top-2{border-top-left-radius:6px !important;border-top-right-radius:6px !important}.rounded-xl-right-0{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-xl-right-1{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important}.rounded-xl-right-2{border-top-right-radius:6px !important;border-bottom-right-radius:6px !important}.rounded-xl-bottom-0{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.rounded-xl-bottom-1{border-bottom-right-radius:3px !important;border-bottom-left-radius:3px !important}.rounded-xl-bottom-2{border-bottom-right-radius:6px !important;border-bottom-left-radius:6px !important}.rounded-xl-left-0{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-xl-left-1{border-bottom-left-radius:3px !important;border-top-left-radius:3px !important}.rounded-xl-left-2{border-bottom-left-radius:6px !important;border-top-left-radius:6px !important}}.circle{border-radius:50% !important}.box-shadow{box-shadow:0 1px 1px rgba(27,31,35,0.1) !important}.box-shadow-medium{box-shadow:0 1px 5px rgba(27,31,35,0.15) !important}.box-shadow-large{box-shadow:0 1px 15px rgba(27,31,35,0.15) !important}.box-shadow-extra-large{box-shadow:0 10px 50px rgba(27,31,35,0.07) !important}.box-shadow-none{box-shadow:none !important}.bg-white{background-color:#fff !important}.bg-blue{background-color:#0366d6 !important}.bg-blue-light{background-color:#f1f8ff !important}.bg-gray-dark{background-color:#24292e !important}.bg-gray{background-color:#f6f8fa !important}.bg-gray-light{background-color:#fafbfc !important}.bg-green{background-color:#28a745 !important}.bg-green-light{background-color:#dcffe4 !important}.bg-red{background-color:#d73a49 !important}.bg-red-light{background-color:#ffdce0 !important}.bg-yellow{background-color:#ffd33d !important}.bg-yellow-light{background-color:#fff5b1 !important}.bg-purple{background-color:#6f42c1 !important}.bg-purple-light{background-color:#f5f0ff !important}.bg-shade-gradient{background-image:linear-gradient(180deg, rgba(27,31,35,0.065), rgba(27,31,35,0)) !important;background-repeat:no-repeat !important;background-size:100% 200px !important}.text-blue{color:#0366d6 !important}.text-red{color:#cb2431 !important}.text-gray-light{color:#6a737d !important}.text-gray{color:#586069 !important}.text-gray-dark{color:#24292e !important}.text-green{color:#28a745 !important}.text-orange{color:#a04100 !important}.text-orange-light{color:#e36209 !important}.text-purple{color:#6f42c1 !important}.text-white{color:#fff !important}.text-inherit{color:inherit !important}.text-pending{color:#b08800 !important}.bg-pending{color:#dbab09 !important}.link-gray{color:#586069 !important}.link-gray:hover{color:#0366d6 !important}.link-gray-dark{color:#24292e !important}.link-gray-dark:hover{color:#0366d6 !important}.link-hover-blue:hover{color:#0366d6 !important}.muted-link{color:#586069 !important}.muted-link:hover{color:#0366d6 !important;text-decoration:none}.details-overlay[open]>summary::before{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;display:block;cursor:default;content:" ";background:transparent}.details-overlay-dark[open]>summary::before{z-index:99;background:rgba(27,31,35,0.5)}.flex-row{flex-direction:row !important}.flex-row-reverse{flex-direction:row-reverse !important}.flex-column{flex-direction:column !important}.flex-wrap{flex-wrap:wrap !important}.flex-nowrap{flex-wrap:nowrap !important}.flex-justify-start{justify-content:flex-start !important}.flex-justify-end{justify-content:flex-end !important}.flex-justify-center{justify-content:center !important}.flex-justify-between{justify-content:space-between !important}.flex-justify-around{justify-content:space-around !important}.flex-items-start{align-items:flex-start !important}.flex-items-end{align-items:flex-end !important}.flex-items-center{align-items:center !important}.flex-items-baseline{align-items:baseline !important}.flex-items-stretch{align-items:stretch !important}.flex-content-start{align-content:flex-start !important}.flex-content-end{align-content:flex-end !important}.flex-content-center{align-content:center !important}.flex-content-between{align-content:space-between !important}.flex-content-around{align-content:space-around !important}.flex-content-stretch{align-content:stretch !important}.flex-auto{flex:1 1 auto !important}.flex-shrink-0{flex-shrink:0 !important}.flex-self-auto{align-self:auto !important}.flex-self-start{align-self:flex-start !important}.flex-self-end{align-self:flex-end !important}.flex-self-center{align-self:center !important}.flex-self-baseline{align-self:baseline !important}.flex-self-stretch{align-self:stretch !important}.flex-item-equal{flex-grow:1;flex-basis:0}@media (min-width: 544px){.flex-sm-row{flex-direction:row !important}.flex-sm-row-reverse{flex-direction:row-reverse !important}.flex-sm-column{flex-direction:column !important}.flex-sm-wrap{flex-wrap:wrap !important}.flex-sm-nowrap{flex-wrap:nowrap !important}.flex-sm-justify-start{justify-content:flex-start !important}.flex-sm-justify-end{justify-content:flex-end !important}.flex-sm-justify-center{justify-content:center !important}.flex-sm-justify-between{justify-content:space-between !important}.flex-sm-justify-around{justify-content:space-around !important}.flex-sm-items-start{align-items:flex-start !important}.flex-sm-items-end{align-items:flex-end !important}.flex-sm-items-center{align-items:center !important}.flex-sm-items-baseline{align-items:baseline !important}.flex-sm-items-stretch{align-items:stretch !important}.flex-sm-content-start{align-content:flex-start !important}.flex-sm-content-end{align-content:flex-end !important}.flex-sm-content-center{align-content:center !important}.flex-sm-content-between{align-content:space-between !important}.flex-sm-content-around{align-content:space-around !important}.flex-sm-content-stretch{align-content:stretch !important}.flex-sm-auto{flex:1 1 auto !important}.flex-sm-shrink-0{flex-shrink:0 !important}.flex-sm-self-auto{align-self:auto !important}.flex-sm-self-start{align-self:flex-start !important}.flex-sm-self-end{align-self:flex-end !important}.flex-sm-self-center{align-self:center !important}.flex-sm-self-baseline{align-self:baseline !important}.flex-sm-self-stretch{align-self:stretch !important}.flex-sm-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 768px){.flex-md-row{flex-direction:row !important}.flex-md-row-reverse{flex-direction:row-reverse !important}.flex-md-column{flex-direction:column !important}.flex-md-wrap{flex-wrap:wrap !important}.flex-md-nowrap{flex-wrap:nowrap !important}.flex-md-justify-start{justify-content:flex-start !important}.flex-md-justify-end{justify-content:flex-end !important}.flex-md-justify-center{justify-content:center !important}.flex-md-justify-between{justify-content:space-between !important}.flex-md-justify-around{justify-content:space-around !important}.flex-md-items-start{align-items:flex-start !important}.flex-md-items-end{align-items:flex-end !important}.flex-md-items-center{align-items:center !important}.flex-md-items-baseline{align-items:baseline !important}.flex-md-items-stretch{align-items:stretch !important}.flex-md-content-start{align-content:flex-start !important}.flex-md-content-end{align-content:flex-end !important}.flex-md-content-center{align-content:center !important}.flex-md-content-between{align-content:space-between !important}.flex-md-content-around{align-content:space-around !important}.flex-md-content-stretch{align-content:stretch !important}.flex-md-auto{flex:1 1 auto !important}.flex-md-shrink-0{flex-shrink:0 !important}.flex-md-self-auto{align-self:auto !important}.flex-md-self-start{align-self:flex-start !important}.flex-md-self-end{align-self:flex-end !important}.flex-md-self-center{align-self:center !important}.flex-md-self-baseline{align-self:baseline !important}.flex-md-self-stretch{align-self:stretch !important}.flex-md-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 1012px){.flex-lg-row{flex-direction:row !important}.flex-lg-row-reverse{flex-direction:row-reverse !important}.flex-lg-column{flex-direction:column !important}.flex-lg-wrap{flex-wrap:wrap !important}.flex-lg-nowrap{flex-wrap:nowrap !important}.flex-lg-justify-start{justify-content:flex-start !important}.flex-lg-justify-end{justify-content:flex-end !important}.flex-lg-justify-center{justify-content:center !important}.flex-lg-justify-between{justify-content:space-between !important}.flex-lg-justify-around{justify-content:space-around !important}.flex-lg-items-start{align-items:flex-start !important}.flex-lg-items-end{align-items:flex-end !important}.flex-lg-items-center{align-items:center !important}.flex-lg-items-baseline{align-items:baseline !important}.flex-lg-items-stretch{align-items:stretch !important}.flex-lg-content-start{align-content:flex-start !important}.flex-lg-content-end{align-content:flex-end !important}.flex-lg-content-center{align-content:center !important}.flex-lg-content-between{align-content:space-between !important}.flex-lg-content-around{align-content:space-around !important}.flex-lg-content-stretch{align-content:stretch !important}.flex-lg-auto{flex:1 1 auto !important}.flex-lg-shrink-0{flex-shrink:0 !important}.flex-lg-self-auto{align-self:auto !important}.flex-lg-self-start{align-self:flex-start !important}.flex-lg-self-end{align-self:flex-end !important}.flex-lg-self-center{align-self:center !important}.flex-lg-self-baseline{align-self:baseline !important}.flex-lg-self-stretch{align-self:stretch !important}.flex-lg-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 1280px){.flex-xl-row{flex-direction:row !important}.flex-xl-row-reverse{flex-direction:row-reverse !important}.flex-xl-column{flex-direction:column !important}.flex-xl-wrap{flex-wrap:wrap !important}.flex-xl-nowrap{flex-wrap:nowrap !important}.flex-xl-justify-start{justify-content:flex-start !important}.flex-xl-justify-end{justify-content:flex-end !important}.flex-xl-justify-center{justify-content:center !important}.flex-xl-justify-between{justify-content:space-between !important}.flex-xl-justify-around{justify-content:space-around !important}.flex-xl-items-start{align-items:flex-start !important}.flex-xl-items-end{align-items:flex-end !important}.flex-xl-items-center{align-items:center !important}.flex-xl-items-baseline{align-items:baseline !important}.flex-xl-items-stretch{align-items:stretch !important}.flex-xl-content-start{align-content:flex-start !important}.flex-xl-content-end{align-content:flex-end !important}.flex-xl-content-center{align-content:center !important}.flex-xl-content-between{align-content:space-between !important}.flex-xl-content-around{align-content:space-around !important}.flex-xl-content-stretch{align-content:stretch !important}.flex-xl-auto{flex:1 1 auto !important}.flex-xl-shrink-0{flex-shrink:0 !important}.flex-xl-self-auto{align-self:auto !important}.flex-xl-self-start{align-self:flex-start !important}.flex-xl-self-end{align-self:flex-end !important}.flex-xl-self-center{align-self:center !important}.flex-xl-self-baseline{align-self:baseline !important}.flex-xl-self-stretch{align-self:stretch !important}.flex-xl-item-equal{flex-grow:1;flex-basis:0}}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.top-0{top:0 !important}.right-0{right:0 !important}.bottom-0{bottom:0 !important}.left-0{left:0 !important}.v-align-middle{vertical-align:middle !important}.v-align-top{vertical-align:top !important}.v-align-bottom{vertical-align:bottom !important}.v-align-text-top{vertical-align:text-top !important}.v-align-text-bottom{vertical-align:text-bottom !important}.v-align-baseline{vertical-align:baseline !important}.overflow-hidden{overflow:hidden !important}.overflow-scroll{overflow:scroll !important}.overflow-auto{overflow:auto !important}.clearfix::before{display:table;content:""}.clearfix::after{display:table;clear:both;content:""}.float-left{float:left !important}.float-right{float:right !important}.float-none{float:none !important}@media (min-width: 544px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media (min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media (min-width: 1012px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}@media (min-width: 1280px){.float-xl-left{float:left !important}.float-xl-right{float:right !important}.float-xl-none{float:none !important}}.width-fit{max-width:100% !important}.width-full{width:100% !important}.height-fit{max-height:100% !important}.height-full{height:100% !important}.min-width-0{min-width:0 !important}.direction-rtl{direction:rtl !important}.direction-ltr{direction:ltr !important}@media (min-width: 544px){.direction-sm-rtl{direction:rtl !important}.direction-sm-ltr{direction:ltr !important}}@media (min-width: 768px){.direction-md-rtl{direction:rtl !important}.direction-md-ltr{direction:ltr !important}}@media (min-width: 1012px){.direction-lg-rtl{direction:rtl !important}.direction-lg-ltr{direction:ltr !important}}@media (min-width: 1280px){.direction-xl-rtl{direction:rtl !important}.direction-xl-ltr{direction:ltr !important}}.m-0{margin:0 !important}.mt-0{margin-top:0 !important}.mr-0{margin-right:0 !important}.mb-0{margin-bottom:0 !important}.ml-0{margin-left:0 !important}.mx-0{margin-right:0 !important;margin-left:0 !important}.my-0{margin-top:0 !important;margin-bottom:0 !important}.m-1{margin:4px !important}.mt-1{margin-top:4px !important}.mr-1{margin-right:4px !important}.mb-1{margin-bottom:4px !important}.ml-1{margin-left:4px !important}.mt-n1{margin-top:-4px !important}.mr-n1{margin-right:-4px !important}.mb-n1{margin-bottom:-4px !important}.ml-n1{margin-left:-4px !important}.mx-1{margin-right:4px !important;margin-left:4px !important}.my-1{margin-top:4px !important;margin-bottom:4px !important}.m-2{margin:8px !important}.mt-2{margin-top:8px !important}.mr-2{margin-right:8px !important}.mb-2{margin-bottom:8px !important}.ml-2{margin-left:8px !important}.mt-n2{margin-top:-8px !important}.mr-n2{margin-right:-8px !important}.mb-n2{margin-bottom:-8px !important}.ml-n2{margin-left:-8px !important}.mx-2{margin-right:8px !important;margin-left:8px !important}.my-2{margin-top:8px !important;margin-bottom:8px !important}.m-3{margin:16px !important}.mt-3{margin-top:16px !important}.mr-3{margin-right:16px !important}.mb-3{margin-bottom:16px !important}.ml-3{margin-left:16px !important}.mt-n3{margin-top:-16px !important}.mr-n3{margin-right:-16px !important}.mb-n3{margin-bottom:-16px !important}.ml-n3{margin-left:-16px !important}.mx-3{margin-right:16px !important;margin-left:16px !important}.my-3{margin-top:16px !important;margin-bottom:16px !important}.m-4{margin:24px !important}.mt-4{margin-top:24px !important}.mr-4{margin-right:24px !important}.mb-4{margin-bottom:24px !important}.ml-4{margin-left:24px !important}.mt-n4{margin-top:-24px !important}.mr-n4{margin-right:-24px !important}.mb-n4{margin-bottom:-24px !important}.ml-n4{margin-left:-24px !important}.mx-4{margin-right:24px !important;margin-left:24px !important}.my-4{margin-top:24px !important;margin-bottom:24px !important}.m-5{margin:32px !important}.mt-5{margin-top:32px !important}.mr-5{margin-right:32px !important}.mb-5{margin-bottom:32px !important}.ml-5{margin-left:32px !important}.mt-n5{margin-top:-32px !important}.mr-n5{margin-right:-32px !important}.mb-n5{margin-bottom:-32px !important}.ml-n5{margin-left:-32px !important}.mx-5{margin-right:32px !important;margin-left:32px !important}.my-5{margin-top:32px !important;margin-bottom:32px !important}.m-6{margin:40px !important}.mt-6{margin-top:40px !important}.mr-6{margin-right:40px !important}.mb-6{margin-bottom:40px !important}.ml-6{margin-left:40px !important}.mt-n6{margin-top:-40px !important}.mr-n6{margin-right:-40px !important}.mb-n6{margin-bottom:-40px !important}.ml-n6{margin-left:-40px !important}.mx-6{margin-right:40px !important;margin-left:40px !important}.my-6{margin-top:40px !important;margin-bottom:40px !important}.mx-auto{margin-right:auto !important;margin-left:auto !important}@media (min-width: 544px){.m-sm-0{margin:0 !important}.mt-sm-0{margin-top:0 !important}.mr-sm-0{margin-right:0 !important}.mb-sm-0{margin-bottom:0 !important}.ml-sm-0{margin-left:0 !important}.mx-sm-0{margin-right:0 !important;margin-left:0 !important}.my-sm-0{margin-top:0 !important;margin-bottom:0 !important}.m-sm-1{margin:4px !important}.mt-sm-1{margin-top:4px !important}.mr-sm-1{margin-right:4px !important}.mb-sm-1{margin-bottom:4px !important}.ml-sm-1{margin-left:4px !important}.mt-sm-n1{margin-top:-4px !important}.mr-sm-n1{margin-right:-4px !important}.mb-sm-n1{margin-bottom:-4px !important}.ml-sm-n1{margin-left:-4px !important}.mx-sm-1{margin-right:4px !important;margin-left:4px !important}.my-sm-1{margin-top:4px !important;margin-bottom:4px !important}.m-sm-2{margin:8px !important}.mt-sm-2{margin-top:8px !important}.mr-sm-2{margin-right:8px !important}.mb-sm-2{margin-bottom:8px !important}.ml-sm-2{margin-left:8px !important}.mt-sm-n2{margin-top:-8px !important}.mr-sm-n2{margin-right:-8px !important}.mb-sm-n2{margin-bottom:-8px !important}.ml-sm-n2{margin-left:-8px !important}.mx-sm-2{margin-right:8px !important;margin-left:8px !important}.my-sm-2{margin-top:8px !important;margin-bottom:8px !important}.m-sm-3{margin:16px !important}.mt-sm-3{margin-top:16px !important}.mr-sm-3{margin-right:16px !important}.mb-sm-3{margin-bottom:16px !important}.ml-sm-3{margin-left:16px !important}.mt-sm-n3{margin-top:-16px !important}.mr-sm-n3{margin-right:-16px !important}.mb-sm-n3{margin-bottom:-16px !important}.ml-sm-n3{margin-left:-16px !important}.mx-sm-3{margin-right:16px !important;margin-left:16px !important}.my-sm-3{margin-top:16px !important;margin-bottom:16px !important}.m-sm-4{margin:24px !important}.mt-sm-4{margin-top:24px !important}.mr-sm-4{margin-right:24px !important}.mb-sm-4{margin-bottom:24px !important}.ml-sm-4{margin-left:24px !important}.mt-sm-n4{margin-top:-24px !important}.mr-sm-n4{margin-right:-24px !important}.mb-sm-n4{margin-bottom:-24px !important}.ml-sm-n4{margin-left:-24px !important}.mx-sm-4{margin-right:24px !important;margin-left:24px !important}.my-sm-4{margin-top:24px !important;margin-bottom:24px !important}.m-sm-5{margin:32px !important}.mt-sm-5{margin-top:32px !important}.mr-sm-5{margin-right:32px !important}.mb-sm-5{margin-bottom:32px !important}.ml-sm-5{margin-left:32px !important}.mt-sm-n5{margin-top:-32px !important}.mr-sm-n5{margin-right:-32px !important}.mb-sm-n5{margin-bottom:-32px !important}.ml-sm-n5{margin-left:-32px !important}.mx-sm-5{margin-right:32px !important;margin-left:32px !important}.my-sm-5{margin-top:32px !important;margin-bottom:32px !important}.m-sm-6{margin:40px !important}.mt-sm-6{margin-top:40px !important}.mr-sm-6{margin-right:40px !important}.mb-sm-6{margin-bottom:40px !important}.ml-sm-6{margin-left:40px !important}.mt-sm-n6{margin-top:-40px !important}.mr-sm-n6{margin-right:-40px !important}.mb-sm-n6{margin-bottom:-40px !important}.ml-sm-n6{margin-left:-40px !important}.mx-sm-6{margin-right:40px !important;margin-left:40px !important}.my-sm-6{margin-top:40px !important;margin-bottom:40px !important}.mx-sm-auto{margin-right:auto !important;margin-left:auto !important}}@media (min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0{margin-top:0 !important}.mr-md-0{margin-right:0 !important}.mb-md-0{margin-bottom:0 !important}.ml-md-0{margin-left:0 !important}.mx-md-0{margin-right:0 !important;margin-left:0 !important}.my-md-0{margin-top:0 !important;margin-bottom:0 !important}.m-md-1{margin:4px !important}.mt-md-1{margin-top:4px !important}.mr-md-1{margin-right:4px !important}.mb-md-1{margin-bottom:4px !important}.ml-md-1{margin-left:4px !important}.mt-md-n1{margin-top:-4px !important}.mr-md-n1{margin-right:-4px !important}.mb-md-n1{margin-bottom:-4px !important}.ml-md-n1{margin-left:-4px !important}.mx-md-1{margin-right:4px !important;margin-left:4px !important}.my-md-1{margin-top:4px !important;margin-bottom:4px !important}.m-md-2{margin:8px !important}.mt-md-2{margin-top:8px !important}.mr-md-2{margin-right:8px !important}.mb-md-2{margin-bottom:8px !important}.ml-md-2{margin-left:8px !important}.mt-md-n2{margin-top:-8px !important}.mr-md-n2{margin-right:-8px !important}.mb-md-n2{margin-bottom:-8px !important}.ml-md-n2{margin-left:-8px !important}.mx-md-2{margin-right:8px !important;margin-left:8px !important}.my-md-2{margin-top:8px !important;margin-bottom:8px !important}.m-md-3{margin:16px !important}.mt-md-3{margin-top:16px !important}.mr-md-3{margin-right:16px !important}.mb-md-3{margin-bottom:16px !important}.ml-md-3{margin-left:16px !important}.mt-md-n3{margin-top:-16px !important}.mr-md-n3{margin-right:-16px !important}.mb-md-n3{margin-bottom:-16px !important}.ml-md-n3{margin-left:-16px !important}.mx-md-3{margin-right:16px !important;margin-left:16px !important}.my-md-3{margin-top:16px !important;margin-bottom:16px !important}.m-md-4{margin:24px !important}.mt-md-4{margin-top:24px !important}.mr-md-4{margin-right:24px !important}.mb-md-4{margin-bottom:24px !important}.ml-md-4{margin-left:24px !important}.mt-md-n4{margin-top:-24px !important}.mr-md-n4{margin-right:-24px !important}.mb-md-n4{margin-bottom:-24px !important}.ml-md-n4{margin-left:-24px !important}.mx-md-4{margin-right:24px !important;margin-left:24px !important}.my-md-4{margin-top:24px !important;margin-bottom:24px !important}.m-md-5{margin:32px !important}.mt-md-5{margin-top:32px !important}.mr-md-5{margin-right:32px !important}.mb-md-5{margin-bottom:32px !important}.ml-md-5{margin-left:32px !important}.mt-md-n5{margin-top:-32px !important}.mr-md-n5{margin-right:-32px !important}.mb-md-n5{margin-bottom:-32px !important}.ml-md-n5{margin-left:-32px !important}.mx-md-5{margin-right:32px !important;margin-left:32px !important}.my-md-5{margin-top:32px !important;margin-bottom:32px !important}.m-md-6{margin:40px !important}.mt-md-6{margin-top:40px !important}.mr-md-6{margin-right:40px !important}.mb-md-6{margin-bottom:40px !important}.ml-md-6{margin-left:40px !important}.mt-md-n6{margin-top:-40px !important}.mr-md-n6{margin-right:-40px !important}.mb-md-n6{margin-bottom:-40px !important}.ml-md-n6{margin-left:-40px !important}.mx-md-6{margin-right:40px !important;margin-left:40px !important}.my-md-6{margin-top:40px !important;margin-bottom:40px !important}.mx-md-auto{margin-right:auto !important;margin-left:auto !important}}@media (min-width: 1012px){.m-lg-0{margin:0 !important}.mt-lg-0{margin-top:0 !important}.mr-lg-0{margin-right:0 !important}.mb-lg-0{margin-bottom:0 !important}.ml-lg-0{margin-left:0 !important}.mx-lg-0{margin-right:0 !important;margin-left:0 !important}.my-lg-0{margin-top:0 !important;margin-bottom:0 !important}.m-lg-1{margin:4px !important}.mt-lg-1{margin-top:4px !important}.mr-lg-1{margin-right:4px !important}.mb-lg-1{margin-bottom:4px !important}.ml-lg-1{margin-left:4px !important}.mt-lg-n1{margin-top:-4px !important}.mr-lg-n1{margin-right:-4px !important}.mb-lg-n1{margin-bottom:-4px !important}.ml-lg-n1{margin-left:-4px !important}.mx-lg-1{margin-right:4px !important;margin-left:4px !important}.my-lg-1{margin-top:4px !important;margin-bottom:4px !important}.m-lg-2{margin:8px !important}.mt-lg-2{margin-top:8px !important}.mr-lg-2{margin-right:8px !important}.mb-lg-2{margin-bottom:8px !important}.ml-lg-2{margin-left:8px !important}.mt-lg-n2{margin-top:-8px !important}.mr-lg-n2{margin-right:-8px !important}.mb-lg-n2{margin-bottom:-8px !important}.ml-lg-n2{margin-left:-8px !important}.mx-lg-2{margin-right:8px !important;margin-left:8px !important}.my-lg-2{margin-top:8px !important;margin-bottom:8px !important}.m-lg-3{margin:16px !important}.mt-lg-3{margin-top:16px !important}.mr-lg-3{margin-right:16px !important}.mb-lg-3{margin-bottom:16px !important}.ml-lg-3{margin-left:16px !important}.mt-lg-n3{margin-top:-16px !important}.mr-lg-n3{margin-right:-16px !important}.mb-lg-n3{margin-bottom:-16px !important}.ml-lg-n3{margin-left:-16px !important}.mx-lg-3{margin-right:16px !important;margin-left:16px !important}.my-lg-3{margin-top:16px !important;margin-bottom:16px !important}.m-lg-4{margin:24px !important}.mt-lg-4{margin-top:24px !important}.mr-lg-4{margin-right:24px !important}.mb-lg-4{margin-bottom:24px !important}.ml-lg-4{margin-left:24px !important}.mt-lg-n4{margin-top:-24px !important}.mr-lg-n4{margin-right:-24px !important}.mb-lg-n4{margin-bottom:-24px !important}.ml-lg-n4{margin-left:-24px !important}.mx-lg-4{margin-right:24px !important;margin-left:24px !important}.my-lg-4{margin-top:24px !important;margin-bottom:24px !important}.m-lg-5{margin:32px !important}.mt-lg-5{margin-top:32px !important}.mr-lg-5{margin-right:32px !important}.mb-lg-5{margin-bottom:32px !important}.ml-lg-5{margin-left:32px !important}.mt-lg-n5{margin-top:-32px !important}.mr-lg-n5{margin-right:-32px !important}.mb-lg-n5{margin-bottom:-32px !important}.ml-lg-n5{margin-left:-32px !important}.mx-lg-5{margin-right:32px !important;margin-left:32px !important}.my-lg-5{margin-top:32px !important;margin-bottom:32px !important}.m-lg-6{margin:40px !important}.mt-lg-6{margin-top:40px !important}.mr-lg-6{margin-right:40px !important}.mb-lg-6{margin-bottom:40px !important}.ml-lg-6{margin-left:40px !important}.mt-lg-n6{margin-top:-40px !important}.mr-lg-n6{margin-right:-40px !important}.mb-lg-n6{margin-bottom:-40px !important}.ml-lg-n6{margin-left:-40px !important}.mx-lg-6{margin-right:40px !important;margin-left:40px !important}.my-lg-6{margin-top:40px !important;margin-bottom:40px !important}.mx-lg-auto{margin-right:auto !important;margin-left:auto !important}}@media (min-width: 1280px){.m-xl-0{margin:0 !important}.mt-xl-0{margin-top:0 !important}.mr-xl-0{margin-right:0 !important}.mb-xl-0{margin-bottom:0 !important}.ml-xl-0{margin-left:0 !important}.mx-xl-0{margin-right:0 !important;margin-left:0 !important}.my-xl-0{margin-top:0 !important;margin-bottom:0 !important}.m-xl-1{margin:4px !important}.mt-xl-1{margin-top:4px !important}.mr-xl-1{margin-right:4px !important}.mb-xl-1{margin-bottom:4px !important}.ml-xl-1{margin-left:4px !important}.mt-xl-n1{margin-top:-4px !important}.mr-xl-n1{margin-right:-4px !important}.mb-xl-n1{margin-bottom:-4px !important}.ml-xl-n1{margin-left:-4px !important}.mx-xl-1{margin-right:4px !important;margin-left:4px !important}.my-xl-1{margin-top:4px !important;margin-bottom:4px !important}.m-xl-2{margin:8px !important}.mt-xl-2{margin-top:8px !important}.mr-xl-2{margin-right:8px !important}.mb-xl-2{margin-bottom:8px !important}.ml-xl-2{margin-left:8px !important}.mt-xl-n2{margin-top:-8px !important}.mr-xl-n2{margin-right:-8px !important}.mb-xl-n2{margin-bottom:-8px !important}.ml-xl-n2{margin-left:-8px !important}.mx-xl-2{margin-right:8px !important;margin-left:8px !important}.my-xl-2{margin-top:8px !important;margin-bottom:8px !important}.m-xl-3{margin:16px !important}.mt-xl-3{margin-top:16px !important}.mr-xl-3{margin-right:16px !important}.mb-xl-3{margin-bottom:16px !important}.ml-xl-3{margin-left:16px !important}.mt-xl-n3{margin-top:-16px !important}.mr-xl-n3{margin-right:-16px !important}.mb-xl-n3{margin-bottom:-16px !important}.ml-xl-n3{margin-left:-16px !important}.mx-xl-3{margin-right:16px !important;margin-left:16px !important}.my-xl-3{margin-top:16px !important;margin-bottom:16px !important}.m-xl-4{margin:24px !important}.mt-xl-4{margin-top:24px !important}.mr-xl-4{margin-right:24px !important}.mb-xl-4{margin-bottom:24px !important}.ml-xl-4{margin-left:24px !important}.mt-xl-n4{margin-top:-24px !important}.mr-xl-n4{margin-right:-24px !important}.mb-xl-n4{margin-bottom:-24px !important}.ml-xl-n4{margin-left:-24px !important}.mx-xl-4{margin-right:24px !important;margin-left:24px !important}.my-xl-4{margin-top:24px !important;margin-bottom:24px !important}.m-xl-5{margin:32px !important}.mt-xl-5{margin-top:32px !important}.mr-xl-5{margin-right:32px !important}.mb-xl-5{margin-bottom:32px !important}.ml-xl-5{margin-left:32px !important}.mt-xl-n5{margin-top:-32px !important}.mr-xl-n5{margin-right:-32px !important}.mb-xl-n5{margin-bottom:-32px !important}.ml-xl-n5{margin-left:-32px !important}.mx-xl-5{margin-right:32px !important;margin-left:32px !important}.my-xl-5{margin-top:32px !important;margin-bottom:32px !important}.m-xl-6{margin:40px !important}.mt-xl-6{margin-top:40px !important}.mr-xl-6{margin-right:40px !important}.mb-xl-6{margin-bottom:40px !important}.ml-xl-6{margin-left:40px !important}.mt-xl-n6{margin-top:-40px !important}.mr-xl-n6{margin-right:-40px !important}.mb-xl-n6{margin-bottom:-40px !important}.ml-xl-n6{margin-left:-40px !important}.mx-xl-6{margin-right:40px !important;margin-left:40px !important}.my-xl-6{margin-top:40px !important;margin-bottom:40px !important}.mx-xl-auto{margin-right:auto !important;margin-left:auto !important}}.p-0{padding:0 !important}.pt-0{padding-top:0 !important}.pr-0{padding-right:0 !important}.pb-0{padding-bottom:0 !important}.pl-0{padding-left:0 !important}.px-0{padding-right:0 !important;padding-left:0 !important}.py-0{padding-top:0 !important;padding-bottom:0 !important}.p-1{padding:4px !important}.pt-1{padding-top:4px !important}.pr-1{padding-right:4px !important}.pb-1{padding-bottom:4px !important}.pl-1{padding-left:4px !important}.px-1{padding-right:4px !important;padding-left:4px !important}.py-1{padding-top:4px !important;padding-bottom:4px !important}.p-2{padding:8px !important}.pt-2{padding-top:8px !important}.pr-2{padding-right:8px !important}.pb-2{padding-bottom:8px !important}.pl-2{padding-left:8px !important}.px-2{padding-right:8px !important;padding-left:8px !important}.py-2{padding-top:8px !important;padding-bottom:8px !important}.p-3{padding:16px !important}.pt-3{padding-top:16px !important}.pr-3{padding-right:16px !important}.pb-3{padding-bottom:16px !important}.pl-3{padding-left:16px !important}.px-3{padding-right:16px !important;padding-left:16px !important}.py-3{padding-top:16px !important;padding-bottom:16px !important}.p-4{padding:24px !important}.pt-4{padding-top:24px !important}.pr-4{padding-right:24px !important}.pb-4{padding-bottom:24px !important}.pl-4{padding-left:24px !important}.px-4{padding-right:24px !important;padding-left:24px !important}.py-4{padding-top:24px !important;padding-bottom:24px !important}.p-5{padding:32px !important}.pt-5{padding-top:32px !important}.pr-5{padding-right:32px !important}.pb-5{padding-bottom:32px !important}.pl-5{padding-left:32px !important}.px-5{padding-right:32px !important;padding-left:32px !important}.py-5{padding-top:32px !important;padding-bottom:32px !important}.p-6{padding:40px !important}.pt-6{padding-top:40px !important}.pr-6{padding-right:40px !important}.pb-6{padding-bottom:40px !important}.pl-6{padding-left:40px !important}.px-6{padding-right:40px !important;padding-left:40px !important}.py-6{padding-top:40px !important;padding-bottom:40px !important}@media (min-width: 544px){.p-sm-0{padding:0 !important}.pt-sm-0{padding-top:0 !important}.pr-sm-0{padding-right:0 !important}.pb-sm-0{padding-bottom:0 !important}.pl-sm-0{padding-left:0 !important}.px-sm-0{padding-right:0 !important;padding-left:0 !important}.py-sm-0{padding-top:0 !important;padding-bottom:0 !important}.p-sm-1{padding:4px !important}.pt-sm-1{padding-top:4px !important}.pr-sm-1{padding-right:4px !important}.pb-sm-1{padding-bottom:4px !important}.pl-sm-1{padding-left:4px !important}.px-sm-1{padding-right:4px !important;padding-left:4px !important}.py-sm-1{padding-top:4px !important;padding-bottom:4px !important}.p-sm-2{padding:8px !important}.pt-sm-2{padding-top:8px !important}.pr-sm-2{padding-right:8px !important}.pb-sm-2{padding-bottom:8px !important}.pl-sm-2{padding-left:8px !important}.px-sm-2{padding-right:8px !important;padding-left:8px !important}.py-sm-2{padding-top:8px !important;padding-bottom:8px !important}.p-sm-3{padding:16px !important}.pt-sm-3{padding-top:16px !important}.pr-sm-3{padding-right:16px !important}.pb-sm-3{padding-bottom:16px !important}.pl-sm-3{padding-left:16px !important}.px-sm-3{padding-right:16px !important;padding-left:16px !important}.py-sm-3{padding-top:16px !important;padding-bottom:16px !important}.p-sm-4{padding:24px !important}.pt-sm-4{padding-top:24px !important}.pr-sm-4{padding-right:24px !important}.pb-sm-4{padding-bottom:24px !important}.pl-sm-4{padding-left:24px !important}.px-sm-4{padding-right:24px !important;padding-left:24px !important}.py-sm-4{padding-top:24px !important;padding-bottom:24px !important}.p-sm-5{padding:32px !important}.pt-sm-5{padding-top:32px !important}.pr-sm-5{padding-right:32px !important}.pb-sm-5{padding-bottom:32px !important}.pl-sm-5{padding-left:32px !important}.px-sm-5{padding-right:32px !important;padding-left:32px !important}.py-sm-5{padding-top:32px !important;padding-bottom:32px !important}.p-sm-6{padding:40px !important}.pt-sm-6{padding-top:40px !important}.pr-sm-6{padding-right:40px !important}.pb-sm-6{padding-bottom:40px !important}.pl-sm-6{padding-left:40px !important}.px-sm-6{padding-right:40px !important;padding-left:40px !important}.py-sm-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 768px){.p-md-0{padding:0 !important}.pt-md-0{padding-top:0 !important}.pr-md-0{padding-right:0 !important}.pb-md-0{padding-bottom:0 !important}.pl-md-0{padding-left:0 !important}.px-md-0{padding-right:0 !important;padding-left:0 !important}.py-md-0{padding-top:0 !important;padding-bottom:0 !important}.p-md-1{padding:4px !important}.pt-md-1{padding-top:4px !important}.pr-md-1{padding-right:4px !important}.pb-md-1{padding-bottom:4px !important}.pl-md-1{padding-left:4px !important}.px-md-1{padding-right:4px !important;padding-left:4px !important}.py-md-1{padding-top:4px !important;padding-bottom:4px !important}.p-md-2{padding:8px !important}.pt-md-2{padding-top:8px !important}.pr-md-2{padding-right:8px !important}.pb-md-2{padding-bottom:8px !important}.pl-md-2{padding-left:8px !important}.px-md-2{padding-right:8px !important;padding-left:8px !important}.py-md-2{padding-top:8px !important;padding-bottom:8px !important}.p-md-3{padding:16px !important}.pt-md-3{padding-top:16px !important}.pr-md-3{padding-right:16px !important}.pb-md-3{padding-bottom:16px !important}.pl-md-3{padding-left:16px !important}.px-md-3{padding-right:16px !important;padding-left:16px !important}.py-md-3{padding-top:16px !important;padding-bottom:16px !important}.p-md-4{padding:24px !important}.pt-md-4{padding-top:24px !important}.pr-md-4{padding-right:24px !important}.pb-md-4{padding-bottom:24px !important}.pl-md-4{padding-left:24px !important}.px-md-4{padding-right:24px !important;padding-left:24px !important}.py-md-4{padding-top:24px !important;padding-bottom:24px !important}.p-md-5{padding:32px !important}.pt-md-5{padding-top:32px !important}.pr-md-5{padding-right:32px !important}.pb-md-5{padding-bottom:32px !important}.pl-md-5{padding-left:32px !important}.px-md-5{padding-right:32px !important;padding-left:32px !important}.py-md-5{padding-top:32px !important;padding-bottom:32px !important}.p-md-6{padding:40px !important}.pt-md-6{padding-top:40px !important}.pr-md-6{padding-right:40px !important}.pb-md-6{padding-bottom:40px !important}.pl-md-6{padding-left:40px !important}.px-md-6{padding-right:40px !important;padding-left:40px !important}.py-md-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 1012px){.p-lg-0{padding:0 !important}.pt-lg-0{padding-top:0 !important}.pr-lg-0{padding-right:0 !important}.pb-lg-0{padding-bottom:0 !important}.pl-lg-0{padding-left:0 !important}.px-lg-0{padding-right:0 !important;padding-left:0 !important}.py-lg-0{padding-top:0 !important;padding-bottom:0 !important}.p-lg-1{padding:4px !important}.pt-lg-1{padding-top:4px !important}.pr-lg-1{padding-right:4px !important}.pb-lg-1{padding-bottom:4px !important}.pl-lg-1{padding-left:4px !important}.px-lg-1{padding-right:4px !important;padding-left:4px !important}.py-lg-1{padding-top:4px !important;padding-bottom:4px !important}.p-lg-2{padding:8px !important}.pt-lg-2{padding-top:8px !important}.pr-lg-2{padding-right:8px !important}.pb-lg-2{padding-bottom:8px !important}.pl-lg-2{padding-left:8px !important}.px-lg-2{padding-right:8px !important;padding-left:8px !important}.py-lg-2{padding-top:8px !important;padding-bottom:8px !important}.p-lg-3{padding:16px !important}.pt-lg-3{padding-top:16px !important}.pr-lg-3{padding-right:16px !important}.pb-lg-3{padding-bottom:16px !important}.pl-lg-3{padding-left:16px !important}.px-lg-3{padding-right:16px !important;padding-left:16px !important}.py-lg-3{padding-top:16px !important;padding-bottom:16px !important}.p-lg-4{padding:24px !important}.pt-lg-4{padding-top:24px !important}.pr-lg-4{padding-right:24px !important}.pb-lg-4{padding-bottom:24px !important}.pl-lg-4{padding-left:24px !important}.px-lg-4{padding-right:24px !important;padding-left:24px !important}.py-lg-4{padding-top:24px !important;padding-bottom:24px !important}.p-lg-5{padding:32px !important}.pt-lg-5{padding-top:32px !important}.pr-lg-5{padding-right:32px !important}.pb-lg-5{padding-bottom:32px !important}.pl-lg-5{padding-left:32px !important}.px-lg-5{padding-right:32px !important;padding-left:32px !important}.py-lg-5{padding-top:32px !important;padding-bottom:32px !important}.p-lg-6{padding:40px !important}.pt-lg-6{padding-top:40px !important}.pr-lg-6{padding-right:40px !important}.pb-lg-6{padding-bottom:40px !important}.pl-lg-6{padding-left:40px !important}.px-lg-6{padding-right:40px !important;padding-left:40px !important}.py-lg-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 1280px){.p-xl-0{padding:0 !important}.pt-xl-0{padding-top:0 !important}.pr-xl-0{padding-right:0 !important}.pb-xl-0{padding-bottom:0 !important}.pl-xl-0{padding-left:0 !important}.px-xl-0{padding-right:0 !important;padding-left:0 !important}.py-xl-0{padding-top:0 !important;padding-bottom:0 !important}.p-xl-1{padding:4px !important}.pt-xl-1{padding-top:4px !important}.pr-xl-1{padding-right:4px !important}.pb-xl-1{padding-bottom:4px !important}.pl-xl-1{padding-left:4px !important}.px-xl-1{padding-right:4px !important;padding-left:4px !important}.py-xl-1{padding-top:4px !important;padding-bottom:4px !important}.p-xl-2{padding:8px !important}.pt-xl-2{padding-top:8px !important}.pr-xl-2{padding-right:8px !important}.pb-xl-2{padding-bottom:8px !important}.pl-xl-2{padding-left:8px !important}.px-xl-2{padding-right:8px !important;padding-left:8px !important}.py-xl-2{padding-top:8px !important;padding-bottom:8px !important}.p-xl-3{padding:16px !important}.pt-xl-3{padding-top:16px !important}.pr-xl-3{padding-right:16px !important}.pb-xl-3{padding-bottom:16px !important}.pl-xl-3{padding-left:16px !important}.px-xl-3{padding-right:16px !important;padding-left:16px !important}.py-xl-3{padding-top:16px !important;padding-bottom:16px !important}.p-xl-4{padding:24px !important}.pt-xl-4{padding-top:24px !important}.pr-xl-4{padding-right:24px !important}.pb-xl-4{padding-bottom:24px !important}.pl-xl-4{padding-left:24px !important}.px-xl-4{padding-right:24px !important;padding-left:24px !important}.py-xl-4{padding-top:24px !important;padding-bottom:24px !important}.p-xl-5{padding:32px !important}.pt-xl-5{padding-top:32px !important}.pr-xl-5{padding-right:32px !important}.pb-xl-5{padding-bottom:32px !important}.pl-xl-5{padding-left:32px !important}.px-xl-5{padding-right:32px !important;padding-left:32px !important}.py-xl-5{padding-top:32px !important;padding-bottom:32px !important}.p-xl-6{padding:40px !important}.pt-xl-6{padding-top:40px !important}.pr-xl-6{padding-right:40px !important}.pb-xl-6{padding-bottom:40px !important}.pl-xl-6{padding-left:40px !important}.px-xl-6{padding-right:40px !important;padding-left:40px !important}.py-xl-6{padding-top:40px !important;padding-bottom:40px !important}}.p-responsive{padding-right:16px !important;padding-left:16px !important}@media (min-width: 544px){.p-responsive{padding-right:40px !important;padding-left:40px !important}}@media (min-width: 1012px){.p-responsive{padding-right:16px !important;padding-left:16px !important}}.h1{font-size:26px !important}@media (min-width: 768px){.h1{font-size:32px !important}}.h2{font-size:22px !important}@media (min-width: 768px){.h2{font-size:24px !important}}.h3{font-size:18px !important}@media (min-width: 768px){.h3{font-size:20px !important}}.h4{font-size:16px !important}.h5{font-size:14px !important}.h6{font-size:12px !important}.h1,.h2,.h3,.h4,.h5,.h6{font-weight:600 !important}.f1{font-size:26px !important}@media (min-width: 768px){.f1{font-size:32px !important}}.f2{font-size:22px !important}@media (min-width: 768px){.f2{font-size:24px !important}}.f3{font-size:18px !important}@media (min-width: 768px){.f3{font-size:20px !important}}.f4{font-size:16px !important}@media (min-width: 768px){.f4{font-size:16px !important}}.f5{font-size:14px !important}.f6{font-size:12px !important}.f00-light{font-size:40px !important;font-weight:300 !important}@media (min-width: 768px){.f00-light{font-size:48px !important}}.f0-light{font-size:32px !important;font-weight:300 !important}@media (min-width: 768px){.f0-light{font-size:40px !important}}.f1-light{font-size:26px !important;font-weight:300 !important}@media (min-width: 768px){.f1-light{font-size:32px !important}}.f2-light{font-size:22px !important;font-weight:300 !important}@media (min-width: 768px){.f2-light{font-size:24px !important}}.f3-light{font-size:18px !important;font-weight:300 !important}@media (min-width: 768px){.f3-light{font-size:20px !important}}.text-small{font-size:12px !important}.lead{margin-bottom:30px;font-size:20px;font-weight:300;color:#586069}.lh-condensed-ultra{line-height:1 !important}.lh-condensed{line-height:1.25 !important}.lh-default{line-height:1.5 !important}.lh-0{line-height:0 !important}.text-right{text-align:right !important}.text-left{text-align:left !important}.text-center{text-align:center !important}@media (min-width: 544px){.text-sm-right{text-align:right !important}.text-sm-left{text-align:left !important}.text-sm-center{text-align:center !important}}@media (min-width: 768px){.text-md-right{text-align:right !important}.text-md-left{text-align:left !important}.text-md-center{text-align:center !important}}@media (min-width: 1012px){.text-lg-right{text-align:right !important}.text-lg-left{text-align:left !important}.text-lg-center{text-align:center !important}}@media (min-width: 1280px){.text-xl-right{text-align:right !important}.text-xl-left{text-align:left !important}.text-xl-center{text-align:center !important}}.text-normal{font-weight:400 !important}.text-bold{font-weight:600 !important}.text-italic{font-style:italic !important}.text-uppercase{text-transform:uppercase !important}.text-underline{text-decoration:underline !important}.no-underline{text-decoration:none !important}.no-wrap{white-space:nowrap !important}.ws-normal{white-space:normal !important}.wb-break-all{word-break:break-all !important}.text-emphasized{font-weight:600;color:#24292e}.list-style-none{list-style:none !important}.text-shadow-dark{text-shadow:0 1px 1px rgba(27,31,35,0.25),0 1px 25px rgba(27,31,35,0.75)}.text-shadow-light{text-shadow:0 1px 0 rgba(255,255,255,0.5)}.text-mono{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace}.user-select-none{user-select:none !important}.d-block{display:block !important}.d-flex{display:flex !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-inline-flex{display:inline-flex !important}.d-none{display:none !important}.d-table{display:table !important}.d-table-cell{display:table-cell !important}@media (min-width: 544px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-inline-flex{display:inline-flex !important}.d-sm-none{display:none !important}.d-sm-table{display:table !important}.d-sm-table-cell{display:table-cell !important}}@media (min-width: 768px){.d-md-block{display:block !important}.d-md-flex{display:flex !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-inline-flex{display:inline-flex !important}.d-md-none{display:none !important}.d-md-table{display:table !important}.d-md-table-cell{display:table-cell !important}}@media (min-width: 1012px){.d-lg-block{display:block !important}.d-lg-flex{display:flex !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-inline-flex{display:inline-flex !important}.d-lg-none{display:none !important}.d-lg-table{display:table !important}.d-lg-table-cell{display:table-cell !important}}@media (min-width: 1280px){.d-xl-block{display:block !important}.d-xl-flex{display:flex !important}.d-xl-inline{display:inline !important}.d-xl-inline-block{display:inline-block !important}.d-xl-inline-flex{display:inline-flex !important}.d-xl-none{display:none !important}.d-xl-table{display:table !important}.d-xl-table-cell{display:table-cell !important}}.v-hidden{visibility:hidden !important}.v-visible{visibility:visible !important}@media (max-width: 544px){.hide-sm{display:none !important}}@media (min-width: 544px) and (max-width: 768px){.hide-md{display:none !important}}@media (min-width: 768px) and (max-width: 1012px){.hide-lg{display:none !important}}@media (min-width: 1012px){.hide-xl{display:none !important}}.table-fixed{table-layout:fixed !important}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);word-wrap:normal;border:0}.show-on-focus{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.show-on-focus:focus{z-index:20;width:auto;height:auto;clip:auto}.container{width:980px;margin-right:auto;margin-left:auto}.container::before{display:table;content:""}.container::after{display:table;clear:both;content:""}.container-md{max-width:768px;margin-right:auto;margin-left:auto}.container-lg{max-width:1012px;margin-right:auto;margin-left:auto}.container-xl{max-width:1280px;margin-right:auto;margin-left:auto}.columns{margin-right:-10px;margin-left:-10px}.columns::before{display:table;content:""}.columns::after{display:table;clear:both;content:""}.column{float:left;padding-right:10px;padding-left:10px}.one-third{width:33.333333%}.two-thirds{width:66.666667%}.one-fourth{width:25%}.one-half{width:50%}.three-fourths{width:75%}.one-fifth{width:20%}.four-fifths{width:80%}.centered{display:block;float:none;margin-right:auto;margin-left:auto}.col-1{width:8.3333333333%}.col-2{width:16.6666666667%}.col-3{width:25%}.col-4{width:33.3333333333%}.col-5{width:41.6666666667%}.col-6{width:50%}.col-7{width:58.3333333333%}.col-8{width:66.6666666667%}.col-9{width:75%}.col-10{width:83.3333333333%}.col-11{width:91.6666666667%}.col-12{width:100%}@media (min-width: 544px){.col-sm-1{width:8.3333333333%}.col-sm-2{width:16.6666666667%}.col-sm-3{width:25%}.col-sm-4{width:33.3333333333%}.col-sm-5{width:41.6666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.3333333333%}.col-sm-8{width:66.6666666667%}.col-sm-9{width:75%}.col-sm-10{width:83.3333333333%}.col-sm-11{width:91.6666666667%}.col-sm-12{width:100%}}@media (min-width: 768px){.col-md-1{width:8.3333333333%}.col-md-2{width:16.6666666667%}.col-md-3{width:25%}.col-md-4{width:33.3333333333%}.col-md-5{width:41.6666666667%}.col-md-6{width:50%}.col-md-7{width:58.3333333333%}.col-md-8{width:66.6666666667%}.col-md-9{width:75%}.col-md-10{width:83.3333333333%}.col-md-11{width:91.6666666667%}.col-md-12{width:100%}}@media (min-width: 1012px){.col-lg-1{width:8.3333333333%}.col-lg-2{width:16.6666666667%}.col-lg-3{width:25%}.col-lg-4{width:33.3333333333%}.col-lg-5{width:41.6666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.3333333333%}.col-lg-8{width:66.6666666667%}.col-lg-9{width:75%}.col-lg-10{width:83.3333333333%}.col-lg-11{width:91.6666666667%}.col-lg-12{width:100%}}@media (min-width: 1280px){.col-xl-1{width:8.3333333333%}.col-xl-2{width:16.6666666667%}.col-xl-3{width:25%}.col-xl-4{width:33.3333333333%}.col-xl-5{width:41.6666666667%}.col-xl-6{width:50%}.col-xl-7{width:58.3333333333%}.col-xl-8{width:66.6666666667%}.col-xl-9{width:75%}.col-xl-10{width:83.3333333333%}.col-xl-11{width:91.6666666667%}.col-xl-12{width:100%}}.gutter{margin-right:-16px;margin-left:-16px}.gutter>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-condensed{margin-right:-8px;margin-left:-8px}.gutter-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-spacious{margin-right:-24px;margin-left:-24px}.gutter-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}@media (min-width: 544px){.gutter-sm{margin-right:-16px;margin-left:-16px}.gutter-sm>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-sm-condensed{margin-right:-8px;margin-left:-8px}.gutter-sm-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-sm-spacious{margin-right:-24px;margin-left:-24px}.gutter-sm-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 768px){.gutter-md{margin-right:-16px;margin-left:-16px}.gutter-md>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-md-condensed{margin-right:-8px;margin-left:-8px}.gutter-md-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-md-spacious{margin-right:-24px;margin-left:-24px}.gutter-md-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 1012px){.gutter-lg{margin-right:-16px;margin-left:-16px}.gutter-lg>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-lg-condensed{margin-right:-8px;margin-left:-8px}.gutter-lg-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-lg-spacious{margin-right:-24px;margin-left:-24px}.gutter-lg-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 1280px){.gutter-xl{margin-right:-16px;margin-left:-16px}.gutter-xl>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-xl-condensed{margin-right:-8px;margin-left:-8px}.gutter-xl-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-xl-spacious{margin-right:-24px;margin-left:-24px}.gutter-xl-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}.offset-1{margin-left:8.3333333333% !important}.offset-2{margin-left:16.6666666667% !important}.offset-3{margin-left:25% !important}.offset-4{margin-left:33.3333333333% !important}.offset-5{margin-left:41.6666666667% !important}.offset-6{margin-left:50% !important}.offset-7{margin-left:58.3333333333% !important}.offset-8{margin-left:66.6666666667% !important}.offset-9{margin-left:75% !important}.offset-10{margin-left:83.3333333333% !important}.offset-11{margin-left:91.6666666667% !important}@media (min-width: 544px){.offset-sm-1{margin-left:8.3333333333% !important}.offset-sm-2{margin-left:16.6666666667% !important}.offset-sm-3{margin-left:25% !important}.offset-sm-4{margin-left:33.3333333333% !important}.offset-sm-5{margin-left:41.6666666667% !important}.offset-sm-6{margin-left:50% !important}.offset-sm-7{margin-left:58.3333333333% !important}.offset-sm-8{margin-left:66.6666666667% !important}.offset-sm-9{margin-left:75% !important}.offset-sm-10{margin-left:83.3333333333% !important}.offset-sm-11{margin-left:91.6666666667% !important}}@media (min-width: 768px){.offset-md-1{margin-left:8.3333333333% !important}.offset-md-2{margin-left:16.6666666667% !important}.offset-md-3{margin-left:25% !important}.offset-md-4{margin-left:33.3333333333% !important}.offset-md-5{margin-left:41.6666666667% !important}.offset-md-6{margin-left:50% !important}.offset-md-7{margin-left:58.3333333333% !important}.offset-md-8{margin-left:66.6666666667% !important}.offset-md-9{margin-left:75% !important}.offset-md-10{margin-left:83.3333333333% !important}.offset-md-11{margin-left:91.6666666667% !important}}@media (min-width: 1012px){.offset-lg-1{margin-left:8.3333333333% !important}.offset-lg-2{margin-left:16.6666666667% !important}.offset-lg-3{margin-left:25% !important}.offset-lg-4{margin-left:33.3333333333% !important}.offset-lg-5{margin-left:41.6666666667% !important}.offset-lg-6{margin-left:50% !important}.offset-lg-7{margin-left:58.3333333333% !important}.offset-lg-8{margin-left:66.6666666667% !important}.offset-lg-9{margin-left:75% !important}.offset-lg-10{margin-left:83.3333333333% !important}.offset-lg-11{margin-left:91.6666666667% !important}}@media (min-width: 1280px){.offset-xl-1{margin-left:8.3333333333% !important}.offset-xl-2{margin-left:16.6666666667% !important}.offset-xl-3{margin-left:25% !important}.offset-xl-4{margin-left:33.3333333333% !important}.offset-xl-5{margin-left:41.6666666667% !important}.offset-xl-6{margin-left:50% !important}.offset-xl-7{margin-left:58.3333333333% !important}.offset-xl-8{margin-left:66.6666666667% !important}.offset-xl-9{margin-left:75% !important}.offset-xl-10{margin-left:83.3333333333% !important}.offset-xl-11{margin-left:91.6666666667% !important}}.markdown-body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#cb2431}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre{margin-top:0;margin-bottom:16px}.markdown-body hr{height:.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:0.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:solid 1px #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{font-size:inherit}.markdown-body h1{padding-bottom:0.3em;font-size:2em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:0.875em}.markdown-body h6{font-size:0.85em;color:#6a737d}.markdown-body ul,.markdown-body ol{padding-left:2em}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li{word-wrap:break-all}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body table img{background-color:transparent}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #dfe2e5}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#24292e}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:0.2em 0.4em;margin:0;font-size:85%;background-color:rgba(27,31,35,0.05);border-radius:3px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#f6f8fa;border-top:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8} diff --git a/assets/css/styles.css b/assets/css/styles.css new file mode 100644 index 000000000..da0bd4696 --- /dev/null +++ b/assets/css/styles.css @@ -0,0 +1,6 @@ +:root{--font-family: "Google Sans Text", "Roboto", "Helvetica Neue", Arial, sans-serif !important;--breakpoint-xl: 1040px;--dc-red-strong: #660000;--dc-red-lite: #9a0000;--dc-red-fade: #f0e6e7;--dc-gray: #3b3b3b;--dc-gray-lite: #ccc;--dc-header-background: white;--gm-3-ref-neutral-neutral-20: #303030;--gm-3-ref-neutral-neutral-40: #5e5e5e;--gm-3-ref-neutral-neutral-80: #c7c7c7;--gm-3-ref-neutral-neutral-90: #e3e3e3;--link-color: #0b57d0}.material-icons.md-16{font-size:16px;padding-right:2px;vertical-align:text-top}.material-icons-outlined.md-16{font-size:16px}/*! + * Bootstrap v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 The Bootstrap Authors + * Copyright 2011-2018 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */:root{--blue: #007bff;--indigo: #6610f2;--purple: #6f42c1;--pink: #e83e8c;--red: #dc3545;--orange: #fd7e14;--yellow: #ffc107;--green: #28a745;--teal: #20c997;--cyan: #17a2b8;--white: #fff;--gray: #6c757d;--gray-dark: #343a40;--primary: #0b57d0;--secondary: #6c757d;--success: #28a745;--info: #17a2b8;--warning: #ffc107;--danger: #dc3545;--light: #f8f9fa;--dark: #343a40;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--font-family-sans-serif: "Google Sans Text", (-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before,*::after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0 !important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[title],abbr[data-original-title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0b57d0;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0b57d0;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):hover,a:not([href]):not([tabindex]):focus{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre,code,kbd,samp{font-family:monospace, monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{padding:0;border-style:none}input[type="radio"],input[type="checkbox"]{box-sizing:border-box;padding:0}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{outline-offset:-2px;-webkit-appearance:none}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none !important}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{margin-bottom:.5rem;font-family:"Google Sans","Public Sans","Google Sans Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:500;line-height:1.2;color:inherit}h1,.h1{font-size:2.5rem}h2,.h2{font-size:1.75rem}h3,.h3{font-size:1.4rem}h4,.h4{font-size:1.2rem}h5,.h5{font-size:1.1rem}h6,.h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,0.1)}small,.small{font-size:80%;font-weight:400}mark,.mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014 \00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width: 576px){.container{max-width:540px}}@media (min-width: 768px){.container{max-width:720px}}@media (min-width: 992px){.container{max-width:960px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*="col-"]{padding-right:0;padding-left:0}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col,.col-auto,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm,.col-sm-auto,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md,.col-md-auto,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg,.col-lg-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.col-auto{flex:0 0 auto;width:auto;max-width:none}.col-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width: 576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:none}.col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width: 768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.col-md-auto{flex:0 0 auto;width:auto;max-width:none}.col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width: 992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:none}.col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-lg-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}.table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent}.table th,.table td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table .table{background-color:#fff}.table-sm th,.table-sm td{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered th,.table-bordered td{border:1px solid #dee2e6}.table-bordered thead th,.table-bordered thead td{border-bottom-width:2px}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,0.05)}.table-hover tbody tr:hover{background-color:rgba(0,0,0,0.075)}.table-primary,.table-primary>th,.table-primary>td{background-color:#bbd0f2}.table-hover .table-primary:hover{background-color:#a6c1ee}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#a6c1ee}.table-secondary,.table-secondary>th,.table-secondary>td{background-color:#d6d8db}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>th,.table-success>td{background-color:#c3e6cb}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>th,.table-info>td{background-color:#bee5eb}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>th,.table-warning>td{background-color:#ffeeba}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>th,.table-danger>td{background-color:#f5c6cb}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>th,.table-light>td{background-color:#fdfdfe}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>th,.table-dark>td{background-color:#c6c8ca}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>th,.table-active>td{background-color:rgba(0,0,0,0.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,0.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,0.075)}.table .thead-dark th{color:#fff;background-color:#212529;border-color:#32383e}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#212529}.table-dark th,.table-dark td,.table-dark thead th{border-color:#32383e}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,0.05)}.table-dark.table-hover tbody tr:hover{background-color:rgba(255,255,255,0.075)}@media (max-width: 575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-sm>.table-bordered{border:0}}@media (max-width: 767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-md>.table-bordered{border:0}}@media (max-width: 991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-lg>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#649cf7;outline:0;box-shadow:0 0 0 .2rem rgba(11,87,208,0.25)}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:not([size]):not([multiple]){height:calc(2.25rem + 2px)}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-sm,.input-group-sm>.form-control-plaintext.form-control,.input-group-sm>.input-group-prepend>.form-control-plaintext.input-group-text,.input-group-sm>.input-group-append>.form-control-plaintext.input-group-text,.input-group-sm>.input-group-prepend>.form-control-plaintext.btn,.input-group-sm>.input-group-append>.form-control-plaintext.btn,.form-control-plaintext.form-control-lg,.input-group-lg>.form-control-plaintext.form-control,.input-group-lg>.input-group-prepend>.form-control-plaintext.input-group-text,.input-group-lg>.input-group-append>.form-control-plaintext.input-group-text,.input-group-lg>.input-group-prepend>.form-control-plaintext.btn,.input-group-lg>.input-group-append>.form-control-plaintext.btn{padding-right:0;padding-left:0}.form-control-sm,.input-group-sm>.form-control,.input-group-sm>.input-group-prepend>.input-group-text,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-append>.btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}select.form-control-sm:not([size]):not([multiple]),.input-group-sm>select.form-control:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-sm>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-sm>.input-group-append>select.btn:not([size]):not([multiple]){height:calc(1.8125rem + 2px)}.form-control-lg,.input-group-lg>.form-control,.input-group-lg>.input-group-prepend>.input-group-text,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-append>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control-lg:not([size]):not([multiple]),.input-group-lg>select.form-control:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-lg>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-lg>.input-group-append>select.btn:not([size]):not([multiple]){height:calc(2.875rem + 2px)}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*="col-"]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled ~ .form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(40,167,69,0.8);border-radius:.2rem}.was-validated .form-control:valid,.form-control.is-valid,.was-validated .custom-select:valid,.custom-select.is-valid{border-color:#28a745}.was-validated .form-control:valid:focus,.form-control.is-valid:focus,.was-validated .custom-select:valid:focus,.custom-select.is-valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,0.25)}.was-validated .form-control:valid ~ .valid-feedback,.was-validated .form-control:valid ~ .valid-tooltip,.form-control.is-valid ~ .valid-feedback,.form-control.is-valid ~ .valid-tooltip,.was-validated .custom-select:valid ~ .valid-feedback,.was-validated .custom-select:valid ~ .valid-tooltip,.custom-select.is-valid ~ .valid-feedback,.custom-select.is-valid ~ .valid-tooltip{display:block}.was-validated .form-check-input:valid ~ .form-check-label,.form-check-input.is-valid ~ .form-check-label{color:#28a745}.was-validated .form-check-input:valid ~ .valid-feedback,.was-validated .form-check-input:valid ~ .valid-tooltip,.form-check-input.is-valid ~ .valid-feedback,.form-check-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-control-input:valid ~ .custom-control-label,.custom-control-input.is-valid ~ .custom-control-label{color:#28a745}.was-validated .custom-control-input:valid ~ .custom-control-label::before,.custom-control-input.is-valid ~ .custom-control-label::before{background-color:#71dd8a}.was-validated .custom-control-input:valid ~ .valid-feedback,.was-validated .custom-control-input:valid ~ .valid-tooltip,.custom-control-input.is-valid ~ .valid-feedback,.custom-control-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before,.custom-control-input.is-valid:checked ~ .custom-control-label::before{background-color:#34ce57}.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before,.custom-control-input.is-valid:focus ~ .custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(40,167,69,0.25)}.was-validated .custom-file-input:valid ~ .custom-file-label,.custom-file-input.is-valid ~ .custom-file-label{border-color:#28a745}.was-validated .custom-file-input:valid ~ .custom-file-label::before,.custom-file-input.is-valid ~ .custom-file-label::before{border-color:inherit}.was-validated .custom-file-input:valid ~ .valid-feedback,.was-validated .custom-file-input:valid ~ .valid-tooltip,.custom-file-input.is-valid ~ .valid-feedback,.custom-file-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-file-input:valid:focus ~ .custom-file-label,.custom-file-input.is-valid:focus ~ .custom-file-label{box-shadow:0 0 0 .2rem rgba(40,167,69,0.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(220,53,69,0.8);border-radius:.2rem}.was-validated .form-control:invalid,.form-control.is-invalid,.was-validated .custom-select:invalid,.custom-select.is-invalid{border-color:#dc3545}.was-validated .form-control:invalid:focus,.form-control.is-invalid:focus,.was-validated .custom-select:invalid:focus,.custom-select.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,0.25)}.was-validated .form-control:invalid ~ .invalid-feedback,.was-validated .form-control:invalid ~ .invalid-tooltip,.form-control.is-invalid ~ .invalid-feedback,.form-control.is-invalid ~ .invalid-tooltip,.was-validated .custom-select:invalid ~ .invalid-feedback,.was-validated .custom-select:invalid ~ .invalid-tooltip,.custom-select.is-invalid ~ .invalid-feedback,.custom-select.is-invalid ~ .invalid-tooltip{display:block}.was-validated .form-check-input:invalid ~ .form-check-label,.form-check-input.is-invalid ~ .form-check-label{color:#dc3545}.was-validated .form-check-input:invalid ~ .invalid-feedback,.was-validated .form-check-input:invalid ~ .invalid-tooltip,.form-check-input.is-invalid ~ .invalid-feedback,.form-check-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-control-input:invalid ~ .custom-control-label,.custom-control-input.is-invalid ~ .custom-control-label{color:#dc3545}.was-validated .custom-control-input:invalid ~ .custom-control-label::before,.custom-control-input.is-invalid ~ .custom-control-label::before{background-color:#efa2a9}.was-validated .custom-control-input:invalid ~ .invalid-feedback,.was-validated .custom-control-input:invalid ~ .invalid-tooltip,.custom-control-input.is-invalid ~ .invalid-feedback,.custom-control-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before,.custom-control-input.is-invalid:checked ~ .custom-control-label::before{background-color:#e4606d}.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before,.custom-control-input.is-invalid:focus ~ .custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(220,53,69,0.25)}.was-validated .custom-file-input:invalid ~ .custom-file-label,.custom-file-input.is-invalid ~ .custom-file-label{border-color:#dc3545}.was-validated .custom-file-input:invalid ~ .custom-file-label::before,.custom-file-input.is-invalid ~ .custom-file-label::before{border-color:inherit}.was-validated .custom-file-input:invalid ~ .invalid-feedback,.was-validated .custom-file-input:invalid ~ .invalid-tooltip,.custom-file-input.is-invalid ~ .invalid-feedback,.custom-file-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-file-input:invalid:focus ~ .custom-file-label,.custom-file-input.is-invalid:focus ~ .custom-file-label{box-shadow:0 0 0 .2rem rgba(220,53,69,0.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width: 576px){.form-inline label{display:flex;align-items:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out}.btn:hover,.btn:focus{text-decoration:none}.btn:focus,.btn.focus{outline:0;box-shadow:0 0 0 .2rem rgba(11,87,208,0.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}.btn:not(:disabled):not(.disabled):active,.btn:not(:disabled):not(.disabled).active{background-image:none}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#0b57d0;border-color:#0b57d0}.btn-primary:hover{color:#fff;background-color:#0948ac;border-color:#0843a0}.btn-primary:focus,.btn-primary.focus{box-shadow:0 0 0 .2rem rgba(11,87,208,0.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0b57d0;border-color:#0b57d0}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0843a0;border-color:#083e93}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(11,87,208,0.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary:focus,.btn-secondary.focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled):active,.btn-secondary:not(:disabled):not(.disabled).active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled):active:focus,.btn-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success:focus,.btn-success.focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled):active,.btn-success:not(:disabled):not(.disabled).active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled):active:focus,.btn-success:not(:disabled):not(.disabled).active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info:focus,.btn-info.focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled):active,.btn-info:not(:disabled):not(.disabled).active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled):active:focus,.btn-info:not(:disabled):not(.disabled).active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning:focus,.btn-warning.focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled):active,.btn-warning:not(:disabled):not(.disabled).active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled):active:focus,.btn-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger:focus,.btn-danger.focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled):active,.btn-danger:not(:disabled):not(.disabled).active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled):active:focus,.btn-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light:focus,.btn-light.focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled):active,.btn-light:not(:disabled):not(.disabled).active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled):active:focus,.btn-light:not(:disabled):not(.disabled).active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark:focus,.btn-dark.focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled):active,.btn-dark:not(:disabled):not(.disabled).active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled):active:focus,.btn-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-outline-primary{color:#0b57d0;background-color:transparent;background-image:none;border-color:#0b57d0}.btn-outline-primary:hover{color:#fff;background-color:#0b57d0;border-color:#0b57d0}.btn-outline-primary:focus,.btn-outline-primary.focus{box-shadow:0 0 0 .2rem rgba(11,87,208,0.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0b57d0;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled):active,.btn-outline-primary:not(:disabled):not(.disabled).active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0b57d0;border-color:#0b57d0}.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(11,87,208,0.5)}.btn-outline-secondary{color:#6c757d;background-color:transparent;background-image:none;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:focus,.btn-outline-secondary.focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled):active,.btn-outline-secondary:not(:disabled):not(.disabled).active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-outline-success{color:#28a745;background-color:transparent;background-image:none;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:focus,.btn-outline-success.focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled):active,.btn-outline-success:not(:disabled):not(.disabled).active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled):active:focus,.btn-outline-success:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-outline-info{color:#17a2b8;background-color:transparent;background-image:none;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:focus,.btn-outline-info.focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled):active,.btn-outline-info:not(:disabled):not(.disabled).active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled):active:focus,.btn-outline-info:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-outline-warning{color:#ffc107;background-color:transparent;background-image:none;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:focus,.btn-outline-warning.focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled):active,.btn-outline-warning:not(:disabled):not(.disabled).active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-outline-danger{color:#dc3545;background-color:transparent;background-image:none;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:focus,.btn-outline-danger.focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled):active,.btn-outline-danger:not(:disabled):not(.disabled).active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-outline-light{color:#f8f9fa;background-color:transparent;background-image:none;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:focus,.btn-outline-light.focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled):active,.btn-outline-light:not(:disabled):not(.disabled).active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled):active:focus,.btn-outline-light:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-outline-dark{color:#343a40;background-color:transparent;background-image:none;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:focus,.btn-outline-dark.focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled):active,.btn-outline-dark:not(:disabled):not(.disabled).active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-link{font-weight:400;color:#0b57d0;background-color:transparent}.btn-link:hover{color:#0b57d0;text-decoration:underline;background-color:transparent;border-color:transparent}.btn-link:focus,.btn-link.focus{text-decoration:underline;border-color:transparent;box-shadow:none}.btn-link:disabled,.btn-link.disabled{color:#6c757d}.btn-lg,.btn-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-sm,.btn-group-sm>.btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;transition:opacity 0.15s linear}.fade.show{opacity:1}.collapse{display:none}.collapse.show{display:block}tr.collapse.show{display:table-row}tbody.collapse.show{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;transition:height 0.35s ease}.dropup,.dropdown{position:relative}.dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.15);border-radius:.25rem}.dropup .dropdown-menu{margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;width:0;height:0;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0b57d0}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;flex:0 1 auto}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover{z-index:1}.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn.active{z-index:1}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group,.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:not(:last-child):not(.dropdown-toggle),.btn-group>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:not(:first-child),.btn-group>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after{margin-left:0}.btn-sm+.dropdown-toggle-split,.btn-group-sm>.btn+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle),.btn-group-vertical>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child),.btn-group-vertical>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type="radio"],.btn-group-toggle>.btn input[type="checkbox"],.btn-group-toggle>.btn-group>.btn input[type="radio"],.btn-group-toggle>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.custom-select,.input-group>.custom-file{position:relative;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.form-control:focus,.input-group>.custom-select:focus,.input-group>.custom-file:focus{z-index:3}.input-group>.form-control+.form-control,.input-group>.form-control+.custom-select,.input-group>.form-control+.custom-file,.input-group>.custom-select+.form-control,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.custom-file,.input-group>.custom-file+.form-control,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.custom-file{margin-left:-1px}.input-group>.form-control:not(:last-child),.input-group>.custom-select:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.form-control:not(:first-child),.input-group>.custom-select:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::before{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label,.input-group>.custom-file:not(:first-child) .custom-file-label::before{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-prepend,.input-group-append{display:flex}.input-group-prepend .btn,.input-group-append .btn{position:relative;z-index:2}.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.input-group-text,.input-group-append .input-group-text+.btn{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type="radio"],.input-group-text input[type="checkbox"]{margin-top:0}.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text,.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked ~ .custom-control-label::before{color:#fff;background-color:#0b57d0}.custom-control-input:focus ~ .custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(11,87,208,0.25)}.custom-control-input:active ~ .custom-control-label::before{color:#fff;background-color:#94bbf9}.custom-control-input:disabled ~ .custom-control-label{color:#6c757d}.custom-control-input:disabled ~ .custom-control-label::before{background-color:#e9ecef}.custom-control-label{margin-bottom:0}.custom-control-label::before{position:absolute;top:.25rem;left:0;display:block;width:1rem;height:1rem;pointer-events:none;content:"";user-select:none;background-color:#dee2e6}.custom-control-label::after{position:absolute;top:.25rem;left:0;display:block;width:1rem;height:1rem;content:"";background-repeat:no-repeat;background-position:center center;background-size:50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before{background-color:#0b57d0}.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before{background-color:#0b57d0}.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before{background-color:rgba(11,87,208,0.5)}.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before{background-color:rgba(11,87,208,0.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked ~ .custom-control-label::before{background-color:#0b57d0}.custom-radio .custom-control-input:checked ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before{background-color:rgba(11,87,208,0.5)}.custom-select{display:inline-block;width:100%;height:calc(2.25rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;background-size:8px 10px;border:1px solid #ced4da;border-radius:.25rem;appearance:none}.custom-select:focus{border-color:#649cf7;outline:0;box-shadow:inset 0 1px 2px rgba(0,0,0,0.075),0 0 5px rgba(100,156,247,0.5)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{opacity:0}.custom-select-sm{height:calc(1.8125rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:75%}.custom-select-lg{height:calc(2.875rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:125%}.custom-file{position:relative;display:inline-block;width:100%;height:calc(2.25rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(2.25rem + 2px);margin:0;opacity:0}.custom-file-input:focus ~ .custom-file-control{border-color:#649cf7;box-shadow:0 0 0 .2rem rgba(11,87,208,0.25)}.custom-file-input:focus ~ .custom-file-control::before{border-color:#649cf7}.custom-file-input:lang(en) ~ .custom-file-label::after{content:"Browse"}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(2.25rem + 2px);padding:.375rem .75rem;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(calc(2.25rem + 2px) - 1px * 2);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:1px solid #ced4da;border-radius:0 .25rem .25rem 0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:hover,.nav-link:focus{text-decoration:none}.nav-link.disabled{color:#6c757d}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:hover,.nav-tabs .nav-link:focus{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-link.active,.nav-tabs .nav-item.show .nav-link{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0b57d0}.nav-fill .nav-item{flex:1 1 auto;text-align:center}.nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:.5rem 1rem}.navbar>.container,.navbar>.container-fluid{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:hover,.navbar-toggler:focus{text-decoration:none}.navbar-toggler:not(:disabled):not(.disabled){cursor:pointer}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width: 575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width: 767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width: 991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .dropup .dropdown-menu{top:auto;bottom:100%}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .dropup .dropdown-menu{top:auto;bottom:100%}.navbar-light .navbar-brand{color:rgba(0,0,0,0.9)}.navbar-light .navbar-brand:hover,.navbar-light .navbar-brand:focus{color:rgba(0,0,0,0.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,0.5)}.navbar-light .navbar-nav .nav-link:hover,.navbar-light .navbar-nav .nav-link:focus{color:rgba(0,0,0,0.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,0.3)}.navbar-light .navbar-nav .show>.nav-link,.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .nav-link.active{color:rgba(0,0,0,0.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,0.5);border-color:rgba(0,0,0,0.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0,0,0,0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,0.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,0.9)}.navbar-light .navbar-text a:hover,.navbar-light .navbar-text a:focus{color:rgba(0,0,0,0.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:hover,.navbar-dark .navbar-brand:focus{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,0.5)}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:rgba(255,255,255,0.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,0.25)}.navbar-dark .navbar-nav .show>.nav-link,.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .nav-link.active{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,0.5);border-color:rgba(255,255,255,0.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:rgba(255,255,255,0.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:hover,.navbar-dark .navbar-text a:focus{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,0.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-0.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,0.03);border-bottom:1px solid rgba(0,0,0,0.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,0.03);border-top:1px solid rgba(0,0,0,0.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-0.625rem;margin-bottom:-0.75rem;margin-left:-0.625rem;border-bottom:0}.card-header-pills{margin-right:-0.625rem;margin-left:-0.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck{display:flex;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width: 576px){.card-deck{flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{display:flex;flex:1 0 0%;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:flex;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width: 576px){.card-group{flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:first-child .card-img-top,.card-group>.card:first-child .card-header{border-top-right-radius:0}.card-group>.card:first-child .card-img-bottom,.card-group>.card:first-child .card-footer{border-bottom-right-radius:0}.card-group>.card:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:last-child .card-img-top,.card-group>.card:last-child .card-header{border-top-left-radius:0}.card-group>.card:last-child .card-img-bottom,.card-group>.card:last-child .card-footer{border-bottom-left-radius:0}.card-group>.card:only-child{border-radius:.25rem}.card-group>.card:only-child .card-img-top,.card-group>.card:only-child .card-header{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card-group>.card:only-child .card-img-bottom,.card-group>.card:only-child .card-footer{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-group>.card:not(:first-child):not(:last-child):not(:only-child){border-radius:0}.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-top,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-header,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-footer{border-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width: 576px){.card-columns{column-count:3;column-gap:1.25rem}.card-columns .card{display:inline-block;width:100%}}.breadcrumb{display:flex;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;padding-left:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#0b57d0;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{color:#0b57d0;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;box-shadow:0 0 0 .2rem rgba(11,87,208,0.25)}.page-link:not(:disabled):not(.disabled){cursor:pointer}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#0b57d0;border-color:#0b57d0}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#0b57d0}.badge-primary[href]:hover,.badge-primary[href]:focus{color:#fff;text-decoration:none;background-color:#0843a0}.badge-secondary{color:#fff;background-color:#6c757d}.badge-secondary[href]:hover,.badge-secondary[href]:focus{color:#fff;text-decoration:none;background-color:#545b62}.badge-success{color:#fff;background-color:#28a745}.badge-success[href]:hover,.badge-success[href]:focus{color:#fff;text-decoration:none;background-color:#1e7e34}.badge-info{color:#fff;background-color:#17a2b8}.badge-info[href]:hover,.badge-info[href]:focus{color:#fff;text-decoration:none;background-color:#117a8b}.badge-warning{color:#212529;background-color:#ffc107}.badge-warning[href]:hover,.badge-warning[href]:focus{color:#212529;text-decoration:none;background-color:#d39e00}.badge-danger{color:#fff;background-color:#dc3545}.badge-danger[href]:hover,.badge-danger[href]:focus{color:#fff;text-decoration:none;background-color:#bd2130}.badge-light{color:#212529;background-color:#f8f9fa}.badge-light[href]:hover,.badge-light[href]:focus{color:#212529;text-decoration:none;background-color:#dae0e5}.badge-dark{color:#fff;background-color:#343a40}.badge-dark[href]:hover,.badge-dark[href]:focus{color:#fff;text-decoration:none;background-color:#1d2124}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width: 576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#062d6c;background-color:#ceddf6;border-color:#bbd0f2}.alert-primary hr{border-top-color:#a6c1ee}.alert-primary .alert-link{color:#03193c}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;color:#fff;text-align:center;background-color:#0b57d0;transition:width 0.6s ease}.progress-bar-striped{background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-size:1rem 1rem}.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:hover,.list-group-item-action:focus{color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,0.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item:hover,.list-group-item:focus{z-index:1;text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0b57d0;border-color:#0b57d0}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-primary{color:#062d6c;background-color:#bbd0f2}.list-group-item-primary.list-group-item-action:hover,.list-group-item-primary.list-group-item-action:focus{color:#062d6c;background-color:#a6c1ee}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#062d6c;border-color:#062d6c}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:hover,.list-group-item-secondary.list-group-item-action:focus{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:hover,.list-group-item-success.list-group-item-action:focus{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:hover,.list-group-item-info.list-group-item-action:focus{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:hover,.list-group-item-warning.list-group-item-action:focus{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:hover,.list-group-item-danger.list-group-item-action:focus{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:hover,.list-group-item-light.list-group-item-action:focus{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:hover,.list-group-item-dark.list-group-item-action:focus{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover,.close:focus{color:#000;text-decoration:none;opacity:.75}.close:not(:disabled):not(.disabled){cursor:pointer}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform 0.3s ease-out;transform:translate(0, -25%)}.modal.show .modal-dialog{transform:translate(0, 0)}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - (.5rem * 2))}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width: 576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:calc(100% - (1.75rem * 2))}.modal-sm{max-width:300px}}@media (min-width: 992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-top,.bs-tooltip-auto[x-placement^="top"]{padding:.4rem 0}.bs-tooltip-top .arrow,.bs-tooltip-auto[x-placement^="top"] .arrow{bottom:0}.bs-tooltip-top .arrow::before,.bs-tooltip-auto[x-placement^="top"] .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-right,.bs-tooltip-auto[x-placement^="right"]{padding:0 .4rem}.bs-tooltip-right .arrow,.bs-tooltip-auto[x-placement^="right"] .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-right .arrow::before,.bs-tooltip-auto[x-placement^="right"] .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-bottom,.bs-tooltip-auto[x-placement^="bottom"]{padding:.4rem 0}.bs-tooltip-bottom .arrow,.bs-tooltip-auto[x-placement^="bottom"] .arrow{top:0}.bs-tooltip-bottom .arrow::before,.bs-tooltip-auto[x-placement^="bottom"] .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-left,.bs-tooltip-auto[x-placement^="left"]{padding:0 .4rem}.bs-tooltip-left .arrow,.bs-tooltip-auto[x-placement^="left"] .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-left .arrow::before,.bs-tooltip-auto[x-placement^="left"] .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::before,.popover .arrow::after{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-top,.bs-popover-auto[x-placement^="top"]{margin-bottom:.5rem}.bs-popover-top .arrow,.bs-popover-auto[x-placement^="top"] .arrow{bottom:calc((.5rem + 1px) * -1)}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^="top"] .arrow::before,.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^="top"] .arrow::after{border-width:.5rem .5rem 0}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^="top"] .arrow::before{bottom:0;border-top-color:rgba(0,0,0,0.25)}.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^="top"] .arrow::after{bottom:1px;border-top-color:#fff}.bs-popover-right,.bs-popover-auto[x-placement^="right"]{margin-left:.5rem}.bs-popover-right .arrow,.bs-popover-auto[x-placement^="right"] .arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^="right"] .arrow::before,.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^="right"] .arrow::after{border-width:.5rem .5rem .5rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^="right"] .arrow::before{left:0;border-right-color:rgba(0,0,0,0.25)}.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^="right"] .arrow::after{left:1px;border-right-color:#fff}.bs-popover-bottom,.bs-popover-auto[x-placement^="bottom"]{margin-top:.5rem}.bs-popover-bottom .arrow,.bs-popover-auto[x-placement^="bottom"] .arrow{top:calc((.5rem + 1px) * -1)}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^="bottom"] .arrow::before,.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^="bottom"] .arrow::after{border-width:0 .5rem .5rem .5rem}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^="bottom"] .arrow::before{top:0;border-bottom-color:rgba(0,0,0,0.25)}.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^="bottom"] .arrow::after{top:1px;border-bottom-color:#fff}.bs-popover-bottom .popover-header::before,.bs-popover-auto[x-placement^="bottom"] .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-left,.bs-popover-auto[x-placement^="left"]{margin-right:.5rem}.bs-popover-left .arrow,.bs-popover-auto[x-placement^="left"] .arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^="left"] .arrow::before,.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^="left"] .arrow::after{border-width:.5rem 0 .5rem .5rem}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^="left"] .arrow::before{right:0;border-left-color:rgba(0,0,0,0.25)}.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^="left"] .arrow::after{right:1px;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;color:inherit;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;align-items:center;width:100%;transition:transform 0.6s ease;backface-visibility:hidden;perspective:1000px}.carousel-item.active,.carousel-item-next,.carousel-item-prev{display:block}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{transform:translateX(0)}@supports (transform-style: preserve-3d){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{transform:translate3d(0, 0, 0)}}.carousel-item-next,.active.carousel-item-right{transform:translateX(100%)}@supports (transform-style: preserve-3d){.carousel-item-next,.active.carousel-item-right{transform:translate3d(100%, 0, 0)}}.carousel-item-prev,.active.carousel-item-left{transform:translateX(-100%)}@supports (transform-style: preserve-3d){.carousel-item-prev,.active.carousel-item-left{transform:translate3d(-100%, 0, 0)}}.carousel-control-prev,.carousel-control-next{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5}.carousel-control-prev:hover,.carousel-control-prev:focus,.carousel-control-next:hover,.carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-prev-icon,.carousel-control-next-icon{display:inline-block;width:20px;height:20px;background:transparent no-repeat center center;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;background-color:rgba(255,255,255,0.5)}.carousel-indicators li::before{position:absolute;top:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li::after{position:absolute;bottom:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline !important}.align-top{vertical-align:top !important}.align-middle{vertical-align:middle !important}.align-bottom{vertical-align:bottom !important}.align-text-bottom{vertical-align:text-bottom !important}.align-text-top{vertical-align:text-top !important}.bg-primary{background-color:#0b57d0 !important}a.bg-primary:hover,a.bg-primary:focus,button.bg-primary:hover,button.bg-primary:focus{background-color:#0843a0 !important}.bg-secondary{background-color:#6c757d !important}a.bg-secondary:hover,a.bg-secondary:focus,button.bg-secondary:hover,button.bg-secondary:focus{background-color:#545b62 !important}.bg-success{background-color:#28a745 !important}a.bg-success:hover,a.bg-success:focus,button.bg-success:hover,button.bg-success:focus{background-color:#1e7e34 !important}.bg-info{background-color:#17a2b8 !important}a.bg-info:hover,a.bg-info:focus,button.bg-info:hover,button.bg-info:focus{background-color:#117a8b !important}.bg-warning{background-color:#ffc107 !important}a.bg-warning:hover,a.bg-warning:focus,button.bg-warning:hover,button.bg-warning:focus{background-color:#d39e00 !important}.bg-danger{background-color:#dc3545 !important}a.bg-danger:hover,a.bg-danger:focus,button.bg-danger:hover,button.bg-danger:focus{background-color:#bd2130 !important}.bg-light{background-color:#f8f9fa !important}a.bg-light:hover,a.bg-light:focus,button.bg-light:hover,button.bg-light:focus{background-color:#dae0e5 !important}.bg-dark{background-color:#343a40 !important}a.bg-dark:hover,a.bg-dark:focus,button.bg-dark:hover,button.bg-dark:focus{background-color:#1d2124 !important}.bg-white{background-color:#fff !important}.bg-transparent{background-color:transparent !important}.border{border:1px solid #dee2e6 !important}.border-top{border-top:1px solid #dee2e6 !important}.border-right{border-right:1px solid #dee2e6 !important}.border-bottom{border-bottom:1px solid #dee2e6 !important}.border-left{border-left:1px solid #dee2e6 !important}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.border-primary{border-color:#0b57d0 !important}.border-secondary{border-color:#6c757d !important}.border-success{border-color:#28a745 !important}.border-info{border-color:#17a2b8 !important}.border-warning{border-color:#ffc107 !important}.border-danger{border-color:#dc3545 !important}.border-light{border-color:#f8f9fa !important}.border-dark{border-color:#343a40 !important}.border-white{border-color:#fff !important}.rounded{border-radius:.25rem !important}.rounded-top{border-top-left-radius:.25rem !important;border-top-right-radius:.25rem !important}.rounded-right{border-top-right-radius:.25rem !important;border-bottom-right-radius:.25rem !important}.rounded-bottom{border-bottom-right-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-left{border-top-left-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-circle{border-radius:50% !important}.rounded-0{border-radius:0 !important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-block{display:block !important}.d-table{display:table !important}.d-table-row{display:table-row !important}.d-table-cell{display:table-cell !important}.d-flex{display:flex !important}.d-inline-flex{display:inline-flex !important}@media (min-width: 576px){.d-sm-none{display:none !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-block{display:block !important}.d-sm-table{display:table !important}.d-sm-table-row{display:table-row !important}.d-sm-table-cell{display:table-cell !important}.d-sm-flex{display:flex !important}.d-sm-inline-flex{display:inline-flex !important}}@media (min-width: 768px){.d-md-none{display:none !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-block{display:block !important}.d-md-table{display:table !important}.d-md-table-row{display:table-row !important}.d-md-table-cell{display:table-cell !important}.d-md-flex{display:flex !important}.d-md-inline-flex{display:inline-flex !important}}@media (min-width: 992px){.d-lg-none{display:none !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-block{display:block !important}.d-lg-table{display:table !important}.d-lg-table-row{display:table-row !important}.d-lg-table-cell{display:table-cell !important}.d-lg-flex{display:flex !important}.d-lg-inline-flex{display:inline-flex !important}}@media print{.d-print-none{display:none !important}.d-print-inline{display:inline !important}.d-print-inline-block{display:inline-block !important}.d-print-block{display:block !important}.d-print-table{display:table !important}.d-print-table-row{display:table-row !important}.d-print-table-cell{display:table-cell !important}.d-print-flex{display:flex !important}.d-print-inline-flex{display:inline-flex !important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.8571428571%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{flex-direction:row !important}.flex-column{flex-direction:column !important}.flex-row-reverse{flex-direction:row-reverse !important}.flex-column-reverse{flex-direction:column-reverse !important}.flex-wrap{flex-wrap:wrap !important}.flex-nowrap{flex-wrap:nowrap !important}.flex-wrap-reverse{flex-wrap:wrap-reverse !important}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.justify-content-between{justify-content:space-between !important}.justify-content-around{justify-content:space-around !important}.align-items-start{align-items:flex-start !important}.align-items-end{align-items:flex-end !important}.align-items-center{align-items:center !important}.align-items-baseline{align-items:baseline !important}.align-items-stretch{align-items:stretch !important}.align-content-start{align-content:flex-start !important}.align-content-end{align-content:flex-end !important}.align-content-center{align-content:center !important}.align-content-between{align-content:space-between !important}.align-content-around{align-content:space-around !important}.align-content-stretch{align-content:stretch !important}.align-self-auto{align-self:auto !important}.align-self-start{align-self:flex-start !important}.align-self-end{align-self:flex-end !important}.align-self-center{align-self:center !important}.align-self-baseline{align-self:baseline !important}.align-self-stretch{align-self:stretch !important}@media (min-width: 576px){.flex-sm-row{flex-direction:row !important}.flex-sm-column{flex-direction:column !important}.flex-sm-row-reverse{flex-direction:row-reverse !important}.flex-sm-column-reverse{flex-direction:column-reverse !important}.flex-sm-wrap{flex-wrap:wrap !important}.flex-sm-nowrap{flex-wrap:nowrap !important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse !important}.justify-content-sm-start{justify-content:flex-start !important}.justify-content-sm-end{justify-content:flex-end !important}.justify-content-sm-center{justify-content:center !important}.justify-content-sm-between{justify-content:space-between !important}.justify-content-sm-around{justify-content:space-around !important}.align-items-sm-start{align-items:flex-start !important}.align-items-sm-end{align-items:flex-end !important}.align-items-sm-center{align-items:center !important}.align-items-sm-baseline{align-items:baseline !important}.align-items-sm-stretch{align-items:stretch !important}.align-content-sm-start{align-content:flex-start !important}.align-content-sm-end{align-content:flex-end !important}.align-content-sm-center{align-content:center !important}.align-content-sm-between{align-content:space-between !important}.align-content-sm-around{align-content:space-around !important}.align-content-sm-stretch{align-content:stretch !important}.align-self-sm-auto{align-self:auto !important}.align-self-sm-start{align-self:flex-start !important}.align-self-sm-end{align-self:flex-end !important}.align-self-sm-center{align-self:center !important}.align-self-sm-baseline{align-self:baseline !important}.align-self-sm-stretch{align-self:stretch !important}}@media (min-width: 768px){.flex-md-row{flex-direction:row !important}.flex-md-column{flex-direction:column !important}.flex-md-row-reverse{flex-direction:row-reverse !important}.flex-md-column-reverse{flex-direction:column-reverse !important}.flex-md-wrap{flex-wrap:wrap !important}.flex-md-nowrap{flex-wrap:nowrap !important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse !important}.justify-content-md-start{justify-content:flex-start !important}.justify-content-md-end{justify-content:flex-end !important}.justify-content-md-center{justify-content:center !important}.justify-content-md-between{justify-content:space-between !important}.justify-content-md-around{justify-content:space-around !important}.align-items-md-start{align-items:flex-start !important}.align-items-md-end{align-items:flex-end !important}.align-items-md-center{align-items:center !important}.align-items-md-baseline{align-items:baseline !important}.align-items-md-stretch{align-items:stretch !important}.align-content-md-start{align-content:flex-start !important}.align-content-md-end{align-content:flex-end !important}.align-content-md-center{align-content:center !important}.align-content-md-between{align-content:space-between !important}.align-content-md-around{align-content:space-around !important}.align-content-md-stretch{align-content:stretch !important}.align-self-md-auto{align-self:auto !important}.align-self-md-start{align-self:flex-start !important}.align-self-md-end{align-self:flex-end !important}.align-self-md-center{align-self:center !important}.align-self-md-baseline{align-self:baseline !important}.align-self-md-stretch{align-self:stretch !important}}@media (min-width: 992px){.flex-lg-row{flex-direction:row !important}.flex-lg-column{flex-direction:column !important}.flex-lg-row-reverse{flex-direction:row-reverse !important}.flex-lg-column-reverse{flex-direction:column-reverse !important}.flex-lg-wrap{flex-wrap:wrap !important}.flex-lg-nowrap{flex-wrap:nowrap !important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse !important}.justify-content-lg-start{justify-content:flex-start !important}.justify-content-lg-end{justify-content:flex-end !important}.justify-content-lg-center{justify-content:center !important}.justify-content-lg-between{justify-content:space-between !important}.justify-content-lg-around{justify-content:space-around !important}.align-items-lg-start{align-items:flex-start !important}.align-items-lg-end{align-items:flex-end !important}.align-items-lg-center{align-items:center !important}.align-items-lg-baseline{align-items:baseline !important}.align-items-lg-stretch{align-items:stretch !important}.align-content-lg-start{align-content:flex-start !important}.align-content-lg-end{align-content:flex-end !important}.align-content-lg-center{align-content:center !important}.align-content-lg-between{align-content:space-between !important}.align-content-lg-around{align-content:space-around !important}.align-content-lg-stretch{align-content:stretch !important}.align-self-lg-auto{align-self:auto !important}.align-self-lg-start{align-self:flex-start !important}.align-self-lg-end{align-self:flex-end !important}.align-self-lg-center{align-self:center !important}.align-self-lg-baseline{align-self:baseline !important}.align-self-lg-stretch{align-self:stretch !important}}.float-left{float:left !important}.float-right{float:right !important}.float-none{float:none !important}@media (min-width: 576px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media (min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media (min-width: 992px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.position-sticky{position:sticky !important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports (position: sticky){.sticky-top{position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;clip-path:inset(50%);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;clip-path:none}.w-25{width:25% !important}.w-50{width:50% !important}.w-75{width:75% !important}.w-100{width:100% !important}.h-25{height:25% !important}.h-50{height:50% !important}.h-75{height:75% !important}.h-100{height:100% !important}.mw-100{max-width:100% !important}.mh-100{max-height:100% !important}.m-0{margin:0 !important}.mt-0,.my-0{margin-top:0 !important}.mr-0,.mx-0{margin-right:0 !important}.mb-0,.my-0{margin-bottom:0 !important}.ml-0,.mx-0{margin-left:0 !important}.m-1{margin:.25rem !important}.mt-1,.my-1{margin-top:.25rem !important}.mr-1,.mx-1{margin-right:.25rem !important}.mb-1,.my-1{margin-bottom:.25rem !important}.ml-1,.mx-1{margin-left:.25rem !important}.m-2{margin:.5rem !important}.mt-2,.my-2{margin-top:.5rem !important}.mr-2,.mx-2{margin-right:.5rem !important}.mb-2,.my-2{margin-bottom:.5rem !important}.ml-2,.mx-2{margin-left:.5rem !important}.m-3{margin:1rem !important}.mt-3,.my-3{margin-top:1rem !important}.mr-3,.mx-3{margin-right:1rem !important}.mb-3,.my-3{margin-bottom:1rem !important}.ml-3,.mx-3{margin-left:1rem !important}.m-4{margin:1.5rem !important}.mt-4,.my-4{margin-top:1.5rem !important}.mr-4,.mx-4{margin-right:1.5rem !important}.mb-4,.my-4{margin-bottom:1.5rem !important}.ml-4,.mx-4{margin-left:1.5rem !important}.m-5{margin:3rem !important}.mt-5,.my-5{margin-top:3rem !important}.mr-5,.mx-5{margin-right:3rem !important}.mb-5,.my-5{margin-bottom:3rem !important}.ml-5,.mx-5{margin-left:3rem !important}.p-0{padding:0 !important}.pt-0,.py-0{padding-top:0 !important}.pr-0,.px-0{padding-right:0 !important}.pb-0,.py-0{padding-bottom:0 !important}.pl-0,.px-0{padding-left:0 !important}.p-1{padding:.25rem !important}.pt-1,.py-1{padding-top:.25rem !important}.pr-1,.px-1{padding-right:.25rem !important}.pb-1,.py-1{padding-bottom:.25rem !important}.pl-1,.px-1{padding-left:.25rem !important}.p-2{padding:.5rem !important}.pt-2,.py-2{padding-top:.5rem !important}.pr-2,.px-2{padding-right:.5rem !important}.pb-2,.py-2{padding-bottom:.5rem !important}.pl-2,.px-2{padding-left:.5rem !important}.p-3{padding:1rem !important}.pt-3,.py-3{padding-top:1rem !important}.pr-3,.px-3{padding-right:1rem !important}.pb-3,.py-3{padding-bottom:1rem !important}.pl-3,.px-3{padding-left:1rem !important}.p-4{padding:1.5rem !important}.pt-4,.py-4{padding-top:1.5rem !important}.pr-4,.px-4{padding-right:1.5rem !important}.pb-4,.py-4{padding-bottom:1.5rem !important}.pl-4,.px-4{padding-left:1.5rem !important}.p-5{padding:3rem !important}.pt-5,.py-5{padding-top:3rem !important}.pr-5,.px-5{padding-right:3rem !important}.pb-5,.py-5{padding-bottom:3rem !important}.pl-5,.px-5{padding-left:3rem !important}.m-auto{margin:auto !important}.mt-auto,.my-auto{margin-top:auto !important}.mr-auto,.mx-auto{margin-right:auto !important}.mb-auto,.my-auto{margin-bottom:auto !important}.ml-auto,.mx-auto{margin-left:auto !important}@media (min-width: 576px){.m-sm-0{margin:0 !important}.mt-sm-0,.my-sm-0{margin-top:0 !important}.mr-sm-0,.mx-sm-0{margin-right:0 !important}.mb-sm-0,.my-sm-0{margin-bottom:0 !important}.ml-sm-0,.mx-sm-0{margin-left:0 !important}.m-sm-1{margin:.25rem !important}.mt-sm-1,.my-sm-1{margin-top:.25rem !important}.mr-sm-1,.mx-sm-1{margin-right:.25rem !important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem !important}.ml-sm-1,.mx-sm-1{margin-left:.25rem !important}.m-sm-2{margin:.5rem !important}.mt-sm-2,.my-sm-2{margin-top:.5rem !important}.mr-sm-2,.mx-sm-2{margin-right:.5rem !important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem !important}.ml-sm-2,.mx-sm-2{margin-left:.5rem !important}.m-sm-3{margin:1rem !important}.mt-sm-3,.my-sm-3{margin-top:1rem !important}.mr-sm-3,.mx-sm-3{margin-right:1rem !important}.mb-sm-3,.my-sm-3{margin-bottom:1rem !important}.ml-sm-3,.mx-sm-3{margin-left:1rem !important}.m-sm-4{margin:1.5rem !important}.mt-sm-4,.my-sm-4{margin-top:1.5rem !important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem !important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem !important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem !important}.m-sm-5{margin:3rem !important}.mt-sm-5,.my-sm-5{margin-top:3rem !important}.mr-sm-5,.mx-sm-5{margin-right:3rem !important}.mb-sm-5,.my-sm-5{margin-bottom:3rem !important}.ml-sm-5,.mx-sm-5{margin-left:3rem !important}.p-sm-0{padding:0 !important}.pt-sm-0,.py-sm-0{padding-top:0 !important}.pr-sm-0,.px-sm-0{padding-right:0 !important}.pb-sm-0,.py-sm-0{padding-bottom:0 !important}.pl-sm-0,.px-sm-0{padding-left:0 !important}.p-sm-1{padding:.25rem !important}.pt-sm-1,.py-sm-1{padding-top:.25rem !important}.pr-sm-1,.px-sm-1{padding-right:.25rem !important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem !important}.pl-sm-1,.px-sm-1{padding-left:.25rem !important}.p-sm-2{padding:.5rem !important}.pt-sm-2,.py-sm-2{padding-top:.5rem !important}.pr-sm-2,.px-sm-2{padding-right:.5rem !important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem !important}.pl-sm-2,.px-sm-2{padding-left:.5rem !important}.p-sm-3{padding:1rem !important}.pt-sm-3,.py-sm-3{padding-top:1rem !important}.pr-sm-3,.px-sm-3{padding-right:1rem !important}.pb-sm-3,.py-sm-3{padding-bottom:1rem !important}.pl-sm-3,.px-sm-3{padding-left:1rem !important}.p-sm-4{padding:1.5rem !important}.pt-sm-4,.py-sm-4{padding-top:1.5rem !important}.pr-sm-4,.px-sm-4{padding-right:1.5rem !important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem !important}.pl-sm-4,.px-sm-4{padding-left:1.5rem !important}.p-sm-5{padding:3rem !important}.pt-sm-5,.py-sm-5{padding-top:3rem !important}.pr-sm-5,.px-sm-5{padding-right:3rem !important}.pb-sm-5,.py-sm-5{padding-bottom:3rem !important}.pl-sm-5,.px-sm-5{padding-left:3rem !important}.m-sm-auto{margin:auto !important}.mt-sm-auto,.my-sm-auto{margin-top:auto !important}.mr-sm-auto,.mx-sm-auto{margin-right:auto !important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto !important}.ml-sm-auto,.mx-sm-auto{margin-left:auto !important}}@media (min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0,.my-md-0{margin-top:0 !important}.mr-md-0,.mx-md-0{margin-right:0 !important}.mb-md-0,.my-md-0{margin-bottom:0 !important}.ml-md-0,.mx-md-0{margin-left:0 !important}.m-md-1{margin:.25rem !important}.mt-md-1,.my-md-1{margin-top:.25rem !important}.mr-md-1,.mx-md-1{margin-right:.25rem !important}.mb-md-1,.my-md-1{margin-bottom:.25rem !important}.ml-md-1,.mx-md-1{margin-left:.25rem !important}.m-md-2{margin:.5rem !important}.mt-md-2,.my-md-2{margin-top:.5rem !important}.mr-md-2,.mx-md-2{margin-right:.5rem !important}.mb-md-2,.my-md-2{margin-bottom:.5rem !important}.ml-md-2,.mx-md-2{margin-left:.5rem !important}.m-md-3{margin:1rem !important}.mt-md-3,.my-md-3{margin-top:1rem !important}.mr-md-3,.mx-md-3{margin-right:1rem !important}.mb-md-3,.my-md-3{margin-bottom:1rem !important}.ml-md-3,.mx-md-3{margin-left:1rem !important}.m-md-4{margin:1.5rem !important}.mt-md-4,.my-md-4{margin-top:1.5rem !important}.mr-md-4,.mx-md-4{margin-right:1.5rem !important}.mb-md-4,.my-md-4{margin-bottom:1.5rem !important}.ml-md-4,.mx-md-4{margin-left:1.5rem !important}.m-md-5{margin:3rem !important}.mt-md-5,.my-md-5{margin-top:3rem !important}.mr-md-5,.mx-md-5{margin-right:3rem !important}.mb-md-5,.my-md-5{margin-bottom:3rem !important}.ml-md-5,.mx-md-5{margin-left:3rem !important}.p-md-0{padding:0 !important}.pt-md-0,.py-md-0{padding-top:0 !important}.pr-md-0,.px-md-0{padding-right:0 !important}.pb-md-0,.py-md-0{padding-bottom:0 !important}.pl-md-0,.px-md-0{padding-left:0 !important}.p-md-1{padding:.25rem !important}.pt-md-1,.py-md-1{padding-top:.25rem !important}.pr-md-1,.px-md-1{padding-right:.25rem !important}.pb-md-1,.py-md-1{padding-bottom:.25rem !important}.pl-md-1,.px-md-1{padding-left:.25rem !important}.p-md-2{padding:.5rem !important}.pt-md-2,.py-md-2{padding-top:.5rem !important}.pr-md-2,.px-md-2{padding-right:.5rem !important}.pb-md-2,.py-md-2{padding-bottom:.5rem !important}.pl-md-2,.px-md-2{padding-left:.5rem !important}.p-md-3{padding:1rem !important}.pt-md-3,.py-md-3{padding-top:1rem !important}.pr-md-3,.px-md-3{padding-right:1rem !important}.pb-md-3,.py-md-3{padding-bottom:1rem !important}.pl-md-3,.px-md-3{padding-left:1rem !important}.p-md-4{padding:1.5rem !important}.pt-md-4,.py-md-4{padding-top:1.5rem !important}.pr-md-4,.px-md-4{padding-right:1.5rem !important}.pb-md-4,.py-md-4{padding-bottom:1.5rem !important}.pl-md-4,.px-md-4{padding-left:1.5rem !important}.p-md-5{padding:3rem !important}.pt-md-5,.py-md-5{padding-top:3rem !important}.pr-md-5,.px-md-5{padding-right:3rem !important}.pb-md-5,.py-md-5{padding-bottom:3rem !important}.pl-md-5,.px-md-5{padding-left:3rem !important}.m-md-auto{margin:auto !important}.mt-md-auto,.my-md-auto{margin-top:auto !important}.mr-md-auto,.mx-md-auto{margin-right:auto !important}.mb-md-auto,.my-md-auto{margin-bottom:auto !important}.ml-md-auto,.mx-md-auto{margin-left:auto !important}}@media (min-width: 992px){.m-lg-0{margin:0 !important}.mt-lg-0,.my-lg-0{margin-top:0 !important}.mr-lg-0,.mx-lg-0{margin-right:0 !important}.mb-lg-0,.my-lg-0{margin-bottom:0 !important}.ml-lg-0,.mx-lg-0{margin-left:0 !important}.m-lg-1{margin:.25rem !important}.mt-lg-1,.my-lg-1{margin-top:.25rem !important}.mr-lg-1,.mx-lg-1{margin-right:.25rem !important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem !important}.ml-lg-1,.mx-lg-1{margin-left:.25rem !important}.m-lg-2{margin:.5rem !important}.mt-lg-2,.my-lg-2{margin-top:.5rem !important}.mr-lg-2,.mx-lg-2{margin-right:.5rem !important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem !important}.ml-lg-2,.mx-lg-2{margin-left:.5rem !important}.m-lg-3{margin:1rem !important}.mt-lg-3,.my-lg-3{margin-top:1rem !important}.mr-lg-3,.mx-lg-3{margin-right:1rem !important}.mb-lg-3,.my-lg-3{margin-bottom:1rem !important}.ml-lg-3,.mx-lg-3{margin-left:1rem !important}.m-lg-4{margin:1.5rem !important}.mt-lg-4,.my-lg-4{margin-top:1.5rem !important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem !important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem !important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem !important}.m-lg-5{margin:3rem !important}.mt-lg-5,.my-lg-5{margin-top:3rem !important}.mr-lg-5,.mx-lg-5{margin-right:3rem !important}.mb-lg-5,.my-lg-5{margin-bottom:3rem !important}.ml-lg-5,.mx-lg-5{margin-left:3rem !important}.p-lg-0{padding:0 !important}.pt-lg-0,.py-lg-0{padding-top:0 !important}.pr-lg-0,.px-lg-0{padding-right:0 !important}.pb-lg-0,.py-lg-0{padding-bottom:0 !important}.pl-lg-0,.px-lg-0{padding-left:0 !important}.p-lg-1{padding:.25rem !important}.pt-lg-1,.py-lg-1{padding-top:.25rem !important}.pr-lg-1,.px-lg-1{padding-right:.25rem !important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem !important}.pl-lg-1,.px-lg-1{padding-left:.25rem !important}.p-lg-2{padding:.5rem !important}.pt-lg-2,.py-lg-2{padding-top:.5rem !important}.pr-lg-2,.px-lg-2{padding-right:.5rem !important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem !important}.pl-lg-2,.px-lg-2{padding-left:.5rem !important}.p-lg-3{padding:1rem !important}.pt-lg-3,.py-lg-3{padding-top:1rem !important}.pr-lg-3,.px-lg-3{padding-right:1rem !important}.pb-lg-3,.py-lg-3{padding-bottom:1rem !important}.pl-lg-3,.px-lg-3{padding-left:1rem !important}.p-lg-4{padding:1.5rem !important}.pt-lg-4,.py-lg-4{padding-top:1.5rem !important}.pr-lg-4,.px-lg-4{padding-right:1.5rem !important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem !important}.pl-lg-4,.px-lg-4{padding-left:1.5rem !important}.p-lg-5{padding:3rem !important}.pt-lg-5,.py-lg-5{padding-top:3rem !important}.pr-lg-5,.px-lg-5{padding-right:3rem !important}.pb-lg-5,.py-lg-5{padding-bottom:3rem !important}.pl-lg-5,.px-lg-5{padding-left:3rem !important}.m-lg-auto{margin:auto !important}.mt-lg-auto,.my-lg-auto{margin-top:auto !important}.mr-lg-auto,.mx-lg-auto{margin-right:auto !important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto !important}.ml-lg-auto,.mx-lg-auto{margin-left:auto !important}}.text-justify{text-align:justify !important}.text-nowrap{white-space:nowrap !important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}@media (min-width: 576px){.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}.text-sm-center{text-align:center !important}}@media (min-width: 768px){.text-md-left{text-align:left !important}.text-md-right{text-align:right !important}.text-md-center{text-align:center !important}}@media (min-width: 992px){.text-lg-left{text-align:left !important}.text-lg-right{text-align:right !important}.text-lg-center{text-align:center !important}}.text-lowercase{text-transform:lowercase !important}.text-uppercase{text-transform:uppercase !important}.text-capitalize{text-transform:capitalize !important}.font-weight-light{font-weight:300 !important}.font-weight-normal{font-weight:400 !important}.font-weight-bold{font-weight:700 !important}.font-italic{font-style:italic !important}.text-white{color:#fff !important}.text-primary{color:#0b57d0 !important}a.text-primary:hover,a.text-primary:focus{color:#0843a0 !important}.text-secondary{color:#6c757d !important}a.text-secondary:hover,a.text-secondary:focus{color:#545b62 !important}.text-success{color:#28a745 !important}a.text-success:hover,a.text-success:focus{color:#1e7e34 !important}.text-info{color:#17a2b8 !important}a.text-info:hover,a.text-info:focus{color:#117a8b !important}.text-warning{color:#ffc107 !important}a.text-warning:hover,a.text-warning:focus{color:#d39e00 !important}.text-danger{color:#dc3545 !important}a.text-danger:hover,a.text-danger:focus{color:#bd2130 !important}.text-light{color:#f8f9fa !important}a.text-light:hover,a.text-light:focus{color:#dae0e5 !important}.text-dark{color:#343a40 !important}a.text-dark:hover,a.text-dark:focus{color:#1d2124 !important}.text-muted{color:#6c757d !important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.visible{visibility:visible !important}.invisible{visibility:hidden !important}@media print{*,*::before,*::after{text-shadow:none !important;box-shadow:none !important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap !important}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px !important}.container{min-width:992px !important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}#main-nav{padding:0.75rem 0.25rem}#main-nav>.container-fluid{padding-left:15px;padding-right:15px}#main-nav .navbar-brand{font-size:1.1rem;line-height:24px;display:flex;align-items:center}#main-nav .navbar-brand a{color:#000;font-family:"Google Sans Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:22px;font-style:normal;font-weight:400}#main-nav .navbar-brand a:hover{text-decoration:none}#main-nav .navbar-brand a{color:#000;font-size:22px;font-style:normal;font-weight:400}#main-nav .navbar-brand span{margin-left:0.35rem}#main-nav .navbar-brand span.separator{font-weight:600}#main-nav .navbar-brand span a{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:200}#main-header #main-header-logo{display:flex;align-items:center}#main-header #main-header-logo img{height:28px;margin-right:12px}.main-content{margin:3rem auto 6rem}#main-header #___gcse_0{width:200px}#main-header .gsib_a{padding:3px 9px 3px 9px}#main-header .gsib_b{display:none}#main-header .gsc-input-box{border:none}#main-header form.gsc-search-box,#main-header table.gsc-search-box{margin-bottom:0}#main-header table.gsc-search-box td.gsc-input{padding-right:0}#main-header .gsc-search-button.gsc-search-button-v2{background:var(--gm-3-ref-neutral-neutral-90) !important;border-radius:0 10px 10px 0;border:none !important;margin:0 0 1px 0;padding:10px 10px 9px 8px}#main-header .gsc-search-button.gsc-search-button-v2 svg{fill:var(--gm-3-ref-neutral-neutral-20)}#main-header #gsc-iw-id1{border-radius:10px 0 0 10px;border:1px solid #dee2e6;padding:0}#main-header #gs_tti50 input{background:none !important}#main-header{background:var(--dc-header-background);box-shadow:0px 2px 3px rgba(0,0,0,0.1)}#main-nav .nav-item a{color:var(--gm-3-ref-neutral-neutral-40)}#main-nav .nav-item a:hover{text-decoration:none}#main-header .nav-item.dropdown{margin-right:1rem}#main-nav .dropdown-item,#main-nav .nav-link{font-size:14px;font-weight:400;line-height:24px}#main-nav .dropdown-item.active,.dropdown-item:active{background:var(--gm-3-ref-neutral-neutral-80)}#main-footer{background:#fafcff;padding-top:75px;box-shadow:0 50vh 0 50vh var(--footer-bg)}#main-footer .top-footer{padding-bottom:30px}#main-footer{border-top:1px solid #dee2e6;color:var(--gm-3-ref-neutral-neutral-20);font-size:18px}#main-footer a{align-items:center;color:var(--gm-3-sys-light-primary);flex-direction:row;font-size:14px;font-weight:500;line-height:20px;padding:10px 0px}#main-footer a .material-icons-outlined{font-size:12px;margin-right:8px;text-decoration:none}#main-footer a:hover{text-decoration:none}#main-footer a:hover span:last-child{text-decoration:underline}#main-footer #sub-footer{align-items:center;background:var(--footer-bg);display:flex;flex-direction:row;justify-content:space-between;padding:26px 31px;line-height:2.5rem;height:fit-content}@media (max-width: 640px){#main-footer #sub-footer{align-items:center;flex-direction:column}}.brand-byline{display:flex;flex-direction:row;align-items:center;color:var(--gm-3-ref-neutral-neutral-40)}.brand-byline .brand-text{font-size:0.75em;font-weight:400;letter-spacing:0.05em;text-transform:uppercase}.brand-byline .brand-logo{margin-left:0.3em;margin-top:-0.2em;height:1.4em}#sub-footer .sub-footer-links{display:flex;flex-direction:row;align-items:center}#sub-footer .sub-footer-links a{color:var(--gm-3-ref-neutral-neutral-40);font-size:14px;font-style:normal;font-weight:400;line-height:20px}#sub-footer .sub-footer-links a:hover{text-decoration:underline}#sub-footer .btn,#sub-footer a{margin-right:0.75rem}#sub-footer a:last-of-type{margin-right:0}#sidebar a{color:var(--dc-gray);font-size:0.9rem}#sidebar a.active{font-weight:600}#sidebar .parent>summary>a{color:var(--link-color)}#sidebar summary{cursor:pointer;list-style:none}#sidebar summary::-webkit-details-marker{display:none}#sidebar details[open]>summary>svg{transform:rotate(180deg) scaleX(-1)}#sidebar svg{vertical-align:middle}#sidebar ul{list-style:none;padding-left:0;margin-bottom:0}#sidebar li{margin:0.25rem 0}#sidebar details{padding:0.2rem 0}#sidebar .parent>ul{padding-left:1rem}#sidebar .child>ul{border-left:1px solid lightgray;padding-left:1rem;margin:0.5rem 0}pre{padding:1rem;background-color:#f5f6fa;border:#ccc;border-radius:3px}code{padding:0.2em 0.15em;font-weight:400;background-color:#f5f6fa;border:1px solid #eeebee;border-radius:4px;color:inherit}pre code{border:none}h1{margin-bottom:1.5rem}h2,h3,h4,h5,h6{margin-top:1.5em;margin-bottom:.5em}h1,h2{border-bottom:1px solid #e9ecef;padding-bottom:.25rem}h1+h2{border-bottom:none;margin-top:.5rem;margin-bottom:1.5rem}h1+h2 code{font-size:1.2rem;background-color:var(--dc-red-fade)}main img{border:1px solid rgba(0,0,0,0.1);border-radius:5px;margin:.5em auto}main blockquote{padding:1.25rem 1.25rem .25rem;margin:1.25rem auto;border:1px solid #eee;border-left-width:.25rem;border-radius:.25rem;border-left-color:#28a745;background:#f0fff3}main th,main td{border:1px solid #ccc;padding:.25rem 1rem}main th{background:#f5f6fa}main table{margin-bottom:1rem}#markdown-toc{background:var(--light);padding:1rem 2rem;border-radius:5px}.highlight .hll{background-color:#ffc}.highlight .c{color:#60a0b0;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{color:#007020;font-weight:bold}.highlight .o{color:#666}.highlight .cm{color:#60a0b0;font-style:italic}.highlight .cp{color:#007020}.highlight .c1{color:#60a0b0;font-style:italic}.highlight .cs{color:#60a0b0;background-color:#fff0f0}.highlight .gd{color:#A00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:#000080;font-weight:bold}.highlight .gi{color:#00A000}.highlight .go{color:gray}.highlight .gp{color:#c65d09;font-weight:bold}.highlight .gs{font-weight:bold}.highlight .gu{color:#800080;font-weight:bold}.highlight .gt{color:#0040D0}.highlight .kc{color:#007020;font-weight:bold}.highlight .kd{color:#007020;font-weight:bold}.highlight .kn{color:#007020;font-weight:bold}.highlight .kp{color:#007020}.highlight .kr{color:#007020;font-weight:bold}.highlight .kt{color:#902000}.highlight .m{color:#40a070}.highlight .s{color:#4070a0}.highlight .na{color:#4070a0}.highlight .nb{color:#007020}.highlight .nc{color:#0e84b5;font-weight:bold}.highlight .no{color:#60add5}.highlight .nd{color:#555555;font-weight:bold}.highlight .ni{color:#d55537;font-weight:bold}.highlight .ne{color:#007020}.highlight .nf{color:#06287e}.highlight .nl{color:#002070;font-weight:bold}.highlight .nn{color:#0e84b5;font-weight:bold}.highlight .nt{color:#062873;font-weight:bold}.highlight .nv{color:#bb60d5}.highlight .ow{color:#007020;font-weight:bold}.highlight .w{color:#bbb}.highlight .mf{color:#40a070}.highlight .mh{color:#40a070}.highlight .mi{color:#40a070}.highlight .mo{color:#40a070}.highlight .sb{color:#4070a0}.highlight .sc{color:#4070a0}.highlight .sd{color:#4070a0;font-style:italic}.highlight .s2{color:#4070a0}.highlight .se{color:#4070a0;font-weight:bold}.highlight .sh{color:#4070a0}.highlight .si{color:#70a0d0;font-style:italic}.highlight .sx{color:#c65d09}.highlight .sr{color:#235388}.highlight .s1{color:#4070a0}.highlight .ss{color:#517918}.highlight .bp{color:#007020}.highlight .vc{color:#bb60d5}.highlight .vg{color:#bb60d5}.highlight .vi{color:#bb60d5}.highlight .il{color:#40a070}.blog-posts{padding-left:0;list-style-type:none}.blog-posts h2{margin-top:0}.blog-posts>li{margin-bottom:4rem}.blog-byline{color:var(--dc-gray);text-transform:uppercase;font-size:1rem}.blog-content img{max-width:100%}required-tag,optional-tag,bulk-tag{border-radius:4px;font:normal 0.85em monospace;padding:1px 6px;text-transform:uppercase}.api-header,.api-tab,.example-box-title{border:1px solid var(--dc-gray-lite);border-top-left-radius:10px;border-top-right-radius:10px;margin-bottom:0}.api-syntax-box,.api-tabcontent,.example-box-content{border:1px solid var(--dc-gray-lite);border-top:none;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.api-syntax-box,.api-tabcontent,.response-signature,.example-box-content{background:#f5f6fa;font:normal .9em monospace;line-height:1.5em}.api-syntax-box .err,.api-tabcontent .err,.response-signature .err,.example-box-content .err{border:none}required-tag{background-color:#0e84b5;color:white}optional-tag{background-color:white;border:1px solid #0e84b5;color:#0e84b5}bulk-tag{background-color:#5cb85c;color:white}.param{color:#ff686b;font-family:monospace;font-weight:bold}.keyword{color:#062873;font-family:monospace;font-weight:bold}.api-header{background-color:#f1f1f1;font-size:17px;filter:drop-shadow(0 0 0.2em rgba(0,0,0,0.1));padding:10px 20px}.api-syntax-box,.api-tabcontent{filter:drop-shadow(0 0 0.2em rgba(0,0,0,0.1));color:#0e84b5;overflow-wrap:break-word;white-space:pre-wrap}.api-signature{padding:20px;padding-top:0}.api-tab{background-color:#f1f1f1;filter:drop-shadow(0 0 0.2em rgba(0,0,0,0.1));overflow:hidden}.api-tab button{background-color:inherit;border:none;cursor:pointer;font-size:17px;outline:none;padding:14px 16px;transition:0.3s}.api-tab button:hover{background-color:#ddd}.api-tab button.active{background-color:#ccc}.api-tabcontent{display:none}.api-tabcontent pre{border-bottom-left-radius:10px;border-bottom-right-radius:10px;margin-bottom:0}.response-signature{border-radius:10px;overflow:hidden}.response-signature pre,.response-signature code{margin-bottom:0;max-height:40em;overflow:auto}.doc-table{border-collapse:collapse;width:100%}.doc-table td:nth-child(1){color:#062873;font-family:monospace;font-size:0.9em;font-weight:bold}.example-box-title{background-color:#a3a8bb;color:white;font-family:sans-serif;font-size:0.75em;margin-top:0.5em;padding:0.35em 0.5em 0.35em 0.75em;text-transform:uppercase}.example-box-content{max-height:20em;overflow:hidden;scrollbar-color:var(--dc-gray-lite);scrollbar-width:5px}.example-box-content pre{max-height:20em;overflow-wrap:break-word;overflow-y:auto;line-height:1.5}.example-box-content .highlight{margin-bottom:0px}.scroll pre{scrollbar-color:var(--dc-gray-lite);scrollbar-width:5px}.scroll pre::-webkit-scrollbar{height:5px;width:5px}.scroll pre::-webkit-scrollbar-thumb{background-color:#d2d3d8}.scroll pre::-webkit-scrollbar-corner{background-color:transparent}.alert{font-size:1em;color:black}.exclamation-icon{background:var(--dc-red-lite);color:white;font-size:0.8em;margin-right:0.5em;padding-right:0}.web-component-container{width:100%;max-width:800px;margin-right:auto}.gcp-tab-group{margin-bottom:20px;border:1px solid #ccc}.gcp-tab-headers{list-style:none;padding:0;margin:0;border-bottom:1px solid #ccc}.gcp-tab-headers li{display:inline-block;padding:10px 20px;cursor:pointer}.gcp-tab-headers .active{border-bottom:4px solid #1e87f0;font-weight:bold}.gcp-tab-content div{display:none;padding:20px}.gcp-tab-content .active{display:block;padding:20px}.gcp-tab-content>*{display:initial}#main-doc-content{margin:2rem 2rem 5rem;min-height:80vh}#main-side-nav{border-right:1px solid #e0e0e0;background:#f5f5f5;padding-top:2rem;padding-bottom:2rem}#main-footer{margin-top:0 !important;padding-top:0 !important}#main-footer #sub-footer{border-top:none !important}#main-breadcrumb .breadcrumb{background:none;padding:0;font-size:1rem}#main-breadcrumb .active,#main-breadcrumb .breadcrumb-item+.breadcrumb-item::before{color:var(--dc-gray)} diff --git a/assets/examples/web-components/all-charts.html b/assets/examples/web-components/all-charts.html new file mode 100644 index 000000000..bbe19fae4 --- /dev/null +++ b/assets/examples/web-components/all-charts.html @@ -0,0 +1,415 @@ + + + + + + +

Datacommons Web Components

+

Bar Chart

+ +

(top 15 places)

+

+ Custom footer here. This is a long custom footer. Lorem ipsum dolor sit + amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum + dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+
+ + + + + + + + + +

Pie/Donut

+ +
+
    +
  • custom footer item 1
  • +
  • custom footer item 2
  • +
+
+
+ +

Gauge

+ +

Highlight

+ + + + + + +

Map

+ + + + + +

UN Map Comparisons

+ + +

Map with year slider

+ + +

Ranking

+ + +

Line

+ + + + + + + + + + +

Lollipop

+ + + + + + +

Scatter

+ + + + diff --git a/assets/examples/web-components/dynamic-map.html b/assets/examples/web-components/dynamic-map.html new file mode 100644 index 000000000..6fe0c4011 --- /dev/null +++ b/assets/examples/web-components/dynamic-map.html @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + +
+ +

Map Web Components

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
Example stat vars
+
    +
  • Count_Person
  • +
  • Count_Person_PerArea
  • +
  • LifeExpectancy_Person
  • +
+
+
+
Example country DCIDs
+
    +
  • country/USA
  • +
  • country/GBR
  • +
  • country/FRA
  • +
  • country/DEU
  • +
  • geoId/12 (Florida)
  • +
  • geoId/15 (Hawaii)
  • +
  • Earth
  • +
+
+
+
Example enclosed place
+
    +
  • State
  • +
  • County
  • +
  • City
  • +
  • EurostatNUTS1
  • +
  • EurostatNUTS2
  • +
+
+
+
+ + diff --git a/assets/examples/web-components/line-chart.html b/assets/examples/web-components/line-chart.html new file mode 100644 index 000000000..2e139b160 --- /dev/null +++ b/assets/examples/web-components/line-chart.html @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/assets/examples/web-components/map-styles.html b/assets/examples/web-components/map-styles.html new file mode 100644 index 000000000..5ed8c60ba --- /dev/null +++ b/assets/examples/web-components/map-styles.html @@ -0,0 +1,47 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/images/custom_dc/analytics1.png b/assets/images/custom_dc/analytics1.png new file mode 100644 index 000000000..75393cba6 Binary files /dev/null and b/assets/images/custom_dc/analytics1.png differ diff --git a/assets/images/custom_dc/analytics2.png b/assets/images/custom_dc/analytics2.png new file mode 100644 index 000000000..949c05e5b Binary files /dev/null and b/assets/images/custom_dc/analytics2.png differ diff --git a/assets/images/custom_dc/analytics3.png b/assets/images/custom_dc/analytics3.png new file mode 100644 index 000000000..49b414547 Binary files /dev/null and b/assets/images/custom_dc/analytics3.png differ diff --git a/assets/images/custom_dc/customdc_screenshot1.png b/assets/images/custom_dc/customdc_screenshot1.png new file mode 100644 index 000000000..78d8a197b Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot1.png differ diff --git a/assets/images/custom_dc/customdc_screenshot10.png b/assets/images/custom_dc/customdc_screenshot10.png new file mode 100644 index 000000000..77b575c36 Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot10.png differ diff --git a/assets/images/custom_dc/customdc_screenshot2.png b/assets/images/custom_dc/customdc_screenshot2.png new file mode 100644 index 000000000..a1664ef3d Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot2.png differ diff --git a/assets/images/custom_dc/customdc_screenshot3.png b/assets/images/custom_dc/customdc_screenshot3.png new file mode 100644 index 000000000..362df245b Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot3.png differ diff --git a/assets/images/custom_dc/customdc_screenshot3a.png b/assets/images/custom_dc/customdc_screenshot3a.png new file mode 100644 index 000000000..c1462de0d Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot3a.png differ diff --git a/assets/images/custom_dc/customdc_screenshot4.png b/assets/images/custom_dc/customdc_screenshot4.png new file mode 100644 index 000000000..390fac3c7 Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot4.png differ diff --git a/assets/images/custom_dc/customdc_screenshot5.png b/assets/images/custom_dc/customdc_screenshot5.png new file mode 100644 index 000000000..d4f82eb7a Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot5.png differ diff --git a/assets/images/custom_dc/customdc_screenshot6.png b/assets/images/custom_dc/customdc_screenshot6.png new file mode 100644 index 000000000..eb7d00d55 Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot6.png differ diff --git a/assets/images/custom_dc/customdc_screenshot7.png b/assets/images/custom_dc/customdc_screenshot7.png new file mode 100644 index 000000000..fde57f35d Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot7.png differ diff --git a/assets/images/custom_dc/customdc_screenshot8.png b/assets/images/custom_dc/customdc_screenshot8.png new file mode 100644 index 000000000..878fcd2b9 Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot8.png differ diff --git a/assets/images/custom_dc/customdc_screenshot9.png b/assets/images/custom_dc/customdc_screenshot9.png new file mode 100644 index 000000000..bf179b01a Binary files /dev/null and b/assets/images/custom_dc/customdc_screenshot9.png differ diff --git a/assets/images/custom_dc/customdc_setup1.png b/assets/images/custom_dc/customdc_setup1.png new file mode 100644 index 000000000..7ac8003d8 Binary files /dev/null and b/assets/images/custom_dc/customdc_setup1.png differ diff --git a/assets/images/custom_dc/customdc_setup2.png b/assets/images/custom_dc/customdc_setup2.png new file mode 100644 index 000000000..134f7b1b2 Binary files /dev/null and b/assets/images/custom_dc/customdc_setup2.png differ diff --git a/assets/images/custom_dc/customdc_setup3.png b/assets/images/custom_dc/customdc_setup3.png new file mode 100644 index 000000000..954fd1332 Binary files /dev/null and b/assets/images/custom_dc/customdc_setup3.png differ diff --git a/assets/images/custom_dc/customdc_setup4.png b/assets/images/custom_dc/customdc_setup4.png new file mode 100644 index 000000000..d288e5978 Binary files /dev/null and b/assets/images/custom_dc/customdc_setup4.png differ diff --git a/assets/images/custom_dc/gcp_screenshot1.png b/assets/images/custom_dc/gcp_screenshot1.png new file mode 100644 index 000000000..75cd453a9 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot1.png differ diff --git a/assets/images/custom_dc/gcp_screenshot2.png b/assets/images/custom_dc/gcp_screenshot2.png new file mode 100644 index 000000000..a879e3c8c Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot2.png differ diff --git a/assets/images/custom_dc/gcp_screenshot3.png b/assets/images/custom_dc/gcp_screenshot3.png new file mode 100644 index 000000000..f55ed0784 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot3.png differ diff --git a/assets/images/custom_dc/gcp_screenshot5.png b/assets/images/custom_dc/gcp_screenshot5.png new file mode 100644 index 000000000..5f1679bd3 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot5.png differ diff --git a/assets/images/custom_dc/gcp_screenshot6.png b/assets/images/custom_dc/gcp_screenshot6.png new file mode 100644 index 000000000..3f87714e3 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot6.png differ diff --git a/assets/images/custom_dc/gcp_screenshot7.png b/assets/images/custom_dc/gcp_screenshot7.png new file mode 100644 index 000000000..351a30928 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot7.png differ diff --git a/assets/images/custom_dc/gcp_screenshot8.png b/assets/images/custom_dc/gcp_screenshot8.png new file mode 100644 index 000000000..57a2b4457 Binary files /dev/null and b/assets/images/custom_dc/gcp_screenshot8.png differ diff --git a/assets/images/dc-logo-old.svg b/assets/images/dc-logo-old.svg new file mode 100644 index 000000000..7066cbbe8 --- /dev/null +++ b/assets/images/dc-logo-old.svg @@ -0,0 +1,9 @@ + + + diff --git a/assets/images/dc-logo.svg b/assets/images/dc-logo.svg new file mode 100644 index 000000000..466ca800d --- /dev/null +++ b/assets/images/dc-logo.svg @@ -0,0 +1,9 @@ + + + diff --git a/assets/images/dc/bq1.png b/assets/images/dc/bq1.png new file mode 100644 index 000000000..00f5562a7 Binary files /dev/null and b/assets/images/dc/bq1.png differ diff --git a/assets/images/dc/bq2.png b/assets/images/dc/bq2.png new file mode 100644 index 000000000..4899e0933 Binary files /dev/null and b/assets/images/dc/bq2.png differ diff --git a/assets/images/dc/concept1.png b/assets/images/dc/concept1.png new file mode 100644 index 000000000..45d92fcdc Binary files /dev/null and b/assets/images/dc/concept1.png differ diff --git a/assets/images/dc/concept10.png b/assets/images/dc/concept10.png new file mode 100644 index 000000000..7d7901f83 Binary files /dev/null and b/assets/images/dc/concept10.png differ diff --git a/assets/images/dc/concept11.png b/assets/images/dc/concept11.png new file mode 100644 index 000000000..84197a061 Binary files /dev/null and b/assets/images/dc/concept11.png differ diff --git a/assets/images/dc/concept12.png b/assets/images/dc/concept12.png new file mode 100644 index 000000000..23dae9e21 Binary files /dev/null and b/assets/images/dc/concept12.png differ diff --git a/assets/images/dc/concept13.png b/assets/images/dc/concept13.png new file mode 100644 index 000000000..3e4090056 Binary files /dev/null and b/assets/images/dc/concept13.png differ diff --git a/assets/images/dc/concept14.png b/assets/images/dc/concept14.png new file mode 100644 index 000000000..d82ed0fda Binary files /dev/null and b/assets/images/dc/concept14.png differ diff --git a/assets/images/dc/concept2.png b/assets/images/dc/concept2.png new file mode 100644 index 000000000..8d0480194 Binary files /dev/null and b/assets/images/dc/concept2.png differ diff --git a/assets/images/dc/concept4.png b/assets/images/dc/concept4.png new file mode 100644 index 000000000..32d0ef7d1 Binary files /dev/null and b/assets/images/dc/concept4.png differ diff --git a/assets/images/dc/concept5.png b/assets/images/dc/concept5.png new file mode 100644 index 000000000..cdc134bab Binary files /dev/null and b/assets/images/dc/concept5.png differ diff --git a/assets/images/dc/concept6.png b/assets/images/dc/concept6.png new file mode 100644 index 000000000..277bcc493 Binary files /dev/null and b/assets/images/dc/concept6.png differ diff --git a/assets/images/dc/concept7.png b/assets/images/dc/concept7.png new file mode 100644 index 000000000..83e213ded Binary files /dev/null and b/assets/images/dc/concept7.png differ diff --git a/assets/images/dc/concept8.png b/assets/images/dc/concept8.png new file mode 100644 index 000000000..6b07efab6 Binary files /dev/null and b/assets/images/dc/concept8.png differ diff --git a/assets/images/dc/concept9.png b/assets/images/dc/concept9.png new file mode 100644 index 000000000..3a04993dc Binary files /dev/null and b/assets/images/dc/concept9.png differ diff --git a/assets/images/dc/dcoverview1.png b/assets/images/dc/dcoverview1.png new file mode 100644 index 000000000..d6ae8c8cf Binary files /dev/null and b/assets/images/dc/dcoverview1.png differ diff --git a/assets/images/example_schema_mapping_diagram.png b/assets/images/example_schema_mapping_diagram.png new file mode 100644 index 000000000..79279278e Binary files /dev/null and b/assets/images/example_schema_mapping_diagram.png differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 000000000..331f1a5b5 Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/assets/images/favicon.png b/assets/images/favicon.png new file mode 100644 index 000000000..881d606ce Binary files /dev/null and b/assets/images/favicon.png differ diff --git a/assets/images/google-logo.svg b/assets/images/google-logo.svg new file mode 100644 index 000000000..f8d159fb3 --- /dev/null +++ b/assets/images/google-logo.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + diff --git a/assets/images/home_graph.svg b/assets/images/home_graph.svg new file mode 100644 index 000000000..93bc0d126 --- /dev/null +++ b/assets/images/home_graph.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/posts/download_tool.png b/assets/images/posts/download_tool.png new file mode 100644 index 000000000..3dd39a5a1 Binary files /dev/null and b/assets/images/posts/download_tool.png differ diff --git a/assets/images/rest/date_time_example1.png b/assets/images/rest/date_time_example1.png new file mode 100644 index 000000000..239de383f Binary files /dev/null and b/assets/images/rest/date_time_example1.png differ diff --git a/assets/images/rest/date_time_example2.png b/assets/images/rest/date_time_example2.png new file mode 100644 index 000000000..63b6a51eb Binary files /dev/null and b/assets/images/rest/date_time_example2.png differ diff --git a/assets/images/rest/date_time_example3.png b/assets/images/rest/date_time_example3.png new file mode 100644 index 000000000..fcc895063 Binary files /dev/null and b/assets/images/rest/date_time_example3.png differ diff --git a/assets/images/rest/property_value_direction_example.png b/assets/images/rest/property_value_direction_example.png new file mode 100644 index 000000000..71f3c2732 Binary files /dev/null and b/assets/images/rest/property_value_direction_example.png differ diff --git a/assets/images/sheets/home_page_demo.png b/assets/images/sheets/home_page_demo.png new file mode 100644 index 000000000..793b1a057 Binary files /dev/null and b/assets/images/sheets/home_page_demo.png differ diff --git a/assets/images/sheets/sheets_get_cohort_members_input.png b/assets/images/sheets/sheets_get_cohort_members_input.png new file mode 100644 index 000000000..bf7c1d702 Binary files /dev/null and b/assets/images/sheets/sheets_get_cohort_members_input.png differ diff --git a/assets/images/sheets/sheets_get_cohort_members_output.png b/assets/images/sheets/sheets_get_cohort_members_output.png new file mode 100644 index 000000000..421deddea Binary files /dev/null and b/assets/images/sheets/sheets_get_cohort_members_output.png differ diff --git a/assets/images/sheets/sheets_get_name_california.png b/assets/images/sheets/sheets_get_name_california.png new file mode 100644 index 000000000..bba78338b Binary files /dev/null and b/assets/images/sheets/sheets_get_name_california.png differ diff --git a/assets/images/sheets/sheets_get_name_no_input_cropped.png b/assets/images/sheets/sheets_get_name_no_input_cropped.png new file mode 100644 index 000000000..fc403b9bc Binary files /dev/null and b/assets/images/sheets/sheets_get_name_no_input_cropped.png differ diff --git a/assets/images/sheets/sheets_get_name_power_plant.png b/assets/images/sheets/sheets_get_name_power_plant.png new file mode 100644 index 000000000..c68823bc9 Binary files /dev/null and b/assets/images/sheets/sheets_get_name_power_plant.png differ diff --git a/assets/images/sheets/sheets_get_name_sv.png b/assets/images/sheets/sheets_get_name_sv.png new file mode 100644 index 000000000..932218ded Binary files /dev/null and b/assets/images/sheets/sheets_get_name_sv.png differ diff --git a/assets/images/sheets/sheets_get_name_wrong_dcid_cropped.png b/assets/images/sheets/sheets_get_name_wrong_dcid_cropped.png new file mode 100644 index 000000000..f9bfbad3f Binary files /dev/null and b/assets/images/sheets/sheets_get_name_wrong_dcid_cropped.png differ diff --git a/assets/images/sheets/sheets_get_property_austrobaileyales_order.png b/assets/images/sheets/sheets_get_property_austrobaileyales_order.png new file mode 100644 index 000000000..fc3ff98b6 Binary files /dev/null and b/assets/images/sheets/sheets_get_property_austrobaileyales_order.png differ diff --git a/assets/images/sheets/sheets_get_property_bad_args.png b/assets/images/sheets/sheets_get_property_bad_args.png new file mode 100644 index 000000000..5fc5be6dd Binary files /dev/null and b/assets/images/sheets/sheets_get_property_bad_args.png differ diff --git a/assets/images/sheets/sheets_get_property_bad_dcid.png b/assets/images/sheets/sheets_get_property_bad_dcid.png new file mode 100644 index 000000000..0e59adf79 Binary files /dev/null and b/assets/images/sheets/sheets_get_property_bad_dcid.png differ diff --git a/assets/images/sheets/sheets_get_property_bad_property.png b/assets/images/sheets/sheets_get_property_bad_property.png new file mode 100644 index 000000000..e1548bbd3 Binary files /dev/null and b/assets/images/sheets/sheets_get_property_bad_property.png differ diff --git a/assets/images/sheets/sheets_get_property_empty_dcid.png b/assets/images/sheets/sheets_get_property_empty_dcid.png new file mode 100644 index 000000000..77d216110 Binary files /dev/null and b/assets/images/sheets/sheets_get_property_empty_dcid.png differ diff --git a/assets/images/sheets/sheets_get_property_ivory_coast.png b/assets/images/sheets/sheets_get_property_ivory_coast.png new file mode 100644 index 000000000..ff4df7af5 Binary files /dev/null and b/assets/images/sheets/sheets_get_property_ivory_coast.png differ diff --git a/assets/images/sheets/sheets_get_property_school_addresses.png b/assets/images/sheets/sheets_get_property_school_addresses.png new file mode 100644 index 000000000..6088a337b Binary files /dev/null and b/assets/images/sheets/sheets_get_property_school_addresses.png differ diff --git a/assets/images/sheets/sheets_get_variable_incorrect_args.png b/assets/images/sheets/sheets_get_variable_incorrect_args.png new file mode 100644 index 000000000..a52191979 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_incorrect_args.png differ diff --git a/assets/images/sheets/sheets_get_variable_input.png b/assets/images/sheets/sheets_get_variable_input.png new file mode 100644 index 000000000..3b248fca0 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_input.png differ diff --git a/assets/images/sheets/sheets_get_variable_nonexistent_dcid.png b/assets/images/sheets/sheets_get_variable_nonexistent_dcid.png new file mode 100644 index 000000000..b7563a96c Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_nonexistent_dcid.png differ diff --git a/assets/images/sheets/sheets_get_variable_one_place_multiple_years_input.png b/assets/images/sheets/sheets_get_variable_one_place_multiple_years_input.png new file mode 100644 index 000000000..6195b1082 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_one_place_multiple_years_input.png differ diff --git a/assets/images/sheets/sheets_get_variable_one_place_multiple_years_output.png b/assets/images/sheets/sheets_get_variable_one_place_multiple_years_output.png new file mode 100644 index 000000000..db1656010 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_one_place_multiple_years_output.png differ diff --git a/assets/images/sheets/sheets_get_variable_output.png b/assets/images/sheets/sheets_get_variable_output.png new file mode 100644 index 000000000..fc2073173 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_output.png differ diff --git a/assets/images/sheets/sheets_get_variable_places_column_years_row_input.png b/assets/images/sheets/sheets_get_variable_places_column_years_row_input.png new file mode 100644 index 000000000..c9c180119 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_places_column_years_row_input.png differ diff --git a/assets/images/sheets/sheets_get_variable_places_column_years_row_output.png b/assets/images/sheets/sheets_get_variable_places_column_years_row_output.png new file mode 100644 index 000000000..1a29802ee Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_places_column_years_row_output.png differ diff --git a/assets/images/sheets/sheets_get_variable_places_row_years_column_input.png b/assets/images/sheets/sheets_get_variable_places_row_years_column_input.png new file mode 100644 index 000000000..a9c1650f7 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_places_row_years_column_input.png differ diff --git a/assets/images/sheets/sheets_get_variable_places_row_years_column_output.png b/assets/images/sheets/sheets_get_variable_places_row_years_column_output.png new file mode 100644 index 000000000..ecc1553e4 Binary files /dev/null and b/assets/images/sheets/sheets_get_variable_places_row_years_column_output.png differ diff --git a/assets/images/sheets/sheets_menu_bar.png b/assets/images/sheets/sheets_menu_bar.png new file mode 100644 index 000000000..d645dc394 Binary files /dev/null and b/assets/images/sheets/sheets_menu_bar.png differ diff --git a/assets/images/sheets/sheets_places_in_bad_dcid.png b/assets/images/sheets/sheets_places_in_bad_dcid.png new file mode 100644 index 000000000..0e2f443e3 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_bad_dcid.png differ diff --git a/assets/images/sheets/sheets_places_in_bad_place_type.png b/assets/images/sheets/sheets_places_in_bad_place_type.png new file mode 100644 index 000000000..84f9c6d8b Binary files /dev/null and b/assets/images/sheets/sheets_places_in_bad_place_type.png differ diff --git a/assets/images/sheets/sheets_places_in_bad_property.png b/assets/images/sheets/sheets_places_in_bad_property.png new file mode 100644 index 000000000..191d42d22 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_bad_property.png differ diff --git a/assets/images/sheets/sheets_places_in_congressional_districts_ak_hi.png b/assets/images/sheets/sheets_places_in_congressional_districts_ak_hi.png new file mode 100644 index 000000000..28816cc39 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_congressional_districts_ak_hi.png differ diff --git a/assets/images/sheets/sheets_places_in_counties_in_delaware.png b/assets/images/sheets/sheets_places_in_counties_in_delaware.png new file mode 100644 index 000000000..ed1e39a42 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_counties_in_delaware.png differ diff --git a/assets/images/sheets/sheets_places_in_empty_cell.png b/assets/images/sheets/sheets_places_in_empty_cell.png new file mode 100644 index 000000000..a2cd2eaf1 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_empty_cell.png differ diff --git a/assets/images/sheets/sheets_places_in_input.png b/assets/images/sheets/sheets_places_in_input.png new file mode 100644 index 000000000..b505d03f7 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_input.png differ diff --git a/assets/images/sheets/sheets_places_in_no_input.png b/assets/images/sheets/sheets_places_in_no_input.png new file mode 100644 index 000000000..528a548f3 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_no_input.png differ diff --git a/assets/images/sheets/sheets_places_in_output.png b/assets/images/sheets/sheets_places_in_output.png new file mode 100644 index 000000000..4c99567f2 Binary files /dev/null and b/assets/images/sheets/sheets_places_in_output.png differ diff --git a/assets/images/sheets/sheets_places_in_wrong_dcid.png b/assets/images/sheets/sheets_places_in_wrong_dcid.png new file mode 100644 index 000000000..fe310cb5d Binary files /dev/null and b/assets/images/sheets/sheets_places_in_wrong_dcid.png differ diff --git a/assets/images/sheets/sheets_search_box.png b/assets/images/sheets/sheets_search_box.png new file mode 100644 index 000000000..f3eb3fb39 Binary files /dev/null and b/assets/images/sheets/sheets_search_box.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_1.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_1.png new file mode 100644 index 000000000..6b3e489ee Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_1.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_2.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_2.png new file mode 100644 index 000000000..d1051a395 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_2.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_3.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_3.png new file mode 100644 index 000000000..d37f7b347 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_3.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_4.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_4.png new file mode 100644 index 000000000..eb842763e Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_4.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_5.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_5.png new file mode 100644 index 000000000..ffab67036 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_5.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_6.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_6.png new file mode 100644 index 000000000..20ce0efee Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_6.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_7.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_7.png new file mode 100644 index 000000000..6cf51d9b8 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_7.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_8.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_8.png new file mode 100644 index 000000000..e0aa9afae Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_8.png differ diff --git a/assets/images/sheets/tutorials/sheets_covid_tutorial_9.png b/assets/images/sheets/tutorials/sheets_covid_tutorial_9.png new file mode 100644 index 000000000..47beda42e Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_covid_tutorial_9.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_1.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_1.png new file mode 100644 index 000000000..5ee453bcb Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_1.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_2.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_2.png new file mode 100644 index 000000000..04c0536f7 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_2.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_3.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_3.png new file mode 100644 index 000000000..ba2cbd12b Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_3.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_4.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_4.png new file mode 100644 index 000000000..d582ba83d Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_4.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_5.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_5.png new file mode 100644 index 000000000..7bfd2a58c Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_5.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_6.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_6.png new file mode 100644 index 000000000..696540d6c Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_6.png differ diff --git a/assets/images/sheets/tutorials/sheets_latitude_tutorial_7.png b/assets/images/sheets/tutorials/sheets_latitude_tutorial_7.png new file mode 100644 index 000000000..85f882cd3 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_latitude_tutorial_7.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_1.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_1.png new file mode 100644 index 000000000..680d81437 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_1.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_2.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_2.png new file mode 100644 index 000000000..fd71b88cd Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_2.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_3.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_3.png new file mode 100644 index 000000000..bc742aa6f Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_3.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_4.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_4.png new file mode 100644 index 000000000..ad551c454 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_4.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_5.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_5.png new file mode 100644 index 000000000..e7688461b Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_5.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_6.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_6.png new file mode 100644 index 000000000..f029ae7a1 Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_6.png differ diff --git a/assets/images/sheets/tutorials/sheets_sleep_tutorial_7.png b/assets/images/sheets/tutorials/sheets_sleep_tutorial_7.png new file mode 100644 index 000000000..87e574d6a Binary files /dev/null and b/assets/images/sheets/tutorials/sheets_sleep_tutorial_7.png differ diff --git a/assets/images/web_components/all.png b/assets/images/web_components/all.png new file mode 100644 index 000000000..536f0760f Binary files /dev/null and b/assets/images/web_components/all.png differ diff --git a/assets/images/web_components/graph-explorer.png b/assets/images/web_components/graph-explorer.png new file mode 100644 index 000000000..b5c6e538c Binary files /dev/null and b/assets/images/web_components/graph-explorer.png differ diff --git a/assets/images/web_components/stat-var-explorer.png b/assets/images/web_components/stat-var-explorer.png new file mode 100644 index 000000000..9ea0d11bc Binary files /dev/null and b/assets/images/web_components/stat-var-explorer.png differ diff --git a/assets/js/api-doc-tabs.js b/assets/js/api-doc-tabs.js new file mode 100644 index 000000000..f79dacefa --- /dev/null +++ b/assets/js/api-doc-tabs.js @@ -0,0 +1,31 @@ +/** + * Custom tabs for REST (v1) API documentation pages. + * + * See api/rest/v1/rest_bulk_api_template.md for an example of where this code + * is used. + * + * Based on https://www.w3schools.com/howto/howto_js_tabs.asp + */ + +function openTab(evt, elementName) { + // hide all tab content + let tabContent = document.getElementsByClassName('api-tabcontent'); + for (const content of tabContent) { + content.style.display = 'none'; + } + + // set all tabs to not active + let tabLinks = document.getElementsByClassName('api-tablink'); + for (const link of tabLinks) { + link.className = link.className.replace(' active', ''); + } + + // display target tab's content, set that tab to active + document.getElementById(elementName).style.display = 'block'; + evt.currentTarget.className += ' active'; +} + +/** + * Opens "GET Request" tab by default + */ +document.getElementById('get-button').click(); diff --git a/assets/js/customdc-doc-tabs.js b/assets/js/customdc-doc-tabs.js new file mode 100644 index 000000000..9c23dd95f --- /dev/null +++ b/assets/js/customdc-doc-tabs.js @@ -0,0 +1,16 @@ +const tabGroups = document.querySelectorAll('.gcp-tab-group'); + +tabGroups.forEach(group => { + const headers = group.querySelectorAll('.gcp-tab-headers li'); + const contents = group.querySelectorAll('.gcp-tab-content > div'); + + headers.forEach((header, index) => { + header.addEventListener('click', () => { + headers.forEach(h => h.classList.remove('active')); + contents.forEach(c => c.classList.remove('active')); + + header.classList.add('active'); + contents[index].classList.add('active'); + }); + }); +}); diff --git a/assets/js/syntax_highlighting.js b/assets/js/syntax_highlighting.js new file mode 100644 index 000000000..c27b544ac --- /dev/null +++ b/assets/js/syntax_highlighting.js @@ -0,0 +1,32 @@ +/** + * Custom syntax highlighting for REST API request signatures, for use on + * documentation pages. + * + * Highlights text with the class "api-signature" + * Selects all instances of POST, GET, DELETE, PUT, PATCH, 'URL:', 'JSON + * Data:' and 'Header:' and applies the "keyword" class to it. Selects all instances of + * '[in|out]' and all words surrounded by {} and applies the "param" class to + * it. + * + * Styles for "keyword" and "param" classes are in + * /_sass/api_documentation.scss + * + * For an example on how this script is used, see /api/rest/rest_api_template.md + */ + +function customRESTSyntaxHighlighting(className) { + const keyword_regex = /(GET|POST|HEAD|DELETE|PUT|PATCH|URL:|JSON Data:|Header:)/g; + const param_regex = /{\w+}/g; + const in_out_regex = /\[in\|out\]/g; + + const collection = document.getElementsByClassName(className); + for (const signature of collection) { + let html = signature.innerHTML; + html = html.replace(keyword_regex, '$&'); + html = html.replace(param_regex, '$&'); + html = html.replace(in_out_regex, '$&'); + signature.innerHTML = html; + } +} + +customRESTSyntaxHighlighting('api-signature'); diff --git a/assets/js/tabs.js b/assets/js/tabs.js new file mode 100644 index 000000000..9b3743016 --- /dev/null +++ b/assets/js/tabs.js @@ -0,0 +1,58 @@ +// Original source: https://github.com/Ovski4/jekyll-tabs/blob/master/docs/tabs.js + +// This file provides the logic that ensures that the jekyll-tabs plugin works +// as expected to create an organized user experience. + +// The removeActiveClasses is a helper method that removes classes marked +// as active from the specific element passed to it. + +const removeActiveClasses = function (ulElement) { + const lis = ulElement.querySelectorAll('li'); + Array.prototype.forEach.call(lis, function (li) { + li.classList.remove('active'); + }); +} + +// The getChildPosition method returns an element's position in the array +// of its parent's children. + +const getChildPosition = function (element) { + var parent = element.parentNode; + for (var i = 0; i < parent.children.length; i++) { + if (parent.children[i] === element) { + return i; + } + } + + // This line should not be reached but is retained for completeness. + throw new Error('No parent found'); +} + +// The window.addEventListener logic ensures that clicking on a tab in the +// UI changes your view to the clicked tab's contents, rather than scrolling +// to the top of the page. + +window.addEventListener('load', function () { + const tabLinks = document.querySelectorAll('ul.tab li a'); + + Array.prototype.forEach.call(tabLinks, function (link) { + link.addEventListener('click', function (event) { + event.preventDefault(); + + liTab = link.parentNode; + if (liTab.className.includes('active')) { + return; + } + ulTab = liTab.parentNode; + position = getChildPosition(liTab); + + removeActiveClasses(ulTab); + tabContentId = ulTab.getAttribute('data-tab'); + tabContentElement = document.getElementById(tabContentId); + removeActiveClasses(tabContentElement); + + tabContentElement.querySelectorAll('li')[position].classList.add('active'); + liTab.classList.add('active'); + }, false); + }); +}); diff --git a/assets/video/sort.webm b/assets/video/sort.webm new file mode 100644 index 000000000..c7e58f875 Binary files /dev/null and b/assets/video/sort.webm differ diff --git a/bigquery/data_in_bq.html b/bigquery/data_in_bq.html new file mode 100644 index 000000000..4e9fc0fbf --- /dev/null +++ b/bigquery/data_in_bq.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/bigquery/dc_to_bq_queries.html b/bigquery/dc_to_bq_queries.html new file mode 100644 index 000000000..fbb81e25c --- /dev/null +++ b/bigquery/dc_to_bq_queries.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/bigquery/index.html b/bigquery/index.html new file mode 100644 index 000000000..9ce575e58 --- /dev/null +++ b/bigquery/index.html @@ -0,0 +1,533 @@ + + + + + Query with SQL/BigQuery - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Query Data Commons using SQL with BigQuery

+ +

The Data Commons repository is available as BigQuery tables in the Analytics Hub. If you have a Google Cloud Platform account, you can use Analytics Hub to issue SQL queries against the Data Commons tables. For more information, see the Analytics Hub introduction.

+ +
+

Note: Analytics Hub is no longer being updated with Data Commons data, and the Data Commons tables may be turned down. If you want to continue to use this, please fill out this form to tell us about your use case.

+
+ +

Tip: Before you start, you may find it helpful to review Data Commons key concepts.

+ +

In these pages are sample SQL queries grouped together by category. You can copy and paste the queries into the BigQuery Studio in the Cloud Console.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/bigquery/query_join_your_data.html b/bigquery/query_join_your_data.html new file mode 100644 index 000000000..51864c2f9 --- /dev/null +++ b/bigquery/query_join_your_data.html @@ -0,0 +1,617 @@ + + + + + Join with external data - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Join with data outside Data Commons

+ +

This page illustrates how you can join external datasets with Data Commons by relying on unique IDs and geo locations. For the examples below, we use other public datasets in BigQuery Analytics Hub, but they can be any other private/public dataset.

+ +

Use FIPS codes

+ +

We use the Fatal Accidents dataset from National Highway Traffic Safety Administration to compute counties with highest fatal accidents per capita. We map to DC counties using the FIPS or geoId, and use total population statistics. Loving County, TX (the least populated county in main US) and Kenedy County, TX are at the top.

+ +
WITH FatalAccidents AS (
+SELECT
+  CONCAT(LPAD(CAST(NHTSA.state_number AS STRING), 2, '0'), LPAD(CAST(NHTSA.county AS STRING), 3, '0')) AS FIPS,
+  COUNT(consecutive_number) AS Count
+FROM `nhtsa_traffic_fatalities.accident_2016` AS NHTSA
+GROUP BY FIPS)
+SELECT P.id AS CountyId,
+       P.name AS CountyName,
+       IF(Obs.value IS NOT NULL, FA.Count / CAST(Obs.value AS FLOAT64), NULL) AS FatalAccidentsPerCapita
+FROM FatalAccidents AS FA
+JOIN `data_commons.Observation` AS Obs ON TRUE
+JOIN `data_commons.Place` AS P ON TRUE
+WHERE
+  P.id = Obs.observation_about AND
+  P.geo_id = FA.FIPS AND
+  Obs.variable_measured = 'Count_Person' AND
+  Obs.is_preferred_obs_across_facets
+ORDER BY FatalAccidentsPerCapita DESC
+
+ +

Use zip codes

+ +

We use Google’s Project SunRoof dataset to compute solar potential for low-income Zip code areas in the US. From 500 Zip code areas with the lowest median income, we compute those Zip codes that have the highest solar potential (among those that were sufficiently qualified). Of the 500, we find that 133 of them had > 50% potential.

+ +
WITH LowestEarnerZips AS (
+    SELECT Obs.observation_about AS PlaceId,
+           Obs.Value AS Income
+    FROM `data_commons.Observation` AS Obs
+    WHERE
+        Obs.is_preferred_obs_across_facets AND
+        Obs.variable_measured = 'Median_Income_Person' AND
+        Obs.observation_about LIKE 'zip/%'
+    ORDER BY CAST(Value AS FLOAT64)
+    LIMIT 500)
+SELECT SunRoof.region_name AS Zip, SunRoof.state_name AS State, SunRoof.percent_qualified AS PercentSunRoof
+FROM LowestEarnerZips AS DC
+JOIN `project_sunroof.solar_potential_by_postal_code` AS SunRoof ON TRUE
+WHERE CONCAT('zip/', SunRoof.region_name) = DC.PlaceId AND
+      SunRoof.percent_qualified > 0 AND
+      SunRoof.percent_covered > 80
+ORDER BY PercentSunRoof DESC
+
+ +

Use latitude/longitude

+ +

From the OpenStreetMap Public Dataset, we compute the US counties with most fire-hydrants per unit area. To do this, we use the geo boundaries in DC to map latitude/longitude to US counties and get their corresponding land area values. Alexandria County, Virginia is at the top of the list.

+ +
WITH CountyFireHydrantCount AS(
+  WITH FireHydrantLocations AS (
+    SELECT geometry AS Geo
+    FROM  `openstreetmap_public_dataset.planet_nodes` AS node
+    JOIN UNNEST(all_tags) AS tags
+    WHERE (tags.key = 'emergency' AND tags.value = 'fire_hydrant'))
+  SELECT PB.id AS CountyId, COUNT(*) AS NumHydrants
+  FROM `data_commons.PlaceBoundary` AS PB
+  JOIN `data_commons.Place` AS P ON TRUE
+  JOIN FireHydrantLocations ON TRUE
+  WHERE
+    P.id = PB.id AND
+    EXISTS(SELECT * FROM UNNEST(P.all_types) AS T WHERE T = 'County') AND
+    ST_WITHIN(FireHydrantLocations.Geo,
+              ST_GEOGFROMGEOJSON(PB.geo_json_coordinates, make_valid => TRUE))
+  GROUP BY CountyId)
+SELECT P.id AS CountyId,
+       P.name AS CountyName,
+       CountyFireHydrantCount.NumHydrants /
+             (SUBSTR(P.land_Area, 12) AS INT64) AS HydrantsPerSqMeter
+FROM `data_commons.Place` AS P
+JOIN CountyFireHydrantCount ON TRUE
+WHERE
+  P.id = CountyFireHydrantCount.CountyId AND
+  STARTS_WITH(P.land_area, 'SquareMeter')
+ORDER BY HydrantsPerSqMeter DESC
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/bigquery/query_more_complex.html b/bigquery/query_more_complex.html new file mode 100644 index 000000000..6f318644e --- /dev/null +++ b/bigquery/query_more_complex.html @@ -0,0 +1,587 @@ + + + + + More complex queries - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

More complex queries

+ +

List places matching some criterion

+ +

As an example, list the European equivalent (aka NUTS 3) places with < 2.1 fertility rate:

+ +
WITH ChildPlace AS (
+  SELECT id AS PlaceId FROM `data_commons.Place`
+  WHERE EXISTS(SELECT * FROM UNNEST(all_types) AS T WHERE T = 'EurostatNUTS3') AND
+  EXISTS(SELECT * FROM UNNEST(linked_contained_in_place) AS C WHERE C = 'europe')
+)
+SELECT O.observation_about AS PlaceId,
+       P.name AS PlaceName,
+       CAST(O.value AS FLOAT64) AS Value,
+FROM `data_commons.Observation` AS O
+JOIN ChildPlace ON TRUE
+JOIN `data_commons.Place` AS P ON TRUE
+WHERE O.is_preferred_obs_across_facets AND
+      O.variable_measured = 'FertilityRate_Person_Female' AND
+      O.observation_about = ChildPlace.PlaceId AND
+      O.observation_about = P.id AND
+      CAST(O.value AS FLOAT64) < 2.1
+ORDER BY Value
+
+ +

Compute a new statistic

+ +

As an example, list countries of the world with the highest electricity consumption per unit GDP:

+ +
WITH ChildPlace AS (
+  SELECT id AS PlaceId FROM `data_commons.Place`
+  WHERE EXISTS(SELECT * FROM UNNEST(all_types) AS T WHERE T = 'Country') AND
+  EXISTS(SELECT * FROM UNNEST(linked_contained_in_place) AS C WHERE C = 'Earth')
+)
+SELECT ONum.observation_about AS PlaceId,
+       P.name AS PlaceName,
+       IF(CAST(ODenom.value AS FLOAT64) > 0,
+          CAST(ONum.value AS FLOAT64) / CAST(ODenom.value AS FLOAT64),
+          NULL) AS Value
+FROM `data_commons.Observation` AS ONum
+JOIN `data_commons.Observation` AS ODenom ON TRUE
+JOIN ChildPlace ON TRUE
+JOIN `data_commons.Place` AS P ON TRUE
+WHERE ONum.is_preferred_obs_across_facets AND
+      ONum.variable_measured = 'Annual_Consumption_Electricity' AND
+      ODenom.is_preferred_obs_across_facets AND
+      ODenom.variable_measured = 'Amount_EconomicActivity_GrossDomesticProduction_Nominal' AND
+      ONum.observation_about = ChildPlace.PlaceId AND
+      ODenom.observation_about = ONum.observation_about AND
+      P.id = ONum.observation_about
+ORDER BY Value DESC
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/bigquery/query_places.html b/bigquery/query_places.html new file mode 100644 index 000000000..2309c5ff8 --- /dev/null +++ b/bigquery/query_places.html @@ -0,0 +1,606 @@ + + + + + Query places - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Places

+ +

The queries below include specific place DCID (e.g., ‘geoId/06’) and place type (e.g., ‘County’) string constants. Replace those to customize the queries to your needs.

+ +

Place containment

+ +

List all the places of type X contained in Y

+ +

As an example, selecting all counties in USA:

+ +
SELECT id AS PlaceId, name AS PlaceName
+FROM `data_commons.Place`
+WHERE EXISTS(SELECT * FROM UNNEST(all_types) AS T WHERE T = 'County') AND
+      EXISTS(SELECT * FROM UNNEST(linked_contained_in_place) AS C
+             WHERE C = 'country/USA')
+
+ +

List all the places of type X within Z range of Y

+ +

As an example, we can use the “nearbyPlaces” triples to compute cities within 10KM distance of San Francisco:

+ +
-- “nearbyPlaces” triple is coded as <place>@<distance_in_meters>
+SELECT Place2.id AS PlaceId, Place2.name AS PlaceName
+FROM `data_commons.Place` AS Place1
+JOIN `data_commons.Place` AS Place2 ON TRUE
+JOIN `data_commons.Triple` AS Triple ON TRUE
+WHERE Place1.id = 'geoId/0667000' AND Place1.id = Triple.subject_id AND
+      Triple.predicate = 'nearbyPlaces' AND
+      SPLIT(Triple.object_value, '@')[OFFSET(0)] = Place2.id AND
+      CAST(RTRIM(SPLIT(Triple.object_value, '@')[OFFSET(1)], 'm') AS FLOAT64) < 10000 AND
+      EXISTS(SELECT * FROM UNNEST(Place2.all_types) AS T WHERE T = 'City')
+
+
+ +

List all the places of type X within Z range of Y using BigQuery geography functions

+ +

As an example, counties in 50km vicinity of Palo Alto:

+ +
SELECT County.id AS CountyId, County.name AS CountyName
+FROM `data_commons.PlaceBoundary` AS PaloAltoGeo
+JOIN `data_commons.PlaceBoundary` AS CountyGeo ON TRUE
+JOIN `data_commons.Place` AS County ON TRUE
+WHERE
+    PaloAltoGeo.id = 'geoId/0655282' AND
+    EXISTS(SELECT * FROM UNNEST(County.all_types) AS T WHERE T = 'County') AND
+    County.id = CountyGeo.id AND
+    CountyGeo.geo_json_coordinates IS NOT NULL AND
+    CountyGeo.geo_json_coordinates IS NOT NULL AND
+    ST_DISTANCE(ST_GEOGFROMGEOJSON(CountyGeo.geo_json_coordinates,
+                                   make_valid => TRUE),
+                ST_GEOGFROMGEOJSON(PaloAltoGeo.geo_json_coordinates,
+                                   make_valid => TRUE)) < 50000
+
+
+ +

Entities of a certain type in a place

+ +

This is the same sequence as above, except replacing place with entities of type X, where X could be school, facility, etc.

+ +

List all entities of non-place type contained in Y

+ +

As an example, this gets all EPA Reporting Facilities (within the Greenhouse Gas Reporting Program) in Texas:

+ +
SELECT I.id AS Id, I.name AS name
+FROM `data_commons.Place` AS P
+JOIN `data_commons.Instance` AS I ON TRUE
+WHERE I.id = P.id AND I.type = 'EpaReportingFacility' AND
+      EXISTS(SELECT * FROM UNNEST(linked_contained_in_place) AS C
+             WHERE C = 'geoId/48')
+
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/bigquery/query_property_places.html b/bigquery/query_property_places.html new file mode 100644 index 000000000..34a92fea2 --- /dev/null +++ b/bigquery/query_property_places.html @@ -0,0 +1,621 @@ + + + + + Query observations and properties of places - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Statistical variables associated with places (and other entities)

+ +

Get the latest value from preferred source for a single variable

+ +

As an example, the latest population of CA:

+ +
SELECT Obs.Value AS Value
+FROM `data_commons.Observation` AS Obs
+WHERE Obs.observation_about = 'geoId/06' AND
+      Obs.variable_measured = 'Count_Person' AND
+      Obs.is_preferred_obs_across_facets
+
+ +

Get the latest value from specific source for a single variable

+ +

As an example, the latest CA population from ACS 5 Year Survey:

+ +
SELECT Obs.value AS Value
+FROM `data_commons.Observation` AS Obs
+WHERE Obs.observation_about = 'geoId/06' AND
+      Obs.variable_measured = 'Count_Person' AND
+      Obs.measurement_method = 'CensusACS5yrSurvey'
+ORDER BY Obs.observation_date DESC
+LIMIT 1
+
+ +

List variables available for a given place

+ +

As an example, the variables available for California state:

+ +
SELECT DISTINCT Obs.variable_measured AS Var
+FROM `data_commons.Observation` AS Obs
+WHERE Obs.observation_about = 'geoId/06'
+ORDER BY Var;
+
+ +

List sources available for a given place/variable combination

+ +

As an example, the sources for count of housing units in California:

+ +
SELECT DISTINCT
+       Prov.name AS Name,
+       Prov.provenance_url AS URL,
+       Obs.measurement_method AS MeasurementMethod
+FROM `data_commons.Observation` AS Obs
+JOIN `data_commons.Provenance` AS Prov ON TRUE
+WHERE Obs.observation_about = 'geoId/06' AND
+      Obs.variable_measured = 'Count_HousingUnit' AND
+      Prov.id = Obs.prov_id
+ORDER BY Name
+
+ +

Get observations from preferred source for a single variable

+ +

As an example, CA population over time from preferred source:

+ +
SELECT Obs.observation_date AS Date,
+       Obs.Value AS Value
+FROM `data_commons.Observation` AS Obs
+WHERE Obs.observation_about = 'geoId/06' AND
+      Obs.variable_measured = 'Count_Person' AND
+      Obs.facet_rank = 1
+ORDER BY Date
+
+ +

Get the latest value from preferred source for all the places of a given type X contained in place Y

+ +

As an example, the unemployment rate in counties of USA:

+ +
WITH ChildPlace AS (
+  SELECT id AS PlaceId FROM `data_commons.Place`
+  WHERE EXISTS(SELECT * FROM UNNEST(all_types) AS T WHERE T = 'County') AND
+  EXISTS(SELECT * FROM UNNEST(linked_contained_in_place) AS C WHERE C = 'country/USA')
+)
+SELECT O.observation_about AS PlaceId,
+       P.name AS PlaceName,
+       O.value AS Value,
+FROM `data_commons.Observation` AS O
+JOIN ChildPlace ON TRUE
+JOIN `data_commons.Place` AS P ON TRUE
+WHERE O.is_preferred_obs_across_facets AND
+      O.variable_measured = 'UnemploymentRate_Person' AND
+      O.observation_about = ChildPlace.PlaceId AND
+      O.observation_about = P.id
+ORDER BY PlaceName
+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/bigquery/unique_identifiers.html b/bigquery/unique_identifiers.html new file mode 100644 index 000000000..4e9fc0fbf --- /dev/null +++ b/bigquery/unique_identifiers.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/blog.html b/blog.html new file mode 100644 index 000000000..19ab4ead6 --- /dev/null +++ b/blog.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/contributing/index.html b/contributing/index.html new file mode 100644 index 000000000..070188fca --- /dev/null +++ b/contributing/index.html @@ -0,0 +1,581 @@ + + + + + Contribute to Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Contribute to Data Commons!

+ +

Data Commons has benefited greatly from our collaborations with different government organizations and academic institutions and is looking to expand the set of collaborative projects. In particular, we are looking for partners to:

+ + + +

Data Commons welcomes patches and contributions to this project from everyone, new or experienced!

+ +

Ways to contribute

+ +

Add data

+ +

We welcome contributions of public data to the Data Commons knowledge graph. Data added will be accessible via Data Commons tools and APIs. We’ve bootstrapped the knowledge graph with these datasets from US Census, World Bank, CDC, NOAA, NASA, etc. However, Data Commons is meant to be for the community, by the community. We’re excited to work with you to make public data accessible to everyone. If you are interested in importing your data to Data Commons, please file a data request in our issue tracker. You can see a list of existing requests here.

+ +

Create new curriculum

+ +

Data Commons allows for easy acess to real data that can enrich the experience of students and instructors in educational contexts. We’re posting template data science assignments to assist educators with integrating real data into their courses on the courseware page. If you use Data Commons for your classes, have courseware to share, or find any of this material helpful, we want to hear about it! Please fill out this form.

+ +

Create a new tool

+ +

Data Commons welcomes the development of new tools that make the data on Data Commons more accessible to end users. We have an extensive REST API that can be used to power applications on top of our data. If you would like to build a new tool, contact the team through this form or create a PR in the Data Commons tools repo.

+ +

Share analysis

+ +

Example analyses are available on the tutorials page. To add your analysis on that page, open a PR in the Data Commons documentation repo with the title of the analysis and links to its Colab notebook and Github raw .ipynb file.

+ +

Update documentation

+ +

Data Commons maintains its documentation website at https://docs.datacommons.org. You can submit a PR to update the project’s documentation at https://github.com/datacommonsorg/docsite/pulls.

+ +

Get started

+ +

Sign the Contributor License Agreement (CLA)

+ +

Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to https://cla.developers.google.com/ to see +your current agreements on file or to sign a new one. +You generally only need to submit a CLA once, so if you’ve already submitted one +(even if it was for a different project), you probably don’t need to do it +again.

+ +

Become familiar with the project

+ +

You can read about Data Commons concepts and explore existing data +and tools on datacommons.org.

+ +

All submissions, including submissions by project members, require review. Data Commons +uses GitHub pull requests for this purpose. Consult +GitHub Help for more +information on using pull requests. +This project follows Google’s code style guide, documentation style guide, and open source community guidelines.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/data_literacy/course_materials/how_to_use.html b/courseware/data_literacy/course_materials/how_to_use.html new file mode 100644 index 000000000..43acaa5c2 --- /dev/null +++ b/courseware/data_literacy/course_materials/how_to_use.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/courseware/data_literacy/course_materials/key_themes.html b/courseware/data_literacy/course_materials/key_themes.html new file mode 100644 index 000000000..735f961fa --- /dev/null +++ b/courseware/data_literacy/course_materials/key_themes.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/courseware/data_literacy/course_materials/modules.html b/courseware/data_literacy/course_materials/modules.html new file mode 100644 index 000000000..0e0208745 --- /dev/null +++ b/courseware/data_literacy/course_materials/modules.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/courseware/data_literacy/faq.html b/courseware/data_literacy/faq.html new file mode 100644 index 000000000..cbe85e8d6 --- /dev/null +++ b/courseware/data_literacy/faq.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/courseware/data_literacy/how_to_use.html b/courseware/data_literacy/how_to_use.html new file mode 100644 index 000000000..a73b8e114 --- /dev/null +++ b/courseware/data_literacy/how_to_use.html @@ -0,0 +1,559 @@ + + + + + How to use the course materials - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

How to use the course materials

+ +

The curriculum is organized in self-contained modules. Instructors (and students) are welcome to consume or work through any of the modules or the components within any module. Each module is available as a detailed document with several pedagogical notes, objectives and an outline/table of contents to allow easy navigation.

+ +

To find what you may be looking for, or to use any content in your own courses/curriculum, we recommend the following approach:

+ +
    +
  1. +

    Navigate to the Key Themes pages. It lists several key themes along with some pointers to specific modules which have the complete details.

    +
  2. +
  3. +

    Navigate to the Modules page. For each module, we describe its goal and include its table of contents. If you find what you are looking for (e.g., search “categorical vs numeric variables” and you should find yourself at the second module), you can then access the module directly for the content.

    +
  4. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/data_literacy/index.html b/courseware/data_literacy/index.html new file mode 100644 index 000000000..d1b0fe3d0 --- /dev/null +++ b/courseware/data_literacy/index.html @@ -0,0 +1,610 @@ + + + + + Data literacy with Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data literacy with Data Commons

+ + + + + +

Overview

+ +

“Data literacy with Data Commons” comprises curriculum/course materials for instructors, students and other practitioners working on or helping others become data-literate. This includes detailed modules with pedagogical narratives, explanations of key concepts, examples, and suggestions for exercises/projects focused on advancing the consumption, understanding and interpretation of data in the contemporary world. In our quest to expand the reach and utility of this material, we assume no background in computer science or programming, thereby removing a key obstacle to many such endeavors.

+ +

Objectives

+ +
    +
  • Exposing students (and practitioners) to the basics of data comprehension and interpretation.
  • +
  • Introducing some basic and intermediate data-driven decision making concepts.
  • +
  • Explicitly cater to the needs of students (and practitioners) who have no prior programming experience and a limited exposure to basic statistical concepts.
  • +
  • Adopt a narrative-based approach to appeal to a wide range of audiences.
  • +
  • Grounding most/all examples and illustrative assignments on real data.
  • +
  • Using as many of the out-of-the-box and freely available data exploration tools to preclude any advanced or specialized knowledge.
  • +
  • Make the curriculum materials openly available and support extensive customizations for any instructors who wish to adopt components/modules to suit their needs.
  • +
+ +

Who is this for?

+ +

Anyone and everyone. Instructors, students, aspiring data scientists and anyone interested in advancing their data comprehension and analysis skills without needing to code. For instructors, the rest of this page details the curriculum organization and how to find key concepts/ideas to use.

+ +

Suggested prerequisites

+ +

We suggest only the following prerequisites for this curriculum:

+ +
    +
  • High-school level mathematics (basic).
  • +
  • High-school level statistics (basic).
  • +
+ +

Why Data Commons?

+ +

Data Commons (datacommons.org) is an open and public-access platform to all sorts of publicly available data in the world. From demographic data to economic/financial data to health indicators to weather/climate, Data Commons aggregates and makes available data about millions of places and thousands of metrics, e.g.,population growth rate.Additionally, Data Commons also provides some out-of-the-box data analysis tools, e.g., timeline charts, maps, scatter plots and the ability to download the data.

+ +

For the purpose of the data literacy, the Data Commons platform becomes an important component of the curriculum because it helps satisfy several curriculum development objectives:

+ + + +

Course content

+ +

The course consists of a set of modules focusing on several key concepts, including data modeling, analysis, visualization and the (ab)use of data to tell (false) narratives. Each module lists its objectives and builds on a pedagogical narrative around the explanation of key concepts, e.g.,, the differences between correlations and causation. We extensively use the Data Commons platform to point to real world examples without needing to write a single line of code!
+The course consists of a set of modules focusing on several key concepts, including data modeling, analysis, visualization and the (ab)use of data to tell (false) narratives. Each module lists its objectives and builds on a pedagogical narrative around the explanation of key concepts, e.g., the differences between correlations and causation. We extensively use the Data Commons platform to point to real world examples without needing to write a single line of code!

+

What is not covered?

+ +

We note that the curriculum objectives, themes, content and areas of focus are neither exhaustive nor a one size fits all. For example, we do not focus on the ethics of data collection in this curriculum. While these issues are of utmost importance, we chose to focus on a more basic and hands-on approach with the available resources.

+ +

We also have more advanced “Data Science with Real Data” curriculum/course material.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/data_literacy/key_themes.html b/courseware/data_literacy/key_themes.html new file mode 100644 index 000000000..126590691 --- /dev/null +++ b/courseware/data_literacy/key_themes.html @@ -0,0 +1,667 @@ + + + + + Key themes - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Key themes

+ +
    +
  • Data and Modeling Overview (Data and Modeling Overview) +
      +
    • What it means to ‘model’ a phenomenon
    • +
    • What is a variable
    • +
    • What is a measurement +
        +
      • Observation (direct) vs estimation (indirect)
      • +
      • Interpolation as an instance of estimation (indirect)
      • +
      • Introduce concepts such as sampling vs complete population-level observations +
          +
        • Types of sampling e.g., random, systematic, cluster, etc.
        • +
        +
      • +
      +
    • +
    +
  • +
  • Basic Data Analysis +
      +
    • Summary Statistics (Data and Modeling Overview, Deep Dive into Data “Set”) +
        +
      • Measures of central tendency and their benefits/drawbacks +
          +
        • E.g., Mean, median, mode
        • +
        +
      • +
      • Measures of variability and their benefits/drawbacks +
          +
        • E.g., Variation, range, standard deviation
        • +
        +
      • +
      • Discuss the limitations of summary statistics with examples +
          +
        • E.g., Anscombe Quartet
        • +
        +
      • +
      +
    • +
    • Aggregations + +
    • +
    • Outliers (Plotting/Graphing) +
        +
      • Why we care about outliers
      • +
      • How to spot and handle outliers
      • +
      +
    • +
    +
  • +
  • Techniques for Data Visualization (Plotting/Graphing) +
      +
    • Plotting vs graphing
    • +
    • Why we visualize data
    • +
    • Types of plots +
        +
      • Scatter, line, map, bar, histogram, etc.
      • +
      +
    • +
    • How to visualize 1-D vs 2-D vs N-D data
    • +
    +
  • +
  • Techniques for Statistical Modeling +
      +
    • Distributions (Plotting/Graphing) +
        +
      • Theoretical vs empirical (i.e. probability distributions vs frequency distributions)
      • +
      • Normal/Gaussian distribution +
          +
        • Properties of the normal distribution
        • +
        • When it is appropriate to model using the normal distribution
        • +
        +
      • +
      • Exponential distribution
      • +
      • Other distributions +
          +
        • Bernoulli
        • +
        • Binomial
        • +
        +
      • +
      +
    • +
    • Correlations (Correlations) +
        +
      • Linear vs quadratic vs exponential
      • +
      • Degree and direction of correlation
      • +
      • How to identify correlations +
          +
        • Visually (e.g., scatter plot)
        • +
        • Numerically (e.g., correlation coefficient)
        • +
        +
      • +
      • Common pitfalls such as overgeneralization, Simpson’s paradox, etc.
      • +
      • Correlation vs. causation
      • +
      +
    • +
    +
  • +
  • Data Science in the Real World (Data and Modeling Overview) +
      +
    • Lies, damn lies and statistics +
        +
      • Manipulative visuals
      • +
      • Manipulative statistics
      • +
      +
    • +
    • Cognitive biases +
        +
      • Survivorship bias
      • +
      • False causality fallacy
      • +
      • Other biases
      • +
      +
    • +
    +
  • +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/data_literacy/modules.html b/courseware/data_literacy/modules.html new file mode 100644 index 000000000..624376f25 --- /dev/null +++ b/courseware/data_literacy/modules.html @@ -0,0 +1,570 @@ + + + + + Modules - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Modules

+ +

Module 1: Data Overview

+ +

This module is meant to serve as the introductory class(es) in a data literacy course. It provides motivation for why data literacy matters, introduces key concepts such as measurements, variables, models, etc., and defines some basic descriptive statistics and data visualization techniques.

+ +

Module 2: Deep Dive into Data “Set”

+ +

Introduces students to the idea of a data “set” as well as some basic terms and statistical measures (e.g., mean, standard deviation, etc.) while highlighting important caveats and takeaways when drawing conclusions from these measures.

+ +

Module 3: Relating Data “Sets”

+ +

Introduces students to the idea of related data sets and describes how to merge data sets into one large data collection. Real data sets are analyzed in depth to demonstrate the benefits of building a nuanced, complete picture of the world.

+ +

Module 4: Plotting/Graphing

+ +

Introduces students to some common plots and graphs and discusses when to use each depending on the data and the context. It also defines and explores various distributions with analysis of their properties and examples from the real world.

+ +

Module 5: Correlations

+ +

Introduces students to the idea of correlation between two variables and describes how to observe, quantify, and label correlations, with a focus on linear correlations. Strategies for distinguishing real correlations from noise are provided and common pitfalls, such as correlation vs causation, are discussed in depth.

+ +

Module 6: Mapping

+ +

Introduces students to the idea of geographic data and discusses how to visualize and aggregate geographic data.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/data_literacy/overview.html b/courseware/data_literacy/overview.html new file mode 100644 index 000000000..cbe85e8d6 --- /dev/null +++ b/courseware/data_literacy/overview.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/courseware/index.html b/courseware/index.html new file mode 100644 index 000000000..c75d460b0 --- /dev/null +++ b/courseware/index.html @@ -0,0 +1,560 @@ + + + + + Educational materials - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Educational materials

+ +

Data Commons can help develop exciting new course content for several pedagogical use cases. From foundational data science and machine learning courses to more specialized curricula focusing on specific use cases and skills development, e.g., data analytics and analytical tools for public policy, public health etc. All courses and training materials need data, preferably real world data. We take a hands-on approach and work through several examples and case studies to illustrate useful concepts with real data. Instructors and students are welcome to modify any/all components to suit their needs. We encourage you to try different/related datasets which are also available through the Data Commons data graph!

+ +

License

+ +

All material is provided publicly and free of charge, under a Creative Commons license (CC BY).

+ +

FERPA compliance

+ +

Data Commons collects no personal information (PII), records, or private information from users and can be used in compliance with FERPA. For specific questions about FERPA compliance, please contact your organization’s legal counsel for advice.

+ +

Courses

+ +

Data Literacy

+ +

A general audience course focused on the basics of data comprehension, interpretation, and data-based decision making. No programming experience required!

+ +

Intro to Data Science

+ +

An introduction to key data science concepts, targeted at an undergraduate audience. Assumes basic python programming skills.

+ +

Feedback

+ +

If you use any of this material, we would love to hear from you! Please share feedback with this form.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/courseware/intro_data_science.html b/courseware/intro_data_science.html new file mode 100644 index 000000000..de10c7723 --- /dev/null +++ b/courseware/intro_data_science.html @@ -0,0 +1,612 @@ + + + + + Introduction to data science - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data science with real data

+ +

Introductory data science and machine learning courses crave real world datasets to enhance student interest and enrich their learning experience. However, identifying, accessing and preparing real data can be a painstaking task. As a result, several foundational courses tend to rely on a similar subset of datasets. We hope to demonstrate that Data Commons can help increase the diversity of real world data used in such foundational courses taught across the world and enrich students’ (and instructors’) experience.

+ +

We make available an (increasing) sample of data science course assignments developed around illustrating key concepts at an introductory college level. In addition to revolving around core data science ideas, we use real world data provided by the Data Commons APIs with the aim of enhancing the pedagogical goals of each topic. Each assignment is implemented as a Python notebook. These notebooks are not teaching notes; they serve as self-contained templates for implementing, interpreting and/or analyzing a subset of core concepts. The entire assignment revolves around using some publicly available dataset, most often directly using the Data Commons APIs.

+ +

Each assignment notebook should ideally be adapted to suit the needs of your curriculum and serve the needs of a complete and coherent course. We intend for them to serve as examples (templates) for you to customize extensively. We encourage course instructors and teaching assistants to use different datasets (and variables) for each iteration of their course. Luckily, Data Commons makes this easy.

+ +

Why use this?

+ +

These materials were designed to:

+ +
    +
  • +

    Use real data. Via the Data Commons API, students engage with real world data from the get-go — no more stale, synthetic datasets.

    +
  • +
  • +

    Be interactive. Each concept is illustrated with examples that instructors and teaching assistants can tinker with minimal effort, allowing students to learn in a hands-on way.

    +
  • +
  • +

    Easy to adapt. The notebook format and Data Commons Python API makes everything modular and easy to edit.

    +
  • +
+ +

Who is this for?

+ +

Teachers, professors, instructors, teaching assistants, and anyone else developing and teaching data science curriculum. We also believe early practitioners can benefit greatly from the exercises.

+ +

As an example, MIT’s large Introduction to Machine Learning course has adapted several of the examples covered in these notebooks to suit their pedagogical needs. From using the same datasets to dive deeper into the material, to modifying the data/variables to illustrate a similar effect, the adaptations span a wide spectrum.

+ +

How can these be used?

+ +

We strongly encourage you to change and adapt these notebooks to fit your needs! You can download any notebook in either .ipynb or .py format by clicking on its link and File > Download.

+ +

Datasets can be changed by editing the list of variables queried (see the Data Commons for Data Science tutorial for more on this); editing framing and questions is as easy as editing text cells.

+ +

Some ideas:

+
    +
  • Add additional cells for any additional topics you want covered.
  • +
  • For students with stronger programming skills, ask to implement the methods covered on their own.
  • +
  • Some of the questions posed to students in the notebooks are open ended – these can be adapted to discussion sessions with students.
  • +
+ +

Python notebooks

+ +
    +
  • +

    Data Commons for Data Science Tutorial
    +A quick tutorial introducing the key concepts of working with the Data Commons Python API. Great for familiarizing yourself with how to adapt datasets to your particular needs.

    +
  • +
  • +

    Feature Engineering
    +Explores the first steps of any data science pipeline: feature selection, data visualization, preprocessing and standardization. Pairs well with “Classification and Model Evaluation”.

    +
  • +
  • +

    Classification and Model Evaluation
    +Explores the second half of a data science pipeline: training and test splits, cross validation, metrics for model evaluation. Focus is on classification models. Pairs well with “Feature Engineering”.

    +
  • +
  • +

    Regression: Basics and Prediction
    +An introduction to linear regression as a tool for prediction, from a modern machine learning perspective.

    +
  • +
  • +

    Regression: Evaluation and Interpretation
    +A more in-depth look at linear regression, with an emphasis on interpreting model parameters and evaluation metrics beyond simple accuracy. Provides a more statistical perspective.

    +
  • +
  • +

    Clustering
    +An introduction to clustering analysis for unsupervised learning. Explores the mechanics of K-means clustering and cluster interpretation.

    +
  • +
+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/csv_download.html b/csv_download.html new file mode 100644 index 000000000..844a1b6ca --- /dev/null +++ b/csv_download.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/custom_dc/build_image.html b/custom_dc/build_image.html new file mode 100644 index 000000000..05ab5c0c5 --- /dev/null +++ b/custom_dc/build_image.html @@ -0,0 +1,697 @@ + + + + + Build and run a custom image - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Build and run a custom image

+ + + +

Use a prebuilt image

+ +

While you are just testing out data changes, you don’t need to build the website, but can just use a prebuilt Data Commons image.

+ +

Data Commons provides two prebuilt images in the Google Artifact Registry that you can download to run in a Docker container:

+ +
    +
  • gcr.io/datcom-ci/datacommons-data:stable and gcr.io/datcom-ci/datacommons-services:stable. These are tested, stable versions but may be several weeks old.
  • +
  • gcr.io/datcom-ci/datacommons-data:latest and gcr.io/datcom-ci/datacommons-services:latest. These are the latest versions built from head.
  • +
+ +

If you want to pick up the latest prebuilt version, do the following:

+ +
    +
  1. From the root directory (e.g. website), run the following command: +
    docker pull gcr.io/datcom-ci/datacommons-services:latest
    +docker pull gcr.io/datcom-ci/datacommons-data:latest
    +
    +
  2. +
  3. Rerun the data container, specifying that repo specifying that repo as the argument to the docker run command: +
    docker run \
    +--env-file $PWD/custom_dc/env.list \
    +-v INPUT_DIRECTORY:INPUT_DIRECTORY \
    +-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
    +gcr.io/datcom-ci/datacommons-data:latest
    +
    +
  4. +
  5. Restart the services container: +
    docker run -it \
    +-p 8080:8080 \
    +-e DEBUG=true \
    +--env-file $PWD/custom_dc/env.list \
    +-v INPUT_DIRECTORY:INPUT_DIRECTORY \
    +-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
    +gcr.io/datcom-ci/datacommons-services:latest
    +
    +
  6. +
+ +

Build a local image

+

You will need to build a local image in any of the following cases:

+
    +
  • You are making substantive changes to the website UI
  • +
  • You are ready to deploy your custom site to GCP
  • +
+ +

Building from the master branch includes the very latest changes in Github, that may not have been tested. Instead, we recommend that you use the tested “stable” branch equivalent of the stable Docker image. This branch is customdc_stable, and is available at https://github.com/datacommonsorg/website/tree/customdc_stable.

+ +
+

Note: If you are working on a large-scale customization, we recommend that you use a version control system to manage your code. We provide some procedures for Github.

+
+ +

Clone the stable branch only

+ +

Use this procedure if you are not using Github, or if you are using Github and want to create a new source directory and start from scratch.

+ +
    +
  1. Run the following command: +
    +git clone https://github.com/datacommonsorg/website --branch customdc_stable --single-branch  [DIRECTORY]
    +
    +

    This creates a new local branch called customdc_stable set to track the Data Commons repo branch.

    +
  2. +
  3. To verify, run: +
    +cd website | cd DIRECTORY
    +git branch -vv
    +
    +

    You should see output like the following:

    + +
    * customdc_stable 83732891 [origin/customdc_stable] 2024-11-06 Custom DC stable release (#4710)
    +
    +

    Rather than developing on this default branch, we recommend that you create another branch.

    +
  4. +
+ +

Sync code to the stable branch

+ +

The following procedure uses Github. If you are using another version control system, use the appropriate methods for updating submodules and syncing.

+ +
    +
  1. Switch to the directory where you have cloned the Data Commons doe: +
    +cd website | cd DIRECTORY
    +
    +
  2. +
  3. Update files: +
    git pull origin customdc_stable
    +
    +

    Note that origin here refers to the source datacommonsorg/website repo. You may be using another remote name to point to that repo.

    + +

    You should see output like the following:

    +
    From https://github.com/datacommonsorg/website
    +* branch              customdc_stable -> FETCH_HEAD
    +Already up to date.
    +
    +
  4. +
  5. Create and update the necessary submodules: +
    git submodule update --init --recursive
    +
    +

    You should see output like the following:

    +
    Submodule 'import' (https://github.com/datacommonsorg/import.git) registered for path 'import'
    +Submodule 'mixer' (https://github.com/datacommonsorg/mixer.git) registered for path 'mixer'
    +Submodule path 'import': checked out '7d197583b6ad0dfe0568532f919482527c004a8e'
    +Submodule path 'mixer': checked out '478cd499d4841a14efaf96ccf71bd36b74604486'
    +
    +
  6. +
+ +

Build the repo locally

+ +

Run the following command to build the repo:

+ +
+docker build --tag IMAGE_NAME:IMAGE_TAG \
+-f build/cdc_services/Dockerfile .
+
+ +
    +
  • The image name is a meaningful name, such as datacommons-services.
  • +
  • The image tag is a meaningful description of the version you are building, such as latest.
  • +
+ +

It will take several minutes to build.

+ +

To run the container with the local SQLite database, start the Docker container as described below.

+ +

To upload and deploy the container to the Cloud, see Deploy services to Google Cloud for procedures.

+ +

Run the services container locally

+ +

Start the services using the locally built repo. If you have made changes to any of the UI components (or directories), be sure to map the custom directories (or alternative directories) to the Docker workspace directory.

+ +
docker run -it \
+--env-file $PWD/custom_dc/env.list \
+-p 8080:8080 \
+-e DEBUG=true \
+-v INPUT_DIRECTORY:INPUT_DIRECTORY \
+-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
+[-v $PWD/server/templates/custom_dc/custom:/workspace/server/templates/custom_dc/custom \]
+[-v $PWD/static/custom_dc/custom:/workspace/static/custom_dc/custom \]
+IMAGE_NAME:IMAGE_TAG
+
+ +

Troubleshooting

+ +

Having trouble? Visit our Troubleshooting Guide for detailed solutions to common problems.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/custom_data.html b/custom_dc/custom_data.html new file mode 100644 index 000000000..47ae9e902 --- /dev/null +++ b/custom_dc/custom_data.html @@ -0,0 +1,1461 @@ + + + + + Prepare and load your own data - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Prepare and load your own data

+ +

This page shows you how to format and load your own custom data into your local instance. This is step 2 of the recommended workflow.

+ + + +

Overview

+ +

Custom Data Commons requires that you provide your data in a specific schema, format, and file structure. We strongly recommend that, before proceeding, you familiarize yourself with the basics of the Data Commons data model by reading through Key concepts, in particular, entities, statistical variables, and observations.

+ +

At a high level, you need to provide the following:

+ +
    +
  • All data must be in CSV format, using the schema described below.
  • +
  • You must also provide a JSON configuration file, named config.json, that specifies how to map and resolve the CSV contents to the Data Commons schema knowledge graph. The contents of the JSON file are described below.
  • +
  • Depending on how you define your statistical variables (metrics), you may need to provide MCF (Meta Content Framework) files.
  • +
+ +

Files and directory structure

+ +

You can have as many CSV and MCF files as you like, and they can be in multiple subdirectories. There must only be one JSON config file, in the top-level input directory. For example:

+ +
my_data/
+├── config.json
+├── (nodes1.mcf)
+├── datafile1.csv
+├── datafile2.csv
+└── some_more_data/
+    ├── (nodes2.mcf)
+    ├── datafile3.csv
+    └── datafile4.csv
+
+

The following sections walk you through the process of setting up your data.

+ +

Step 1: Identify your statistical variables

+ +

Your data undoubtedly contains metrics and observed values. In Data Commons, the metrics themselves are known as statistical variables, and the time series data, or values over time, are known as observations. While observations are always numeric, statistical variables must be defined as nodes in the Data Commons knowledge graph.

+ +

Statistical variables must follow a certain model: it includes a measure (e.g. “median age”) on a set of things of a certain type (e.g. “persons”) that satisfy some set of constraints (e.g. “gender is female”). To explain what this means, consider the following example. Let’s say your dataset contains the number of schools in U.S. cities, broken down by level (elementary, middle, secondary) and type (private, public), reported for each year (numbers are not real, but are just made up for the sake of example):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CITYYEARSCHOOL_TYPESCHOOL_LEVELCOUNT
San Francisco2023publicelementary300
San Francisco2023publicmiddle300
San Francisco2023publicsecondary200
San Francisco2023privateelementary100
San Francisco2023privatemiddle100
San Francisco2023privatesecondary50
San Jose2023publicelementary400
San Jose2023publicmiddle400
San Jose2023publicsecondary300
San Jose2023privateelementary200
San Jose2023privatemiddle200
San Jose2023privatesecondary100
+ +

The measure here is a simple count; the set of things is “schools”; and the constraints are the type and levels of the schools, namely “public”, “private”, “elementary”, “middle” and “secondary”. All of these things must be encoded as separate variables. Therefore, although the properties of school type and school level may already be defined in the Data Commons knowledge graph (or you may need to define them), they cannot be present as columns in the CSV files that you store in Data Commons. Instead, you must create separate “count” variables to represent each case. In our example, you would actually need 6 different variables:

+
    +
  • Count_School_Public_Elementary
  • +
  • Count_School_Public_Middle
  • +
  • Count_School_Public_Secondary
  • +
  • Count_School_Private_Elementary
  • +
  • Count_School_Private_Middle
  • +
  • Count_School_Private_Secondary
  • +
+ +

If you wanted totals or subtotals of combinations, you would need to create additional variables for these as well.

+ +

Step 2: Choose between “implicit” and “explicit” schema definition

+ +

Custom Data Commons supports two ways of importing your data:

+
    +
  • Implicit schema definition. This method is simplest, and does not require that you write MCF files, but it is more constraining on the structure of your data. You don’t need to provide variables and entities in DCID format, but you must follow a strict column ordering, and variables must be in variable-per-column format, described below. Naming conventions are loose, and the Data Commons importer will generate DCIDs for your variables and observations, based on a predictable column order. This method is simpler and recommended for most datasets.
  • +
  • Explicit schema definition. This method is a bit more involved, as you must explicitly define DCIDs for all your variables as nodes in MCF files. All variables and entities in the CSVs must reference DCIDs. Using this method allows you to specify variables in variable-per-row format, which is a bit more flexible. There are a number of cases for which this option might be a better choice: +
      +
    • You have hundreds of variables, which may be unmanageable as separate columns or files.
    • +
    • You want to be able to specify additional properties, for example, unit of measurement, of the observations at a more granular level than per-file. As an example, let’s say you have a variable that measures financial expenses, across multiple countries; you may want to be able to specify the country-specific currency of each observation.
    • +
    • In the case that you are missing observations for specific entities (e.g. places) or time periods for specific variables, and you don’t want to have lots of null values in columns (sparse tables).
    • +
    +
  • +
+ +

To illustrate the difference between variable-per-column and variable-per-row schemas, let’s use the schools example data again. In variable-per-column, you would represent the dataset as follows:

+ +

Variable-per-column schema

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CITYYEARCOUNT_SCHOOL_PUBLIC_ELEMENTARYCOUNT_SCHOOL_PUBLIC_MIDDLECOUNT_SCHOOL_PUBLIC_SECONDARYCOUNT_SCHOOL_PRIVATE_ELEMENTARYCOUNT_SCHOOL_PRIVATE_MIDDLECOUNT_SCHOOL_PRIVATE_SECONDARY
San Francisco202330030020010010050
San Jose2023400400300200200100
+ +

The names that appear in the columns and rows don’t need to be DCIDs or follow any convention, because the columns must always be specified in this exact sequence:

+ +

ENTITY, OBSERVATION_DATE, STATISTICAL_VARIABLE1, STATISTICAL_VARIABLE2, …

+ +

In variable-per-row, the same dataset would be provided as follows:

+ +

Variable-per-row schema

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CITYYEARVARIABLEOBSERVATION
geoId/06670002023Count_School_Public_Elementary300
geoId/06670002023Count_School_Public_Middle300
geoId/06670002023Count_School_Public_Secondary200
geoId/06670002023Count_School_Private_Elementary100
geoId/06670002023Count_School_Private_Middle100
geoId/06670002023Count_School_Private_Secondary50
geoId/060852023Count_School_Public_Elementary400
geoId/060852023Count_School_Public_Middle400
geoId/060852023Count_School_Public_Secondary300
geoId/060852023Count_School_Private_Elementary200
geoId/060852023Count_School_Private_Middle200
geoId/060852023Count_School_Private_Secondary100
+ +

The names and order of the columns aren’t important, as you can map them to the expected columns in the JSON file. However, the city and variable names must be existing DCIDs. If such DCIDs don’t already exist in the base Data Commons, you must provide definitions of them in MCF files.

+ +

Prepare your data using implicit schema

+ +

In this section, we will walk you through a concrete example of how to go about setting up your CSV and JSON files. Also see the example files provided in https://github.com/datacommonsorg/website/tree/master/custom_dc/sample.

+ +

Prepare the CSV data files

+ +

As mentioned above, CSV files using implicit schema must contain these columns – and only these columns, no others – in the following order:

+ +

ENTITY, OBSERVATION_DATE, STATISTICAL_VARIABLE1, STATISTICAL_VARIABLE2, …

+ +

The ENTITY is an existing entity, most commonly a place. The best way to think of the entity is as a key that could be used to join to other data sets. The column heading can be expressed as any existing place-related property; see Place types for a full list. It may also be any of the special DCID prefixes listed in Special place names.

+ +
+

Note: The type of the entities in a single file should be unique; do not mix multiple entity types in the same CSV file. For example, if you have observations for cities and counties, put all the city data in one CSV file and all the county data in another one.

+
+ +

The DATE is the date of the observation and should be in the format YYYY, YYYY-MM, or YYYY-MM-DD. The heading can be anything, although as a best practice, we recommend using a corresponding identifier, such as year, month or date.

+ +

The VARIABLE should contain a metric observation at a particular time. It could be an existing variable in the knowledge graph, to which you will add a different provenance, or it can be a new one. The heading can be anything, but you should encode the relevant attributes being measured, so that the importer can correctly create a new variable for you.

+ +

The variable values must be numeric. Zeros and null values are accepted: zeros will be recorded and null values ignored. Here is an example of some real-world data from the WHO on the prevalance of smoking in adult populations, broken down by sex, in the correct CSV format:

+ +
country,year,Adult_curr_cig_smokers,Adult_curr_cig_smokers_female,Adult_curr_cig_smokers_male
+Afghanistan,2019,7.5,1.2,13.4
+Angola,2016,,1.8,14.3
+Albania,2018,,4.5,35.7
+United Arab Emirates,2018,6.3,1.6,11.1
+
+

Note that the data is missing values for the total population percentage for Angola and Albania.

+ +

You can have as many CSV files as you like, and they can be stored in a single directory, or one directory and multiple subdirectories.

+ +

Special place names

+ +

In addition to the place names listed in Place types, you can also use the following special names as headings:

+ +
    +
  • dcid — An already resolved DCID. Examples:country/USA, geoId/06
  • +
  • country3AlphaCode — Three-character country codes. Examples: USA, CHN
  • +
  • geoId — Place geo IDs. Examples: 06, 023
  • +
  • lat#lng — Latitude and longitude of the place using the format lat#long. Example: 38.7#-119.4
  • +
  • wikidataId — Wikidata place identifiers. Example: Q12345
  • +
+ +

You can also simply use the heading name or place and the importer will resolve it automatically.

+ +

The following are all valid examples of headers:

+ +
geoId,observationYear,statVar1,statVar2
+06,2021,555,666
+08,2021,10,10
+
+ +
name,observationYear,statVar1,statVar2
+California,2021,555,666
+Colorado,2021,10,10
+
+ +
dcId,observationYear,statVar1,statVar2
+geoId/06,2021,555,666
+geoId/08,2021,10,10
+
+ +

Write the JSON config file

+ +

You must define a config.json in the top-level directory where your CSV files are located. With the implicit schema method, you need to provide 3 specifications:

+
    +
  • The input files location and entity type
  • +
  • The sources and provenances of the data
  • +
  • Optionally, additional properties of the statistical variables you’ve used in the CSV files
  • +
+ +

Here is an example of how the config file would look for WHO CSV file we defined earlier. More details are below.

+ +
{
+  "inputFiles": {
+    "adult_cig_smoking.csv": {
+      "entityType": "Country",
+      "provenance": "UN_WHO",
+      "observationProperties" : {
+        "unit": "percentage"
+      }
+    }
+  },
+  "variables": {
+    "Adult_curr_cig_smokers": {
+      "name": "Adult Current Cigarette Smokers",
+      "description": "Percentage of smokers in the total adult population",
+      "searchDescriptions": [
+        "Prevalence of smoking among adults in world countries in the years 2016 - 2019."
+      ],
+      "group": "WHO"
+    },
+    "Adult_curr_cig_smokers_female": {
+      "name": "Adult Current Cigarette Smokers Female",
+      "description": "Percentage of smokers in the female adult population",
+      "searchDescriptions": [
+        "Prevalence of smoking among adult women in world countries in the years 2016 - 2019."
+      ],
+      "group": "WHO"
+    },
+      "Adult_curr_cig_smokers_male": {
+      "name": "Adult Current Cigarette Smokers Male",
+      "description": "Percentage of smokers in the male adult population",
+      "searchDescriptions": [
+        "Prevalence of smoking among adult men in world countries in the years 2016 - 2019."
+      ],
+      "group": "WHO"
+    }
+  },
+ "sources": {
+    "custom.who.int": {
+      "url": "https://custom.who.int",
+      "provenances": {
+        "UN_WHO": "https://custom.who.int/data/gho/indicator-metadata-registry/imr-details/6128"
+      }
+    }
+  }
+}
+
+

The following fields are specific to the variable-per-column format:

+ +
    +
  • input_files: +
      +
    • entityType: This must be an existing entity class in the Data Commons knowledge graph; it’s most commonly a place type.
    • +
    +
  • +
  • variables: This section is optional but recommended. You can use it to override names and associate additional properties with the statistical variables in the files, using the parameters described below. All parameters are optional. +
      +
    • name: A human-friendly readable name that will be shown throughout the UI.
    • +
    • description: A more detailed name that will be shown in the Statistical Variable Explorer.
    • +
    • searchDescriptions: This is a comma-separated list of natural-language text descriptions of the variable; these descriptions will be used to generate embeddings for the NL query interface.
    • +
    • group: This will display the variables as a group in the Statistical Variable Explorer, using the name you provide as heading.
    • +
    +
  • +
+ +

The other fields are explained in the Data config file specification reference.

+ +

Prepare your data using explicit schema

+ +

In this section, we will walk you through a concrete example of how to go about setting up your CSV, MCF and JSON files.

+ +

Write the MCF file

+ +

Nodes in the Data Commons knowledge graph are defined in Metadata Content Format (MCF). For custom Data Commons using explicit schema, you must define your statistical variables using MCF. The MCF file should have a .mcf suffix and be placed in the same top-level directory as the config.json file.

+ +

Here’s an example of defining the same statistical variables in the WHO data in MCF:

+ +
Node: dcid:Adult_curr_cig_smokers
+typeOf: dcid:StatisticalVariable
+name: "Prevalence of current cigarette smoking among adults (%)"
+populationType: dcid:Person
+measuredProperty: dcid:percent
+
+Node: dcid:Adult_curr_cig_smokers_female
+typeOf: dcid:StatisticalVariable
+name: "Prevalence of current cigarette smoking among adults (%) [Female]"
+populationType: dcid:Person
+measuredProperty: dcid:percent
+gender: dcid:Female
+
+Node: dcid:Adult_curr_cig_smokers_male
+typeOf: dcid:StatisticalVariable
+name: "Prevalence of current cigarette smoking among adults (%) [Male]"
+populationType: dcid:Person
+measuredProperty: dcid:percent
+gender: dcid:Male
+
+ +

The order of nodes and fields within nodes does not matter.

+ +

The following fields are always required:

+
    +
  • Node: This is the DCID of the entity you are defining.
  • +
  • typeOf: In the case of statistical variable, this is always dcid:StatisticalVariable.
  • +
  • name: This is the descriptive name of the variable, that is displayed in the Statistical Variable Explorer and various other places in the UI.
  • +
  • populationType: This is the type of thing being measured, and its value must be an existing Class type. It is mainly used to classify variables into categories that appear in the Statistical Variable Explorer. In this example it is dcid:Person. For a full list of supported classes, you will have to send an API request, as described in Get a list of all existing statistical variables.
  • +
  • measuredProperty: This is a property of the thing being measured. It must be a domainIncludes property of the populationType you have specified. In this example, it is the percent of persons being measured. You can see the set of domainIncludes properties for a given populationType, using either of the following methods: + +
  • +
+ +

Note that all non-quoted field values must be prefixed with dcid: or dcs:, which are interchangeable. You may wish to add an optional namespace, separated by a slash (/); for example, who/Adult_curr_cig_smokers.

+ +

The following fields are optional:

+
    +
  • statType: By default this is dcid:measuredValue, which is simply a raw value of an observation. If your variable is a calculated value, such as an average, a minimum or maximum, you can use minValue, maxValue, meanValue, medianValue, sumvalue, varianceValue, marginOfError, stdErr. In this case, your data set should only include the observations that correspond to those calculated values.
  • +
  • measurementQualifier: This is similar to the observationPeriod field for CSV observations (see below) but applies to all observations of the variable. It can be any string representing additional properties of the variable, e.g. Weekly, Monthly, Annual. For instance, if the measuredProperty is income, you can use Annual or Monthly to distinguish income over different periods. If the time interval affects the meaning of variable and and values change significantly by the time period, you should use this field keep them separate.
  • +
  • measurementDenominator: For percentages or ratios, this refers to another statistical variable. For example, for per-capita, the measurementDenominator is Count_Person.
  • +
+ +

Additionally, you can specify any number of property-value pairs representing the constraints on the type identified by populationType. In our example, there is one constraint property, gender, which is a property of Person. The constraint property values are typically enumerations; such as genderType, which is a rangeIncludes property of gender. These will become additional sub-categories of the population type and displayed as such in the Statistical Variable Explorer. Using our example:

+ +

Stat Var Explorer

+ +

Prepare the CSV data files

+ +

CSV files using explicit schema contain the following columns using the following headings:

+ +
entity, variable, date, value [, unit] [, scalingFactor] [, measurementMethod] [, observationPeriod]
+
+

The columns can be in any order, and you can specify custom names for the headings and use the columnMappings field in the JSON file to map them accordingly (see below for details).

+ +

These columns are required:

+
    +
  • entity: The DCID of an existing entity in the Data Commons knowledge graph, typically a place.
  • +
  • variable: The DCID of the node you have defined in the MCF.
  • +
  • date: The date of the observation and should be in the format YYYY, YYYY-MM, or YYYY-MM-DD.
  • +
  • value: The value of the observation and must be numeric. The variable values must be numeric. Zeros and null values are accepted: zeros will be recorded and null values ignored.
  • +
+ +
+

Note: The type of the entities in a single file should be unique; do not mix multiple entity types in the same CSV file. For example, if you have observations for cities and counties, put all the city data in one CSV file and all the county data in another one.

+
+ +

The remaining columns are optional, and allow you to specify additional per-observation properties; see the descriptions of these in the JSON config file reference.

+ +

Here is an example of some real-world data from the WHO on the prevalance of smoking in adult populations, broken down by sex, in the correct CSV format:

+ +
SERIES,GEOGRAPHY,TIME_PERIOD,OBS_VALUE
+dcs:who/Adult_curr_cig_smokers_female,dcid:country/AFG,2019,1.2
+dcs:who/Adult_curr_cig_smokers_male,dcid:country/AFG,2019,13.4
+dcs:who/Adult_curr_cig_smokers,dcid:country/AFG,2019,7.5
+dcs:who/Adult_curr_cig_smokers_female,dcid:country/AGO,2016,1.8
+dcs:who/Adult_curr_cig_smokers_male,dcid:country/AGO,2016,14.3
+dcs:who/Adult_curr_cig_smokers_female,dcid:country/ALB,2018,4.5
+dcs:who/Adult_curr_cig_smokers_male,dcid:country/ALB,2018,35.7
+dcs:who/Adult_curr_cig_smokers_male,dcid:country/ARE,2018,11.1
+dcs:who/Adult_curr_cig_smoking_female,dcid:country/ARE,2018,1.6
+dcs:who/Adult_curr_cig_smokers,dcid:country/ARE,2018,6.3
+
+ +

In this case, the columns need to be mapped to the expected columns listed above; see below for details.

+ +

Write the JSON config file

+ +

You must define a config.json in the top-level directory where your CSV files are located. With the explicit schema method, you need to provide these specifications:

+
    +
  • The input files location and entity type
  • +
  • The sources and provenances of the data
  • +
  • Column mappings, if you are using custom names for the column headings
  • +
+ +

Here is an example of how the config file would look for the CSV file we defined above. More details are below.

+ +
{
+  "inputFiles": {
+    "adult_cig_smoking.csv": {
+      "provenance": "UN_WHO",
+      "format": "variablePerRow",
+      "columnMappings": {
+        "variable": "SERIES",
+        "entity": "GEOGRAPHY",
+        "date": "TIME_PERIOD",
+        "value": "OBS_VALUE"
+      }
+    }
+  },
+  "groupStatVarsByProperty": true,
+  "sources": {
+    "custom.who.int": {
+      "url": "https://custom.who.int",
+        "provenances": {
+          "UN_WHO": "https://custom.who.int/data/gho/indicator-metadata-registry/imr-details/6128"
+        }
+    }
+  }
+}
+
+ +

The following fields are specific to the variable-per-row format:

+
    +
  • input_files: +
      +
    • format must be variablePerRow (the default is variablePerColumn if not specified)
    • +
    • columnMappings are required if you have used custom column heading names. The format is DEFAULT_NAME : CUSTOM_NAME.
    • +
    +
  • +
  • groupStatVarsByProperty is optional, and allows you to group your variables together according to population type. They will be displayed together in the Statistical Variable Explorer.
  • +
+ +

The other fields are explained in the Data config file specification reference

+ +

Data config file specification reference

+ +

Here is the general spec for the config.json file:

+ +
+{  
+  "inputFiles": {  
+    "FILE_NAME1": {  
+      "entityType": "ENTITY_PROPERTY",  
+      "ignoreColumns": ["COLUMN1", "COLUMN2", ...],  
+      "provenance": "NAME",
+      "format": "variablePerColumn" | "variablePerRow",
+      "columnMappings": {
+        "variable": "NAME",
+        "entity": "NAME",
+        "date": "NAME",
+        "value": "NAME",
+        "unit": "NAME",
+        "scalingFactor": "NAME",
+        "measurementMethod": "NAME",
+        "observationPeriod": "NAME"
+      }
+      "observationProperties" {
+        "unit": "MEASUREMENT_UNIT",
+        "observationPeriod": "OBSERVATION_PERIOD",
+        "scalingFactor": "DENOMINATOR_VALUE",
+        "measurementMethod": "METHOD"
+      }
+    },  
+  ...  
+  "includeInputSubdirs": true | false,
+
+  "variables": {  
+    "VARIABLE1": {"group": "GROUP_NAME1"},  
+    "VARIABLE2": {"group": "GROUP_NAME1"},  
+    "VARIABLE3": {  
+      "name": "DISPLAY_NAME",  
+      "description": "DESCRIPTION",  
+      "searchDescriptions": ["SENTENCE1", "SENTENCE2", ...],  
+      "group": "GROUP_NAME2",  
+      "properties": {  
+        "PROPERTY_NAME1":"VALUE",  
+        "PROPERTY_NAME2":"VALUE",  
+         …  
+           }  
+    },  
+  },   
+  "groupStatVarsByProperty": false | true,
+  "sources": {  
+    "SOURCE_NAME1": {  
+      "url": "URL",  
+      "provenances": {  
+        "PROVENANCE_NAME1": "URL",  
+        "PROVENANCE_NAME2": "URL",  
+        ...  
+      }  
+    }  
+  }  
+}  
+
+ +

Each section contains some required and optional fields, which are described in detail below.

+ +

Input files

+ +

The top-level inputFiles field should encode a map from the CSV input file name to parameters specific to that file. Keys can be individual file names or wildcard patterns if the same configuration applies to multiple files.

+ +

You can use the * wildcard; matches are applied in the order in which they are specified in the config. For example, in the following:

+ +
{
+ "inputFiles": {
+    "foo.csv": {...},
+    "bar*.csv": {...},
+    "*.csv": {...}
+  }
+}
+
+ +

The first set of parameters only applies to foo.csv. The second set of parameters applies to bar.csv, bar1.csv, bar2.csv, etc. The third set of parameters applies to all CSVs except the previously specified ones, namely foo.csv and bar*.csv.

+ +

If you are using subdirectories, specify the file names using paths relative to the top-level directory (which you specify in the env.list file as the input directory), and be sure to set "includeInputSubdirs": true (the default is false if the option is not specified.) For example:

+ +
{
+ "inputFiles": {
+    "foo.csv": {...},
+    "bar*.csv": {...},
+    "*.csv": {...},
+    "data/*.csv": {...}
+  },
+  "includeInputSubdirs": true
+
+ +
+

Note: Although you don’t need to specify the names of MCF files in the inputFiles block, if you want to store them in subdirectories, you still need to set "includeInputSubdirs": true here.

+
+ +

Input file parameters

+ +
+
entityType (implicit schema only)
+
+

Required: All entities in a given file must be of a specific type. This type should be specified as the value of the entityType field. The importer tries to resolve entities to DCIDs of that type. In most cases, the entityType will be a supported place type; see Place types for a list.

+
+
ignoreColumns
+
+

Optional: The list of column names to be ignored by the importer, if any.

+
+
provenance
+
+

Required: The provenance (name) of this input file. Provenances typically map to a dataset from a source. For example, WorldDevelopmentIndicators provenance (or dataset) is from the WorldBank source.

+
+
+ +

You must specify the provenance details under sources.provenances; this field associates one of the provenances defined there to this file.

+ +
+
observationProperties (implicit schema only)
+
+

Optional: Additional information about each contained in the CSV file. Currently, the following properties are supported:

+
    +
  • unit: The unit of measurement used in the observations. This is a string representing a currency, area, weight, volume, etc. For example, SquareFoot, USD, Barrel, etc.
  • +
  • measurementPeriod: The period of time in which the observations were recorded. This must be in ISO duration format, namely P[0-9][Y|M|D|h|m|s]. For example, P1Y is 1 year, P3M is 3 months, P3h is 3 hours.
  • +
  • measurementMethod: The method used to gather the observations. This can be a random string or an existing DCID of MeasurementMethodEnum type; for example, EDA_Estimate or WorldBankEstimate.
  • +
  • scalingFactor: An integer representing the denominator used in measurements involving ratios or percentages. For example, for percentages, the denominator would be 100.
  • +
+
+
+ +

Note that you cannot mix different property values in a single CSV file. If you have observations using different properties, you must put them in separate CSV files.

+ +
+
format
+
+

Only needed to specify variablePerRow for explicit schemas. The assumed default is variablePerColumn.

+
+
columnMappings (explicit schema only)
+
+

Optional: If headings in the CSV file does not use the default names, the equivalent names for each column.

+
+
+ +

Variables (implicit schema only)

+ +

The variables section is optional. You can use it to override names and associate additional properties with the statistical variables in the files, using the parameters described below. All parameters are optional. If you don’t provide this section, the importer will automatically derive the variable names from the CSV file.

+ +

Variable parameters

+ +
+
name
+
+

The display name of the variable, which will show up throughout the UI. If not specified, the column name is used as the display name.
+The name should be concise and precise; that is, the shortest possible name that allow humans to uniquely identify a given variable. The name is used to generate NL embeddings.

+
+
description
+
+

A long-form description of the variable.

+
+
properties
+
+

Additional Data Commons properties associated with this variable. This section is analogous to the fields specified in an MCF Node definition.

+
+
+ +

Each property is specified as a key:value pair. Here are some examples:

+ +
{
+  "populationType": "schema:Person",
+  "measuredProperty": "age",
+  "statType": "medianValue",
+  "gender": "Female"
+}
+
+ +
+
group
+
+

By default, the Statistical Variables Explorer will display all custom variables as a group called “Custom Variables”. You can use this option to create multi-level hierarchies, and assign different variables to groups. The value of the group option is used as the heading of the group. For example, in the sample data, the group name OECD is used to group together the two variables from the two CSV files:

+
+
+ +

group_screenshot

+ +

You can have a multi-level group hierarchy by using / as a separator between each group.

+ +
+
searchDescriptions
+
+

An array of descriptions to be used for creating more NL embeddings for the variable. This is only needed if the variable name is not sufficient for generating embeddings.

+
+
+ +

groupStatVarsByProperty (explicit schema only)

+ +

Optional: Causes the Statistical Variable Explorer to create a top-level category called “Custom Variables”, and groups together variables with the same population types and measured properties. For example:

+ +

group_screenshot

+ +

If you would like your custom variables to be displayed together, rather than spread among existing categories, this option is recommended.

+ +

Sources

+ +

The sources section encodes the sources and provenances associated with the input dataset. Each named source is a mapping of provenances to URLs.

+ +

Source parameters

+ +
+
url
+
Required: The URL of the named source. For example, for named source U.S. Social Security Administration, it would be https://www.ssa.gov.
+
provenances
+
Required: A set of NAME:URL pairs. Here are some examples:
+
+ +
{
+  "USA Top Baby Names 2022": "https://www.ssa.gov/oact/babynames/",
+  "USA Top Baby Names 1923-2022": "https://www.ssa.gov/oact/babynames/decades/century.html"
+}
+
+ +

Load local custom data

+ +

The following procedures show you how to load and serve your custom data locally.

+ +

To load data in Google Cloud, see instead Load data in Google Cloud for procedures.

+ +

Configure environment variables

+ +

Edit the env.list file you created previously as follows:

+
    +
  • Set the INPUT_DIR variable to the full path to the directory where your input files are stored.
  • +
  • Set the OUTPUT_DIR variable to the full path to the directory where you would like the output files to be stored. This can be the same or different from the input directory. When you rerun the Docker data management container, it will create a datacommons subdirectory under this directory.
  • +
+ +

Start the Docker containers with local custom data

+ +

Once you have configured everything, use the following commands to run the data management container and restart the services container, mapping your input and output directories to the same paths in Docker.

+ +

Step 1: Start the data management container

+ +

In one terminal window, from the root directory, run the following command to start the data management container:

+ +
+docker run \
+--env-file $PWD/custom_dc/env.list \
+-v INPUT_DIRECTORY:INPUT_DIRECTORY \
+-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
+gcr.io/datcom-ci/datacommons-data:stable
+
+ +
(Optional) Start the data management container in schema update mode
+ +

If you have tried to start a container, and have received a SQL check failed error, this indicates that a database schema update is needed. You need to restart the data management container, and you can specify an additional, optional, flag, DATA_RUN_MODE=schemaupdate. This mode updates the database schema without re-importing data or re-building natural language embeddings. This is the quickest way to resolve a SQL check failed error during services container startup.

+ +

To do so, add the following line to the above command:

+ +
docker run \
+...
+-e DATA_RUN_MODE=schemaupdate \
+...
+gcr.io/datcom-ci/datacommons-data:stable
+
+ +

Once the job has run, go to step 2 below.

+ +

Step 2: Start the services container

+ +

In another terminal window, from the root directory, run the following command to start the services container:

+ +
+docker run -it \
+-p 8080:8080 \
+-e DEBUG=true \
+--env-file $PWD/custom_dc/env.list \
+-v INPUT_DIRECTORY:INPUT_DIRECTORY \
+-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
+gcr.io/datcom-ci/datacommons-services:stable
+
+ +

Any time you make changes to the CSV or JSON files and want to reload the data, you will need to rerun the data management container, and then restart the services container.

+ +

Inspect the SQLite database

+ +

If you need to troubleshoot custom data, it is helpful to inspect the contents of the generated SQLite database.

+ +

To do so, from a terminal window, open the database:

+ +
sqlite3 OUTPUT_DIRECTORY/datacommons/datacommons.db
+
+ +

This starts the interactive SQLite shell. To view a list of tables, at the prompt type .tables. The relevant table is observations.

+ +

At the prompt, enter SQL queries. For example, for the sample OECD data, this query:

+ +
sqlite> select * from observations limit 10;
+
+

returns output like this:

+ +
country/BEL|average_annual_wage|2000|54577.62735|c/p/1
+country/BEL|average_annual_wage|2001|54743.96009|c/p/1
+country/BEL|average_annual_wage|2002|56157.24355|c/p/1
+country/BEL|average_annual_wage|2003|56491.99591|c/p/1
+country/BEL|average_annual_wage|2004|56195.68432|c/p/1
+country/BEL|average_annual_wage|2005|55662.21541|c/p/1
+...
+
+ +

To exit the sqlite shell, press Ctrl-D.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/custom_ui.html b/custom_dc/custom_ui.html new file mode 100644 index 000000000..791152a4b --- /dev/null +++ b/custom_dc/custom_ui.html @@ -0,0 +1,620 @@ + + + + + Customize the site - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Customize the site

+ +

This page shows you how to customize the UI of your local instance. This is step 3 of the recommended workflow.

+ + + +

Overview

+ +

The default custom Data Commons image provides a bare-bones UI that you will undoubtedly want to customize to your liking. Data Commons uses the Python Flask web framework and Jinja HTML templates. If you’re not familiar with these, the following documents are good starting points:

+ + + +

HTML and CSS customization files are provided as samples to get you started. They are as follows:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Directory/filesDescription
server/templates/custom_dc/custom/base.htmlTemplate file for the site's header and footer. More details below.
server/templates/custom_dc/custom/homepage.htmlTemplate file for the site's home page
server/templates/custom_dc/custom/browser_landing.htmlTemplate file for the Graph Browser landing page. You can change the default text.
static/custom_dc/custom/overrides.cssStylesheet overrides for the site.
static/custom_dc/custom/logo.pngSample logo file – replace with your own.
+ +

Note that the custom parent directory is customizable as the FLASK_ENV environment variable. You can rename the directory as desired and update the environment variable in custom_dc/env.list.

+ +

To enable the changes to be picked up by the Docker image, and allow you to refresh the browser for further changes, restart the Docker image with this additional flag to map the directories to the Docker workspace:

+ +
-v $PWD/server/templates/custom_dc/custom:/workspace/server/templates/custom_dc/custom
+-v $PWD/static/custom_dc/custom:/workspace/static/custom_dc/custom
+
+ + + +

If you have renamed the parent custom directory, be sure to use that name in the flag.

+ +

Customize HTML templates

+ +

You can customize the page header and footer (by default, empty) in base.html by adding or changing the HTML elements within the <header></header> and <footer></footer> tags, respectively.

+ + + +

Customize Javascript and styles

+ +

Use the overrides.css file to customize the default Data Commons styles. The file provides a default color override. You can add all style overrides to that file.

+ +

Alternatively, if you have existing existing CSS and Javascript files, put them under the /static/custom_dc/custom folder. Then include these files in the <head> section of the corresponding HTML files as:

+ +
+<link href="/custom_dc/custom/FILENAME.css|js" rel="stylesheet" />
+
+ +

See server/templates/custom_dc/custom/new.html as an example.

+ +
+

Note: Currently, making changes to any of the files in the static/ directory, even if you’re testing locally, requires that you rebuild a local version of the repo to pick up the changes, as described in Build a local image. We plan to fix this in the near future.

+
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/data_cloud.html b/custom_dc/data_cloud.html new file mode 100644 index 000000000..766f4b78e --- /dev/null +++ b/custom_dc/data_cloud.html @@ -0,0 +1,910 @@ + + + + + Load data in Google Cloud - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Load data in Google Cloud

+ +

This page shows you how to store your custom data in Google Cloud, and create the data management container as a Google Cloud Run job. This is step 4 of the recommended workflow.

+ + + +

Overview

+ +

Once you have tested locally, the next step is to get your data into the Google Cloud Platform. You upload your CSV and JSON files to Google Cloud Storage, and run the Data Commons data management Docker container as a Cloud Run job. The job will transform and store the data in a Google Cloud SQL database, and generate NL embeddings stored in Cloud Storage.

+ +

data management setup

+ +

Alternatively, if you have a very large data set, you may find it faster to store your input files and run the data management container locally, and output the data to Google Cloud Storage. If you would like to use this approach, follow steps 1 to 3 of the one-time setup steps below and then skip to Run the data management container locally.

+ +

Prerequisites

+ +
    +
  • A GCP billing account and project.
  • +
  • Optional: Install the gcloud CLI.
  • +
+ +

One-time setup steps

+ +

Step 1: Choose a location

+ +

While you are testing, you can start with a single Google Cloud region; to be close to the base Data Commons data, you can use us-central1. However, once you launch, you may want to host your data and application closer to where your users will be. In any case, you should use the same region for your Google Cloud SQL instance, the Google Cloud Storage buckets, and the Google Cloud Run service where you will host the site. For a list of supported regions, see Cloud SQL Manage instance locations.

+ +

Step 2: Create a Google Cloud Storage bucket

+ +

This stores the CSV and JSON files that you will upload whenever your data changes. It also stores generated files files in a datacommons subdirectory when you run the data management job.

+ +
    +
  1. Go to https://console.cloud.google.com/storage/browser for your project.
  2. +
  3. Next to Buckets, click Create.
  4. +
  5. Enter a name for this bucket.
  6. +
  7. For the Location type, choose the same regional options as for Cloud SQL above.
  8. +
  9. When you have finished setting all the configuration options, click Create.
  10. +
  11. In the Bucket Details page, click Create Folder to create a new folder to hold your data and name it as desired.
  12. +
  13. +

    Optionally, create separate folders to hold input and output files, or just use the same one as for the input.

    + +

    Note: If you plan to run the data management container locally, you only need to create a single folder to hold the output files.

    +
  14. +
  15. Record the folder path(s) as gs://BUCKET_NAME/FOLDER_PATH for setting the INPUT_DIR and OUTPUT_DIR environment variables below.
  16. +
+ +

Step 3: Create a Google Cloud SQL instance

+ +

This stores the data that will be served at run time. The Data Commons data management job will create the SQL tables and populate them when you start the job.

+ +
    +
  1. Go to https://console.cloud.google.com/sql/instances for your project.
  2. +
  3. Next to Instances, click Create Instance.
  4. +
  5. Click Choose MySQL.
  6. +
  7. If necessary, enable APIs as directed.
  8. +
  9. Set an instance ID. Record the instance connection name in the form of INSTANCE_ID for setting environment variables below.
  10. +
  11. Set a root password, and record it for setting environment variables below.
  12. +
  13. For the Location type, choose the relevant regional option.
  14. +
  15. When you have finished setting all the configuration options, click Create Instance. It may take several minutes for the instance to be created.
  16. +
  17. When the instance is created and the left navigation bar appears, select Users.
  18. +
  19. Add at least one user and password.
  20. +
  21. Select Databases.
  22. +
  23. Click Create Database.
  24. +
  25. Choose a name for the database or use the default, datacommons.
  26. +
  27. Click Create.
  28. +
  29. In the Overview page for the new instance, record the Connection name to set in environment variables in the next step.
  30. +
+ + + +

Although this is not strictly required, we recommend that you store secrets, including your API keys and DB passwords, in Google Cloud Secret Manager, where they are encrypted in transit and at rest, rather than stored and transmitted in plain text. See also the Secret Manager documentation for additional options available.

+ +
    +
  1. Go to https://console.cloud.google.com/security/secret-manager for your project.
  2. +
  3. Click Create secret.
  4. +
  5. Enter a name that indicates the purpose of the secret; for example, for the Data Commons API key, name it something like dc-api-key.
  6. +
  7. In the Secret value field, enter the value.
  8. +
  9. Click Create secret.
  10. +
  11. Repeat the same procedure for the Maps API key and any passwords you created for your Cloud SQL database in step 3.
  12. +
+ +

Step 5: Create a Google Cloud Run job

+ +

Since you won’t need to customize the data management container, you can simply run an instance of the released container provided by Data Commons team, at https://console.cloud.google.com/gcr/images/datcom-ci/global/datacommons-data.

+ +

See also the Cloud Run documentation for links to more information on all the options you may set on your jobs.

+ +
    +
  1. Go to https://console.cloud.google.com/run/ for your project.
  2. +
  3. Click Create job.
  4. +
  5. In the Container image URL field, enter gcr.io/datcom-ci/datacommons-data:stable.
  6. +
  7. Optionally, in the Job name field, enter an alternative name as desired.
  8. +
  9. In the Region field, select the region you chose as your location.
  10. +
  11. Leave the default Number of tasks as 1.
  12. +
  13. Expand Container, Volumes, Connections, Security and expand Settings, and set the following options: +
      +
    • Resources > Memory: 8 GiB
    • +
    • Resources > CPU: 2
    • +
    + +

    Cloud Run job

    +
  14. +
+ +

Now set environment variables:

+ +
    +
  1. Click the Variables and Secrets tab.
  2. +
  3. Click Add variable.
  4. +
  5. Add names and values for the following environment variables: +
      +
    • USE_CLOUDSQL: Set to true.
    • +
    • INPUT_DIR: Set to the Cloud Storage bucket and input folder that you created in step 2 above.
    • +
    • OUTPUT_DIR: Set to the Cloud Storage bucket (and, optionally, output folder) that you created in step 2 above. If you didn’t create a separate folder for output, specify the same folder as the INPUT_DIR.
    • +
    • CLOUDSQL_INSTANCE: Set to the full connection name of the instance you created in step 3 above.
    • +
    • DB_USER: Set to a user you configured when you created the instance in step 3, or to root if you didn’t create a new user.
    • +
    • DB_NAME: Only set this if you configured the database name to something other than datacommons.
    • +
    +
  6. +
  7. If you are not storing API keys and passwords in Google Secret Manager, add variables for DC_API_KEY and DB_PASS. Otherwise, click Reference a secret, in the Name field, enter DC_API_KEY, and from the Secret drop-down field, select the relevant secret you created in step 4. Repeat for DB_PASS.
  8. +
  9. +

    When you are finished, click Done.

    + +

    Cloud Run job

    +
  10. +
  11. If you have a large amount of data, adjust the Task capacity > Task timeout option accordingly. See Set task timeout (jobs) for more details.
  12. +
  13. Click Create (but don’t run it immediately).
  14. +
+ +

Manage your data

+ +

Step 1: Upload data files to Google Cloud Storage

+ +

As you are iterating on changes to the source CSV and JSON files, you can re-upload them at any time, either overwriting existing files or creating new folders. If you want versioned snapshots, we recommend that you create a new subfolder and store the latest version of the files there. If you prefer to simply incrementally update, you can simply overwrite files in a pre-existing folder. Creating new subfolders is slower but safer. Overwriting files is faster but riskier.

+ +
+
    +
  • Cloud Console
  • +
  • gcloud CLI
  • +
+
+
+
    +
  1. Go to https://console.cloud.google.com/storage/browse and select your custom Data Commons bucket.
  2. +
  3. Navigate to the folder you created in the earlier step.
  4. +
  5. Click Upload Files, and select all your CSV files and config.json.
  6. +
+
+
+
    +
  1. Navigate to your local "input" directory where your source files are located.
  2. +
  3. Run the following command: +
    gcloud storage cp config.json *.csv gs://BUCKET_NAME/FOLDER_PATH
    +
  4. +
+
+
+
+ +
+

Note: Do not upload the local datacommons subdirectory or its files.

+
+ +

Once you have uploaded the new data, you must rerun the data management Cloud Run job.

+ +

Step 2: Run the data management Cloud Run job

+ +

Now that everything is configured, and you have uploaded your data in Google Cloud Storage, you simply have to start the Cloud Run data management job to convert the CSV data into tables in the Cloud SQL database and generate the embeddings (in a datacommons/nl subfolder).

+ +

Every time you upload new input CSV or JSON files to Google Cloud Storage, you will need to rerun the job.

+ +
+
    +
  • Cloud Console
  • +
  • gcloud CLI
  • +
+
+
+
    +
  1. Go to https://console.cloud.google.com/run/jobs for your project.
  2. +
  3. From the list of jobs, click the link of the "datacommons-data" job you created above.
  4. +
  5. Optionally, if you have received a SQL check failed error when previously trying to start the container, and would like to minimize startup time, click Execute with overrides and click Add variable to set a new variable with name DATA_RUN_MODE and value schemaupdate.
  6. +
  7. Click Execute. It will take several minutes for the job to run. You can click the Logs tab to view the progress.
  8. +
+
+
+
    +
  1. From any local directory, run the following command: +
    gcloud run jobs execute JOB_NAME
    +
  2. +
  3. To view the progress of the job, run the following command: +
    gcloud beta run jobs logs tail JOB_NAME
    +
  4. +
+
+
+
+ +

When it completes, to verify that the data has been loaded correctly, see Inspect the Cloud SQL database.

+ +

(Optional) Run the data management Cloud Run job in schema update mode

+ +

If you have tried to start a container, and have received a SQL check failed error, this indicates that a database schema update is needed. You need to restart the data management container, and you can specify an additional, optional, flag, DATA_RUN_MODE=schemaupdate. This mode updates the database schema without re-importing data or re-building natural language embeddings. This is the quickest way to resolve a SQL check failed error during services container startup.

+ +
+
    +
  • Cloud Console
  • +
  • gcloud CLI
  • +
+
+
+
    +
  1. Go to https://console.cloud.google.com/run/jobs for your project.
  2. +
  3. From the list of jobs, click the link of the "datacommons-data" job you created above.
  4. +
  5. Optionally, select Execute > Execute with overrides and click Add variable to set a new variable with name DATA_RUN_MODE and value schemaupdate.
  6. +
  7. Click Execute. It will take several minutes for the job to run. You can click the Logs tab to view the progress.
  8. +
+
+
+
    +
  1. From any local directory, run the following command: +
    gcloud run jobs execute JOB_NAME --update-env-vars DATA_RUN_MODE=schemaupdate
    +
  2. +
  3. To view the progress of the job, run the following command: +
    gcloud beta run jobs logs tail JOB_NAME
    +
  4. +
+
+
+
+ +

Inspect the Cloud SQL database

+ +

To view information about the created tables:

+ +
    +
  1. Go to https://console.cloud.google.com/sql/instances for your project and select the instance you created earlier.
  2. +
  3. In the left panel, select Cloud SQL Studio.
  4. +
  5. In the Sign in to SQL Studio page, from the Database field, select the database you created earlier, e.g. datacommons.
  6. +
  7. Enter the user name and password and click Authenticate.
  8. +
  9. In the left Explorer pane that appears, expand the Databases icon, your database name, and Tables. The table of interest is observations. You can see column names and other metadata.
  10. +
  11. To view the actual data, in the main window, click New SQL Editor tab. This opens an environment in which you can enter and run SQL queries.
  12. +
  13. +

    Enter a query and click Run. For example, for the sample OECD data, if you do select * from observations limit 10;, you should see output like this:

    + +

    screenshot_sqlite

    +
  14. +
+ +

Advanced setup (optional): Run the data management container locally

+ +

This process is similar to running both data management and services containers locally, with a few exceptions:

+
    +
  • Your input directory will be the local file system, while the output directory will be a Google Cloud Storage bucket and folder.
  • +
  • You must start the job with credentials to be passed to Google Cloud, to access the Cloud SQL instance.
  • +
+ +

Before you proceed, ensure you have completed steps 1 to 3 of the One-time setup steps above.

+ +

Step 1: Set environment variables

+ +

To run a local instance of the services container, you need to set all the environment variables in the custom_dc/env.list file. See above for the details, with the following differences:

+
    +
  • For the INPUT_DIR, specify the full local path where your CSV and JSON files are stored, as described in the Quickstart.
  • +
  • Set GOOGLE_CLOUD_PROJECT to your GCP project name.
  • +
+ +

Step 2: Generate credentials for Google Cloud authentication

+ +

For the services to connect to the Cloud SQL instance, you need to generate credentials that can be used in the local Docker container for authentication. You should refresh the credentials every time you rerun the Docker container.

+ +

Open a terminal window and run the following command:

+ +
gcloud auth application-default login
+
+ +

This opens a browser window that prompts you to enter credentials, sign in to Google Auth Library and allow Google Auth Library to access your account. Accept the prompts. When it has completed, a credential JSON file is created in
+$HOME/.config/gcloud/application_default_credentials.json. Use this in the command below to authenticate from the docker container.

+ +

The first time you run it, may be prompted to specify a quota project for billing that will be used in the credentials file. If so, run this command:

+ +
gcloud auth application-default set-quota-project PROJECT_ID  
+
+ +

If you are prompted to install the Cloud Resource Manager API, press y to accept.

+ +

Step 3: Run the data management Docker container

+ +

From your project root directory, run:

+ +
docker run \
+--env-file $PWD/custom_dc/env.list \
+-v INPUT_DIRECTORY:INPUT_DIRECTORY \
+-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
+-e GOOGLE_APPLICATION_CREDENTIALS=/gcp/creds.json \
+-v $HOME/.config/gcloud/application_default_credentials.json:/gcp/creds.json:ro \
+gcr.io/datcom-ci/datacommons-data:VERSION
+
+ +

The version is latest or stable.

+ +

To verify that the data is correctly created in your Cloud SQL database, use the procedure in Inspect the Cloud SQL database above.

+ +

(Optional) Run the data management Docker container in schema update mode

+ +

If you have tried to start a container, and have received a SQL check failed error, this indicates that a database schema update is needed. You need to restart the data management container, and you can specify an additional, optional, flag, DATA_RUN_MODE to miminize the startup time.

+ +

To do so, add the following line to the above command:

+ +
docker run \
+...
+-e DATA_RUN_MODE=schemaupdate \
+...
+gcr.io/datcom-ci/datacommons-data:stable
+
+ +

Advanced setup (optional): Access Cloud data from a local services container

+ +

For testing purposes, if you wish to run the services Docker container locally but access the data in Google Cloud, use the following procedures.

+ +

Step 1: Set environment variables

+ +

To run a local instance of the services container, you will need to set all the environment variables, as described above in the custom_dc/env.list. You must also set the MAPS_API_KEY to your Maps API key.

+ +

Step 2: Generate credentials for Google Cloud default application

+ +

See the section above for procedures.

+ +

Step 3: Run the services Docker container

+ +

From the root directory of your repo, run the following command, assuming you are using a locally built image:

+
docker run -it \
+--env-file $PWD/custom_dc/env.list \
+-p 8080:8080 \
+-e DEBUG=true \
+-e GOOGLE_APPLICATION_CREDENTIALS=/gcp/creds.json \
+-v $HOME/.config/gcloud/application_default_credentials.json:/gcp/creds.json:ro \
+-v INPUT_DIRECTORY:INPUT_DIRECTORY \
+-v OUTPUT_DIRECTORY:OUTPUT_DIRECTORY \
+[-v $PWD/server/templates/custom_dc/custom:/workspace/server/templates/custom_dc/custom \]
+[-v $PWD/static/custom_dc/custom:/workspace/static/custom_dc/custom \]
+IMAGE_NAME:IMAGE_TAG
+
+ + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/deploy_cloud.html b/custom_dc/deploy_cloud.html new file mode 100644 index 000000000..8b6ba3741 --- /dev/null +++ b/custom_dc/deploy_cloud.html @@ -0,0 +1,702 @@ + + + + + Deploy services to Google Cloud - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Deploy services to Google Cloud

+ +

This page shows you how to build a custom services Docker container as a GCP artifact, upload it to the Artifact Registry, and create a Google Cloud Run service. This is step 5 of the recommended workflow.

+ + + +

System overview

+ +

When you are ready to host your custom Data Commons site in production, you create a Google Cloud Run service for the site. This is the production setup:

+ +

services setup

+ +

You push a locally built Docker image to the Google Cloud Artifact Registry, and then deploy the image as a Cloud Run service.

+ +

One-time setup: Create a Google Artifact Registry repository

+ +
    +
  1. Go to https://console.cloud.google.com/artifacts for your project.
  2. +
  3. Click Create Repository.
  4. +
  5. Specify a name for the repository.
  6. +
  7. In the Format option, select Docker.
  8. +
  9. In Location type, select Region, and specify the region you chose for your Google Cloud SQL instance .
  10. +
  11. Enable or disable Immutable image tags according to the workflow you prefer; that is, if you want to be able to reuse the same Docker tag for new images, keep this option disabled.
  12. +
  13. Click Create.
  14. +
+ +

Upload the Docker container to the Artifact Registry

+ +

This procedure creates a “dev” Docker package that you upload to the Google Cloud Artifact Registry. Any time you rebuild the image and want to deploy it to the cloud, you need to rerun this procedure.

+ +
    +
  1. Build a local version of the Docker image, following the procedure in Build a local image.
  2. +
  3. +

    Authenticate to gcloud:

    + +
    gcloud auth login
    +
    + +

    This opens a browser window that prompts you to enter credentials, sign in to Google Cloud SDK and allow Google Cloud SDK to access your account. Accept the prompts.

    +
  4. +
  5. +

    Generate credentials for the Docker package you will build in the next step. Docker package names must be in the format LOCATION-docker-pkg.dev, where the LOCATION is the region you have selected in the repository creation step previously; for example, us-central1.

    + +
    gcloud auth configure-docker LOCATION-docker.pkg.dev
    +
    + +

    When prompted to confirm creating the credentials file, click Y to accept.

    +
  6. +
  7. +

    Create a package from the source image created in step 1:

    + +
    docker tag SOURCE_IMAGE_NAME:SOURCE_IMAGE_TAG \  
    +LOCATION-docker.pkg.dev/PROJECT_ID/ARTIFACT_REPO/TARGET_IMAGE_NAME:TARGET_IMAGE_TAG  
    +
    + +
      +
    • The artifact repo must be an Artifact Registry repository you have created previously.
    • +
    • The target image name and tag can be the same as the source or different.
    • +
    +
  8. +
  9. +

    Push the image to the registry:

    + +
    docker push LOCATION-docker.pkg.dev/PROJECT_ID/ARTIFACT_REPO/TARGET_IMAGE_NAME:TARGET_IMAGE_TAG  
    +
    +
  10. +
+ +

This will take several minutes to upload.

+ +

When it completes, verify that the container has been uploaded in the Cloud Console:

+ +
    +
  1. Go to https://console.cloud.google.com/artifacts for your project.
  2. +
  3. In the list of repositories, click on the one you created above. Under Repository Details, you should see the Docker image listed.
  4. +
+ +

One-time setup: Create a Google Run service

+ +

This procedure shows you how to create a service and set environment variables using the Cloud Console.

+ +

See also Deploying to Cloud Run for more information on all the options you may set on your service.

+ +
    +
  1. Go to https://console.cloud.google.com/run/ for your project.
  2. +
  3. Click Create service.
  4. +
  5. Keep the default Deploy one revision from an existing container image enabled.
  6. +
  7. In the Container image URL field, click Select to open the Select container image window.
  8. +
  9. In the list of images that appears, navigate to container image you pushed in the previous step, highlight it and click Select.
  10. +
  11. In the Service name field, enter a name for your service.
  12. +
  13. In the Region field, select your location.
  14. +
  15. Under Authentication, select the relevant option depending on whether your site will be public or not. If it is public, enable Allow unauthenticated invocations.
  16. +
  17. Set the following options: +
      +
    • CPU allocation and pricing: CPU is always allocated
    • +
    • Service autoscaling > Minimum number of instances: 1
    • +
    + +

    Cloud Run service

    +
  18. +
  19. Expand Container, Volumes, Connections, Security > Container > Settings, and set the following options: +
      +
    • Resources > Memory: 8 GiB
    • +
    • Resources > CPU: 2
    • +
    + +

    Cloud Run service

    +
  20. +
  21. Expand the Variables and secrets tab.
  22. +
  23. Click the Variables and Secrets tab.
  24. +
  25. Click Add variable.
  26. +
  27. Add the same environment variables and secrets, with the same names and values as you did when you created the data management run job You can omit the INPUT_DIR variable. Add a variable or reference a secret for MAPS_API_KEY.
  28. +
  29. +

    When you are finished, click Done.

    + +

    Cloud Run service

    +
  30. +
  31. Under Execution environment > Autoscaling, set the following options: +
      +
    • Minimum number of instances: 1 + - Maximum number of instances: 1
    • +
    +
  32. +
  33. Disable Startup CPU boost.
  34. +
  35. +

    Under Cloud SQL connections click Add connection and select your Cloud SQL instance from the menu.

    + +

    Cloud Run service

    +
  36. +
+ +

Click Create to kick off the deployment. Click the Logs tab to see the status details of the operation. Once it completes, a link to the deployed image URL is listed at the top of the page. Click on the link to see the running instance.

+ +

Manage the service

+ +

Every time you make changes to the code and release a new Docker artifact, or rerun the data management job, you need to restart the service as well.

+ +
+
    +
  • Cloud Console
  • +
  • gcloud CLI
  • +
+
+
+
    +
  1. Go to the https://console.cloud.google.com/run/ page, click on the service you created above, and click Edit & Deploy Revision
  2. . +
  3. Select a new container image and click Deploy.
  4. +
+
+
+
    +
  1. From any local directory, run the following command: +
    gcloud run deploy SERVICE_NAME --image CONTAINER_IMAGE_URL
    +
  2. +
+
+
+
+ + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/faq.html b/custom_dc/faq.html new file mode 100644 index 000000000..228891732 --- /dev/null +++ b/custom_dc/faq.html @@ -0,0 +1,623 @@ + + + + + Frequently asked questions - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Custom Data Commons frequently asked questions

+ + + +

General questions

+ +

Should I contribute my data to the base Data Commons or should I run my own instance?

+ +

If you have determined that your data is a good fit for Data Commons, the main considerations for whether to host your data in the base Data Commons or in your own custom instance are as follows:

+
    +
  • If you have any private data, or you want to restrict access to your data, you must use your own instance.
  • +
  • If you want to maintain governance and licensing over your data, you should use your own instance.
  • +
  • If you want to control the UI of the website hosting your data, use your own instance.
  • +
  • If you want the widest possible visibility of your data, including direct access through Google Search, add your data to base Data Commons.
  • +
+ +

For detailed comparison on the differences between base and custom Data Commons, see the Overview page.

+ +

How can I request new features or provide feedback?

+ +

We use Google Issue Tracker to track bugs and feature requests. All tickets are publicly viewable.

+ +

Before opening a new ticket, please see if an existing feature request or bug report covering your issue has already been filed. If yes, upvote (click the +1 button ) and subscribe to it. If not, open a new feature request or bug report.

+ +

For any issue you file, make sure to indicate that it affects your Data Commons instance.

+ +

Privacy and security

+ +

Can I restrict access to my custom instance?

+ +

Yes; there are many options for doing so. If you want an entirely private site with a non-public domain, you may consider using a Google Virtual Private Cloud to host your instance. If you want to have authentication and authorization controls on your site, there are also many other options. Please see Restricting ingress for Cloud Run for more information.

+ +

Note that you cannot apply fine-grained access restrictions, such as access to specific data or pages. Access is either all or nothing. If you want to be able to partition off data, you would need to create additional custom instances.

+ +

Will my data or queries end up in base Data Commons?

+ +

Your user queries, observations data, or property values are never transferred to base Data Commons. The NL model built from your custom data lives solely in your custom instance. The custom Data Commons instance does make API calls to the base Data Commons instance (as depicted in this diagram) only in the following instances:

+
    +
  • At data load time, API calls are made from the custom instance to the base instance to resolve entity names to DCIDs; for example, if your data refers to a particular country name, the custom instance will send an API request to look up its DCID.
  • +
  • At run time, when a user enters an NL query, the custom instance uses its local NL model to identify the relevant statistical variables. The custom instance then issues two requests for statistical variable observations: a SQL query to your custom SQL database and an API call to the base Data Commons database. These requests only include DCIDs and contain no information about the original query or context of the user request. The data is joined by entity DCIDs.
  • +
  • At run time, when the website frontend renders a data visualization, it will also make the same two requests to get observations data.
  • +
+ +

Natural language processing

+ +

How does the natural language (NL) interface work?

+ +

The Data Commons NL interface has the ability to use a combination of different embedding models, heuristics and large-language models (LLMs) (as fallback). Given an NL query, it first detects schema information (variables, properties, etc.) and entities (e.g., places like “California”) in the query, and then responds with a set of charts chosen based on the query shape (ranking, etc.) and data existence constraints.

+ +

The custom instance uses a local open-source Python ML library, Sentence Transformers model, from https://huggingface.co/sentence-transformers, and does not use LLM fallback.

+ +

When you load data into a custom instance, the Data Commons NL server generates embeddings for both the base Data Commons data, and for your custom data, based on the statistical variables and search descriptions you have defined in your configuration. When a query comes in, the server generates equivalent embeddings, and the variables are assigned a relevance score based on cosine similarity.

+ +

Does the model use any Google technologies, such as Vertex AI?

+ +

No. While the base Data Commons uses Vertex AI, the custom instance uses open-source ML technologies only.

+ +

Where does the ML model run and where are embeddings stored?

+ +

The ML model runs entirely on your custom Data Commons instance, inside the Docker image. It does not use any Google-hosted systems, and data is never leaked to the base Data Commons. If a natural-language query requires data to be joined from the base data store, the custom site will use the embeddings that are locally generated before making the call to the base Data Commons to fetch the data.

+ +

Does the model use feedback from user behavior to adjust scoring?

+ +

No. However, you have the ability to improve query quality by improving your search descriptions.

+ +

How can I find out what terms my users are searching on?

+ +

The best way to record your users’ search queries is with Google Analytics. Data Commons exports many custom Google Analytics events that you can use to create dimensions to report on. In particular, for NL queries, there are three different event types, that are triggered when a user submits a query, when results are returned and so on. See https://github.com/datacommonsorg/website/blob/f5e8e87c2291d87dfa37a3a887f01d7ff28d6467/static/js/shared/ga_events.ts for details. For procedures on setting this up, see Report on custom dimensions.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/index.html b/custom_dc/index.html new file mode 100644 index 000000000..5dfd04ee2 --- /dev/null +++ b/custom_dc/index.html @@ -0,0 +1,680 @@ + + + + + Build your own Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Build your own Data Commons

+ + + +

Overview

+ +

A custom instance natively joins your data and the base Data Commons data (from datacommons.org) in a unified fashion. Your users can visualize and analyze the data seamlessly without the need for further data preparation.

+ +

You have full control over your own data and computing resources, with the ability to limit access to specific individuals or open it to the general public.

+ +

Note that each new Data Commons is deployed using the Google Cloud Platform (GCP).

+ +

Why use a custom Data Commons instance?

+ +

If you have the resources to develop and maintain a custom Data Commons instance, this is a good option for the following use cases:

+ +
    +
  • You want to host your data on your own website, and take advantage of Data Commons natural-language query interface, and exploration and visualization tools.
  • +
  • You want to add your own data to Data Commons but want to maintain ownership of the Cloud data.
  • +
  • You want to add your own data to Data Commons but want to customize the UI of the site.
  • +
  • You want to add your own private data to Data Commons, and restrict access to it.
  • +
+ +

For the following use cases, a custom Data Commons instance is not necessary:

+ +
    +
  • You want to share your data publicly on datacommons.org. In this case, please file a data request in our issue tracker to get started.
  • +
  • You want to make the base public data or visualizations available in your own site. For this purpose, you can call the Data Commons APIs from your site; see Data Commons web components for more details.
  • +
+ +

Comparison between base and custom Data Commons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureBase Data CommonsCustom Data Commons
Interactive tools (Exploration tools, Statistical Variable Explorer, etc.)yesyes
Natural language query interfaceyes, using Google AI technologies and modelsyes, using open-source models only1
REST APIsyesyes, no additional setup needed
Python and Pandas API wrappersyesyes, but requires additional setup2
Google Spreadsheetsyesyes, but requires additional setup2
Site access controlsn/ayes, using any supported Cloud Run mechanisms3
Fine-grained data access controls4non/a
+ +
    +
  1. Open-source Python ML library, Sentence Transformers model, from https://huggingface.co/sentence-transformers.
  2. +
  3. If you would like to support these facilities, please file a feature request or upvote an existing one.
  4. +
  5. For example, Virtual Private Cloud, Cloud IAM, and so on. Please see the GCP Restricting ingress for Cloud Run for more information on these options.
  6. +
  7. You cannot set access controls on specific data, only the entire custom site.
  8. +
+ +

System overview

+ +

Essentially, a custom Data Commons instance is a mirror of the public Data Commons, that runs in Docker containers hosted in the cloud. In the browsing tools, the custom data appears alongside the base data in the list of variables. When a query is sent to the custom website, a Data Commons server fetches both the custom and base data to provide multiple visualizations. At a high level, here is a conceptual view of a custom Data Commons instance:

+ +

setup1

+ +

A custom Data Commons instance uses custom data that you provide as raw CSV files. An importer script converts the CSV data into the Data Commons format and stores this in a SQL database. For local development, we provide a lightweight, open-source SQLite database; for production, we recommend that you use Google Cloud SQL.

+ +
+

Note: You have full control and ownership of your data, which will live in SQL data stores that you own and manage. Your data is never transferred to the base Data Commons data stores managed by Google; see full details in this FAQ.

+
+ +

In addition to the data, a custom Data Commons instance consists of two Docker containers:

+
    +
  • A “data management” container, with utilities for managing and loading custom data and embeddings used for natural-language processing
  • +
  • A “services” container, with the core services that serve the data and website
  • +
+ +

Details about the components that make up the containers are provided in the Quickstart guide.

+ +

Requirements and cost

+ +

A custom Data Commons site runs in a Docker container on Google Cloud Platform (GCP), using Google Cloud Run, a serverless solution that provides auto-scaling and other benefits. You will need the following:

+ +
    +
  • A GCP billing account and project
  • +
  • A Docker account
  • +
  • If you will be customizing the site’s UI, familiarity with the Python Flask web framework and Jinja HTML templating
  • +
+ +
+

Note: Data Commons does not support local Windows development natively. If you wish to develop Data Commons on Windows, you will need to use the Windows Subsystem for Linux.

+
+ +

If you already have an account with another cloud provider, we can provide a connector; please contact us if you are interested in this option.

+ +

In terms of development time and effort, to launch a site with custom data in compatible format and no UI customization, you can expect it to take less than three weeks. If you need substantial UI customization it may take up to four months.

+ +

The cost of running a site on Google Cloud Platform depends on the size of your data, the traffic you expect to receive, and the amount of geographical replication you want. For a singly-homed service with 5 GB of data serving 1 M queries per month, you can expect a cost of approximately $400 per month.

+ +

You can get precise information and cost estimation tools at Google Cloud pricing. A GCP setup must include:

+
    +
  • Cloud SQL
  • +
  • Cloud Storage
  • +
  • Cloud Run: Job + Service
  • +
  • Artifact Registry (< 1 GB storage>)
  • +
+ +

You may also need Cloud DNS, Networking - Cloud Loadbalancing, and Redis Memorystore + VPC networking (see Launch your Data Commons for details).

+ +

Recommended workflow

+ +
    +
  1. Work through the Quickstart page to learn how to run a local Data Commons instance and load some sample data.
  2. +
  3. Prepare your real-world data and load it in the local custom instance. Data Commons requires your data to be in a specific format. See Prepare and load your own data for details. +
    +

    Note: This section is very important! If your data is not in the scheme Data Commons expects, it won’t load.

    +
    +
  4. +
  5. If you want to customize the look of the feel of the site, see Customize the site.
  6. +
  7. When you have finished testing locally, host your data and code in Google Cloud Platform: first, upload your data to Google Cloud Storage and create a Cloud Run job to load the data into Google Cloud SQL. See Load data in Google Cloud.
  8. +
  9. Build a custom image, upload it to the Google Cloud Artifact Registry and create a Cloud Run service to run the site. See Deploy services to Google Cloud
  10. +
  11. Launch and productionize your site for external traffic. See Launch your Data Commons.
  12. +
  13. For future updates and launches, continue to make UI and data changes locally, before deploying the changes to GCP.
  14. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/launch_cloud.html b/custom_dc/launch_cloud.html new file mode 100644 index 000000000..27492686f --- /dev/null +++ b/custom_dc/launch_cloud.html @@ -0,0 +1,691 @@ + + + + + Launch your Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Launch your Data Commons

+ + + +

Overview

+ +

When you are ready to launch your site to external traffic, there are many tasks you will need to perform, including:

+ + + +

Improve database performance

+ +

We recommend that you use a caching layer to improve the performance of your database. We recommend Google Cloud Redis Memorystore, a fully managed solution, which will boost the performance of both natural-language searches and regular database lookups in your site. Redis Memorystore runs as a standalone instance in a Google-managed virtual private cloud (VPC), and connects to your VPC network (“default” or otherwise) via direct peering. Your Cloud Run service connects to the instance using a VPC connector. +We recommend that you use a caching layer to improve the performance of your database. We recommend Google Cloud Redis Memorystore, a fully managed solution, which will boost the performance of both natural-language searches and regular database lookups in your site. Redis Memorystore runs as a standalone instance in a Google-managed virtual private cloud (VPC), and connects to your VPC network (“default” or otherwise) via direct peering. Your Cloud Run service connects to the instance using a VPC connector.

+ +

In the following procedures, we show you how to create a Redis instance that connects to your project’s “default” VPC network.

+ +

Step 1: Create the Redis instance

+ +

The following is a sample configuration that you can tune as needed. For additional information, see Create and manage Redis instances. +The following is a sample configuration that you can tune as needed. For additional information, see Create and manage Redis instances.

+ +
    +
  1. Go to https://console.cloud.google.com/memorystore/redis/instances for your project.
  2. +
  3. Go to https://console.cloud.google.com/memorystore/redis/instances for your project.
  4. +
  5. Select the Redis tab and click Create Instance.
  6. +
  7. If prompted to enable the Redis API server, accept.
  8. +
  9. Name your instance.
  10. +
  11. Under Tier Selection, select Basic.
  12. +
  13. Set the Capacity field to 2 GB.
  14. +
  15. Under Region and zonal availability, set the region to be the same as your Cloud SQL database.
  16. +
  17. Under Set up connection > Network, select default as the network.
  18. +
  19. Click Create.
  20. +
+ +

Step 2: Set the environment variable

+ +
    +
  1. When the Redis instance is created above, go to the Instances > Redis tab, look up your instance and note the Primary Endpoint IP address.
  2. +
  3. In custom_dc/env.list, set the value of the REDIS_HOST option to the IP address.
  4. +
+ +

Step 3: Create the VPC connector

+ +
    +
  1. Go to https://console.cloud.google.com/networking/connectors/list for your instance.
  2. +
  3. Go to https://console.cloud.google.com/networking/connectors/list for your instance.
  4. +
  5. If you are prompted to enable the VPC Access API, accept.
  6. +
  7. In the Serverless VPC Access screen, click Create Connector.
  8. +
  9. Name the connector.
  10. +
  11. Under Region, select the region you specified for Redis instance in the first step.
  12. +
  13. In the Network field, select default.
  14. +
  15. Under Subnet, select Custom IP Range.
  16. +
  17. In the IP Range field, enter a valid IP range; for example, 10.9.0.0.
  18. +
  19. Click Create.
  20. +
+ +

For additional information, see Serverless VPC Access. +For additional information, see Serverless VPC Access.

+ +

Step 4: Configure your Cloud Run service to connect to the VPC

+ +
    +
  1. In the Cloud Console, go to the Cloud Run service from which you are serving your app.
  2. +
  3. Click Edit & Deploy New Revision.
  4. +
  5. Click the Networking tab and enable Connect to a VPC for outbound traffic.
  6. +
  7. Enable Use Serverless VPC Access connectors.
  8. +
  9. From the Network field, select the connector you created in step 3.
  10. +
  11. Click Deploy.
  12. +
+ +

Step 5: Verify that everything is working

+ +

To verify that your Cloud Run service is using the connector:

+ +
    +
  1. Go to the Service details page for your service
  2. +
  3. Click the Networking tab. Under VPC, you should see your connector listed.
  4. +
+ +

To verify that traffic is hitting the cache:

+ +
    +
  1. Run some queries against your running Cloud Run service.
  2. +
  3. In the Cloud Console, go to the Memorystore page and select Redis instance.
  4. +
  5. Under Instance Functions, click Monitoring.
  6. +
  7. Scroll to the Cache Hit Ratio graph. You should see a significant percentage of your traffic hitting the cache.
  8. +
+ +

Add Google Analytics reporting

+ +

Google Analytics provides detailed reports on user engagement with your site. In addition, Data Commons provides a number of custom parameters you can use to report on specific attributes of a Data Commons site such as, search queries, specific page views, etc.

+ +

Enable Analytics tracking

+ +
    +
  1. If you don’t already have a Google Analytics account, create one, following the procedures in Set up Analytics for a website and/or app. Record the Analytics tag ID assigned to your account.
  2. +
  3. Go to the Cloud Console for your Cloud Run service, and click Edit & deploy new revision.
  4. +
  5. Expand Variables and secrets and click Add new variable.
  6. +
  7. Add the name GOOGLE_ANALYTICS_TAG_ID and in the value field, type in your tag ID.
  8. +
  9. Click Deploy to redeploy the service. Data collection will take a day or two to start and begin showing up in your reports.
  10. +
+ +

Report on custom dimensions

+ +

Data Commons exports many Google Analytics custom events and parameters, to allow Data Commons-specific features to be logged, such as search queries, specific page views, etc. You can use these to create custom reports and explorations. The full set is defined in website/static/js/shared/ga_events.ts. Before you can get reports on them, you need to create custom dimensions from them.

+ +

To create a custom dimension for a Data Commons custom event:

+ +
    +
  1. In the Google Analytics dashboard for your account, go to the Admin page.
  2. +
  3. Select Data display > Custom definitions.
  4. +
  5. Click Create custom dimension.
  6. +
  7. +

    Keep the Scope as Event and click the Event parameter > Select event parameter drop-down to see the list of custom event parameters.

    + +

    Custom parameters

    +
  8. +
  9. Select the parameter you need, for example, query.
  10. +
  11. Add a dimension name and description. These can be anything you want but the name should be meaningful as it will show up in reports; for example, Search query.
  12. +
  13. When done, click Save.
  14. +
  15. Select Data display > Events and you should see a number of new custom events that have been added to your account.
  16. +
+ +

To create a report based on a custom event:

+ +
    +
  1. In the Google Analytics dashboard for your account, go to the Explore page and select Blank - create a new exploration.
  2. +
  3. Select Variables > Dimensions > + to open the Select dimensions window.
  4. +
  5. +

    Select the Custom, select the dimension you want, for example, Search query, and click Import.

    + +

    Custom parameters

    +
  6. +
  7. Select Variables > Metrics > + to open the Select metrics window.
  8. +
  9. Select the relevant metric you want, such as users, sessions, or views, etc. and click Import.
  10. +
  11. Select Settings > Rows > Drop or select dimension and from the drop-down menu, select the dimension you want, such as Search query.
  12. +
  13. Select Settings > Values > Drop or select metric and from the drop-down menu, select the metric of interest, such as users, sessions, views, etc.
  14. +
  15. Edit any other settings you like and name the report. For the first 48 hours you will see (not set) for the first row. Afterwards, rows will be populated with real values.
  16. +
+ +

Custom exploration

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/quickstart.html b/custom_dc/quickstart.html new file mode 100644 index 000000000..c2d99c4f6 --- /dev/null +++ b/custom_dc/quickstart.html @@ -0,0 +1,872 @@ + + + + + Quickstart - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Quickstart

+ +

This page shows you how to run a local custom Data Commons instance inside Docker containers and load sample custom data from a local SQLite database. A custom Data Commons instance uses code from the public open-source repo, available at https://github.com/datacommonsorg/.

+ +

This is step 1 of the recommended workflow.

+ + + +

System overview

+ +

The instructions in this page use the following setup:

+ +

local setup

+ +

The “data management” Docker container consists of scripts that do the following:

+
    +
  • Convert custom CSV file data into SQL tables and store them in a data store – for now, in a local SQLite database
  • +
  • Generate NL embeddings for custom data and store them – for now, in the local file system
  • +
+ +

The “services” Docker container consists of the following Data Commons components:

+
    +
  • A Nginx reverse proxy server, which routes incoming requests to the web or API server
  • +
  • A Python-Flask web server, which handles interactive requests from users
  • +
  • An Python-Flask NL server, for serving natural language queries
  • +
  • A Go Mixer, also known as the API server, which serves programmatic requests using Data Commons APIs. The SQL query engine is built into the Mixer, which sends queries to both the local and remote data stores to find the right data. If the Mixer determines that it cannot fully resolve a user query from the custom data, it will make an REST API call, as an anonymous “user” to the base Data Commons Mixer and data.
  • +
+ +

Prerequisites

+ +
    +
  • Obtain a GCP billing account and project.
  • +
  • If you are developing on Windows, install WSL 2 (any distribution will do, but we recommend the default, Ubuntu), and enable WSL 2 integration with Docker.
  • +
  • Install Docker Desktop/Engine.
  • +
  • Install Git.
  • +
  • Optional: Get a Github account, if you would like to browse the Data Commons source repos using your browser.
  • +
+ +

One-time setup steps

+ +

Get a Data Commons API key

+ +

An API key is required to authorize requests from your site to the base Data Commons site. API keys are managed by a self-serve portal. To obtain an API key, go to https://apikeys.datacommons.org and request a key for the api.datacommons.org domain.

+ +

Enable Google Cloud APIs and get a Maps API key

+ +
    +
  1. Go to https://console.cloud.google.com/apis/dashboard for your project.
  2. +
  3. Click Enable APIs & Services.
  4. +
  5. Under Maps, enable Places API and Maps Javascript API.
  6. +
  7. Go to https://console.cloud.google.com/google/maps-apis/credentials for your project.
  8. +
  9. Click Create Credentials > API Key.
  10. +
  11. Record the key and click Close.
  12. +
  13. Click on the newly created key to open the Edit API Key window.
  14. +
  15. Under API restrictions, select Restrict key.
  16. +
  17. From the drop-down menu, enable Places API and Maps Javascript API. (Optionally enable other APIs for which you want to use this key.)
  18. +
  19. Click OK and Save.
  20. +
+ +

Clone the Data Commons repository

+ +

Note: If you are using WSL on Windows, open the Linux distribution app as your command shell. You must use the Linux-style file structure for Data Commons to work correctly.

+ +
    +
  1. Open a terminal window, and go to a directory to which you would like to download the Data Commons repository.
  2. +
  3. Clone the website Data Commons repository: +
    git clone https://github.com/datacommonsorg/website.git [DIRECTORY]
    +

    If you don’t specify a directory name, this creates a local website subdirectory. If you specify a directory name, all files are created under that directory, without a website subdirectory.

    +
  4. +
+ +

When the downloads are complete, navigate to the root directory of the repo (e.g. website). References to various files and commands in these procedures are relative to this root.

+ +
+cd website
+
+ +

Set environment variables

+ +
    +
  1. Using your favorite editor, copy custom_dc/env.list.sample and save it as a new file custom_dc/env.list. It provides a template for getting started.
  2. +
  3. Enter the relevant values for DC_API_KEY and MAPS_API_KEY.
  4. +
  5. Set the INPUT_DIR to the full path to the website/custom_dc/sample/ directory. For example if you have cloned the repo directly to your home directory, this might be /home/USERNAME/website/custom_dc/sample/. (If you’re not sure, type pwd to get the working directory.)
  6. +
  7. For the OUTPUT_DIR, set it to the same path as the INPUT_DIR.
  8. +
+ +

Warning: Do not use any quotes (single or double) or spaces when specifying the values.

+ +

About the downloaded files

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Directory/fileDescription
custom_dc/sample/Sample supplemental data that is added to the base data in Data Commons. This page describes the model and format of this data and how you can load and view it.
custom_dc/examples/More examples of custom data in CSV format and config.json. To configure your own custom data, see Work with custom data.
server/templates/custom_dc/custom/Contains customizable HTML files. To modify these, see Customize HTML templates.
static/custom_dc/custom/Contains customizable CSS file and default logo. To modify the styles or replace the logo, see Customize Javascript and styles.
+ +

Look at the sample data

+ +

Before you start up a Data Commons site, it’s important to understand the basics of the data model that is expected in a custom Data Commons instance. Let’s look at the sample data in the CSV files in the custom_dc/sample/ folder. This data is from the Organisation for Economic Co-operation and Development (OECD): “per country data for annual average wages” and “gender wage gaps”:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
countryAlpha3Codedateaverage_annual_wage
BEL200054577.62735
BEL200154743.96009
BEL200256157.24355
BEL200356491.99591
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
countryAlpha3Codedategender_wage_gap
DNK200510.16733044
DNK200610.17206126
DNK20079.850297951
DNK200810.18354903
+ +

There are a few important things to note:

+
    +
  • There are only 3 columns: one representing a place (countryAlpha3Code, a special Data Commons place type); one representing a date (date); and one representing a statistical variable, which is a Data Commons concept for a metric: average_annual_wage and gender_wage_gap. (Actually, there can be any number of statistical variable columns – but no other types of additional columns – and these two CSV files could be combined into one.)
  • +
  • Every row is a separate observation, or a value of the variable for a given place and time. In the case of multiple statistical variable columns in the same file, each row would, of course, consist of multiple observations.
  • +
+ +

This is the format to which your data must conform if you want to take advantage of Data Commons’ simple import facility. If your data doesn’t follow this model, you’ll need to do some more work to prepare or configure it for correct loading. (That topic is discussed in detail in Preparing and loading your data.)

+ +

Load sample data

+ +

To load the sample data:

+ +
    +
  1. If you are running on Windows or Mac, start Docker Desktop and ensure that the Docker Engine is running.
  2. +
  3. +

    Open a terminal window, and from the root directory, run the following command to run the data management Docker container:

    + +
    docker run \
    +--env-file $PWD/custom_dc/env.list \
    +-v $PWD/custom_dc/sample:$PWD/custom_dc/sample  \
    +gcr.io/datcom-ci/datacommons-data:stable
    +
    +

    This does the following:

    +
  4. +
+ +
    +
  • The first time you run it, downloads the latest stable Data Commons data image, gcr.io/datcom-ci/datacommons-data:stable, from the Google Cloud Artifact Registry, which may take a few minutes. Subsequent runs use the locally stored image.
  • +
  • Maps the input sample data to a Docker path.
  • +
  • Starts a Docker container.
  • +
  • Imports the data from the CSV files, resolves entities, and writes the data to a SQLite database file, custom_dc/sample/datacommons/datacommons.db.
  • +
  • Generates embeddings in custom_dc/sample/datacommons/nl. (To learn more about embeddings generation, see the FAQ).
  • +
+ +

Once the container has executed all the functions in the scripts, it shuts down.

+ +

Start the services

+ +
    +
  1. Open a new terminal window.
  2. +
  3. From the root directory, run the following command to start the services Docker container:
  4. +
+ +
  docker run -it \
+  -p 8080:8080 \
+  -e DEBUG=true \
+  --env-file $PWD/custom_dc/env.list \
+  -v $PWD/custom_dc/sample:$PWD/custom_dc/sample  \
+  gcr.io/datcom-ci/datacommons-services:stable
+
+ +
+

Note: If you are running on Linux, depending on whether you have created a “sudoless” Docker group, you may need to preface every docker invocation with sudo.

+
+ +

This command does the following:

+ +
    +
  • The first time you run it, downloads the latest stable Data Commons image, gcr.io/datcom-ci/datacommons-services:stable, from the Google Cloud Artifact Registry, which may take a few minutes. Subsequent runs use the locally stored image.
  • +
  • Starts a services Docker container.
  • +
  • Starts development/debug versions of the Web Server, NL Server, and Mixer, as well as the Nginx proxy, inside the container.
  • +
  • Maps the output sample data to a Docker path.
  • +
+ +

Stop and restart the services

+ +

If you need to restart the services for any reason, do the following:

+ +
    +
  1. In the terminal window where the container is running, press Ctrl-c to kill the Docker container.
  2. +
  3. Rerun the docker run command as described in Start the services.
  4. +
+ +

Tip: If you close the terminal window in which you started the Docker services container, you can kill it as follows:

+ +
    +
  1. Open another terminal window, and from the root directory, get the Docker container ID. +
      docker ps
    +
    +

    The CONTAINER ID is the first column in the output.

    +
  2. +
  3. Run: +
    docker kill CONTAINER_ID
    +
  4. +
+ +

View the local website

+ +

Once the services are up and running, visit your local instance by pointing your browser to http://localhost:8080. You should see something like this:

+ +

screenshot_homepage

+ +

Now click the Timeline link to visit the Timeline explorer. Click Start, enter an OECD country (e.g. Canada) and click Continue. Now, in the Select variables tools, you’ll see the new variables:

+ +

screenshot_timeline

+ +

Select one (or both) and click Display to show the timeline graph:

+ +

screenshot_display

+ +

To issue natural language queries, click the Search link. Try NL queries against the sample data you just loaded, e.g. “Average annual wages in Canada”.

+ +

screenshot_search

+ +

Send an API request

+ +

A custom instance can accept REST API requests at the endpoint /core/api/v2/, which can access both the custom and base data. To try it out, here’s an example request you can make to your local instance that returns the same data as the interactive queries above, using the observation API. Try entering this query in your browser address bar:

+ +
http://localhost:8080/core/api/v2/observation?entity.dcids=country%2FCAN&select=entity&select=variable&select=value&select=date&variable.dcids=average_annual_wage
+
+ +
+

Note: You do not need to specify an API key as a query parameter.

+
+ +

If you select Prettyprint, you should see output like this:

+ +

screenshot_api_call

+ +

Troubleshooting

+ +

Having trouble? Visit our Troubleshooting Guide for detailed solutions to common problems.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/custom_dc/troubleshooting.html b/custom_dc/troubleshooting.html new file mode 100644 index 000000000..a59728be4 --- /dev/null +++ b/custom_dc/troubleshooting.html @@ -0,0 +1,671 @@ + + + + + Troubleshooting - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Troubleshooting

+ + + +

Docker permission errors

+ +

Linux “permission denied”

+ +

If you see this error:

+ +
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: ...
+dial unix /var/run/docker.sock: connect: permission denied.
+
+ +

or this:

+ +
docker: Error response from daemon: pull access denied for datacommons-services, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
+
+ +
    +
  1. Use sudo with your docker invocations or set up a “sudoless” docker group, as described in Linux post-installation steps for Docker Engine.
  2. +
  3. If you’ve just installed Docker, try rebooting the machine.
  4. +
+ +

Startup errors

+ +

“Failed to create metadata: failed to create secret manager client: google: could not find default credentials.”

+ +

If you try to run the services and fail with this error:

+ +
Failed to create metadata: failed to create secret manager client: google: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information
+
+ +

This indicates that you have not specified API keys in the environment file. Follow procedures in One-time setup steps to obtain and configure API keys.

+ +

“SQL schema check failed”

+ +

This error indicates that there has been an update to the database schema, and you need to update your database schema by re-running the data management job as follows:

+ +
    +
  1. Rerun the data management Docker container, optionally adding the flag -e DATA_RUN_MODE=schemaupdate to the docker run command. This updates the database schema without re-importing data or re-building natural language embeddings.
  2. +
  3. Restart the services Docker container.
  4. +
+ +

For full command details, see the following sections:

+ + +

Local build errors

+ +

“file not found in build context”

+ +

If you are building a local instance and get this error:

+ +
Step 7/62 : COPY mixer/go.mod mixer/go.sum ./
+COPY failed: file not found in build context or excluded by .dockerignore: stat mixer/go.mod: file does not exist
+
+

You need to download/update additional submodules (derived from other repos). See Build a local image.

+ +

NL queries not returning custom data

+ +

If you have previously been able to get custom data in your natural-language query results, but this has suddenly stopped working, this is due to embeddings incompatibility issues between releases. To fix this, do the following:

+
    +
  1. Delete the datacommons subdirectory from your output directory, either locally or in your Google Cloud Storage bucket.
  2. +
  3. Rerun the data management container, as described in Load data in Google Cloud, and restart the services container.
  4. +
+ +

Website display problems

+ +

If styles aren’t rendering properly because CSS, logo files or JS files are not loading, check your Docker command line for invalid arguments. Often Docker won’t give any error messages but failures will show up at runtime.

+ +

Website form input problems

+ +

If you try to enter input into any of the explorer tools fields, and you get this:

+ +

screenshot_troubleshoot

+ +

This is because you are missing a valid API key or the necessary APIs are not enabled. Follow procedures in Enable Google Cloud APIs and get a Maps API key, and be sure to obtain a permanent Maps/Places API key.

+ +

Cloud Run Service problems

+ +

In general, whenever you encounter problems with any Google Cloud Run service, check the Logs page for your Cloud Run service, to get detailed output from the services.

+ +

“403 Forbidden: Your client does not have permission to get URL / from this server”

+ +

This error indicates that your application requires authenticated requests but you have not provided an authentication token. If your site is intended to be public, first check to see that the Cloud Run service is not set up to require authentication:

+
    +
  1. Go to the Google Cloud Console Cloud Run page for your project.
  2. +
  3. From the list of services, select the relevant service and select the Security tab.
  4. +
  5. Ensure that you have enabled Allow unauthenticated invocations and restart the Cloud Run service.
  6. +
+ +

If you are unable to select this option, this indicates that there is an IAM permissions setup issue with your project or account. See the Cloud Run Troubleshooting for details on how to fix this.

+ +

“502 Bad Gateway”

+ +

This is a general indication that the Data Commons servers are not running. Check the **Logs ** page for the Cloud Run service in the Google Cloud Console. Here are common errors:

+ +

403 Forbidden: Not authorized to access resources

+ +

This may be due to multiple reasons. First try the following:

+
    +
  1. In the Cloud Run service page in the Cloud Console, select the Revisions tab, and scroll to view the Environment variables.
  2. +
  3. Ensure that the DB_USER and DB_PASS variables are set to the values you set when creating the SQL database.
  4. +
+ +

If you see no errors in the logs, except connect() failed (111: Connection refused) while connecting to upstream, try the following:

+ +
    +
  1. Wait a few minutes and try to access the app again. Sometimes it appears to be deployed, but some of the services haven’t yet started up.
  2. +
  3. In the Cloud Run Service details page, click the Revisions tab. Under the Containers tab, under General, check that CPU Allocation is set to CPU is always allocated. If it is not, click Edit & Deploy New Revision, and the Containers tab. Under CPU allocation and pricing enable CPU is always allocated and click Deploy.
  4. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/data_model.html b/data_model.html new file mode 100644 index 000000000..5be33840a --- /dev/null +++ b/data_model.html @@ -0,0 +1,727 @@ + + + + + Key concepts and common tasks - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Key concepts and common tasks

+ +

Whether you’re just exploring the data on datacommons.org, using the programmatic APIs, or contributing data, it’s helpful to have a basic understanding of some of the key concepts in Data Commons. Use the following guidance:

+
    +
  • If you are only using Data Commons interactive tools, Google Sheets or CSV download, you should at least be familiar with entities and statistical variables. You may wish to just skip directly to those sections.
  • +
  • If you plan to use the programmatic APIs, contribute data, or run your own Data Commons, you should read this entire page.
  • +
+ + + +

Schema

+ +

To allow data from hundreds of organizations around the world, in a myriad of models and formats to be interoperable and queryable in a unified way, Data Commons needs to have a common way of understanding and representing this data. To do so, it applies a schema, or vocabulary to all its data, that is largely derived from earlier schemes developed for semantic understanding of web pages – most notably, the data models and schemas of Schema.org (which were in turn based on earlier schemes such as Microformats and Resource Description Framework (RDF)).

+ +

The Data Commons schema is in fact a superset of Schema.org schemas, with a particular emphasis on time series and statistical data. Every data set must have an associated schema, written in Meta Content Format (MCF) language, that maps the provider’s data to existing concepts in the Data Commons.

+ +

Knowledge Graph

+ +

Data Commons models the world as a directed labeled graph, consisting of a set of nodes and edges with labels, known as properties. This general framework allows Data Commons to represent information about a wide range of domains: from time series about demographics and employment, to hurricanes, to protein structures.

+ +

As a simple example, here are a set of nodes and edges that represent the following statements:

+ +
    +
  • California is a state
  • +
  • Santa Clara county and Berkeley are contained in the state of California
  • +
  • The latitude of Berkeley, CA is 37.8703
  • +
+ +

knowledge graph

+ +

Each node consists of some kind of entity or value, and each edge describes some kind of property. More specifically, each node consists of the following objects:

+ + + +

As in other knowledge graphs, each pair of connected nodes is a triple consisting of a subject node, predicate (or “edge”) and object node. The Data Commons knowledge graph is made up of billions of triples. The triple is not generally exposed in Data Commons as a concept that you need to know (although it can be queried from some APIs).

+ +

You can get all the information about a node and its edges by looking at the Knowledge Graph browser. If you know the DCID for a node, you can access it directly by typing https://datacommons.org/browser/DCID. For example, here is the entry for the City node, available at https://datacommons.org/browser/City:

+ +

KG browser

+ +

Every node entry shows a list of outgoing edges, or properties, and incoming edges. Properties are discussed in more detail below.

+ +

Type

+ +

Every node has at least one type, where each type may be a sub-class of multiple types. For entities and events, their type is typically another entity. For example, Berkeley is a type of City. At the root, all types are instances of the Class type. For statistical variables and observations, their type is always StatisticalVariable and StatVarObservation, respectively.

+ +

Entity

+ +

An entity represents a persistent, physical thing in the real world. While Data Commons has information about a wide variety of types of entities (cities, states, countries, schools, companies, facilities, etc.), most of the information today is about places. Data Commons contains a catalog of about 2.9 million places. In addition to basic metadata like the location, type and containment information, many places also contain information about their shape, area, etc. For a list of available place types, take a look at the place types page.

+ +

Event

+ +

An event is what it sounds like: an occurrence at a specific point in time, such as an extreme weather event, a criminal incident, an election, etc.

+ +

Statistical variable

+ +

In Data Commons, even statistical measurements and time series data are modeled as nodes. A statistical variable represents any type of metric, statistic, or measurement that can be taken at a place and time, such as a count, an average, a percentage, etc. A statistical variable for a specific place is a time series, consisting of a set of observed values over a time period.

+ +

Data Commons comprises hundreds of thousands of statistical variables, which you can view using the Statistical Variable Explorer.

+ +

The type of a statistical variable is always the special sub-class StatisticalVariable. For example, the metric Median Age of Female Population is a node whose type is a statistical variable.

+ +

A statistical variable can be simple, such as Total Population, or more complex, such as Hispanic Female Population. Complex variables may be broken down into constituent parts, or not.

+ +

Task: Find places available for a statistical variable

+ +

Note that not all statistical variables have observations for all places or other entities. To find out which places have data for a given variable, you can do the following:

+ +
    +
  1. Open the Statistical Variable Explorer, and search for a variable of interest.
  2. +
  3. Optionally, filter by data source and data set.
  4. +
  5. Scroll to the Places section.
  6. +
+ +

For example, inspecting Health > Health Insurance (Household) > No Health Insurance > Households Without Health Insurance shows us that the statistical variable Count_Household_NoHealthInsurance is available in the United States at state, county, and city levels:

+ +

Stat Var Explorer

+ +

On the other hand, the Average Retail Price of Electricity, or Quarterly_Average_RetailPrice_Electricity, is only available at the state level states in the US but not at the city or county level.

+ +

Stat Var Explorer

+ +

Unique identifier: DCID

+ +

Every node has a unique identifier, called a Data Commons ID, or DCID. In the Knowledge Graph browser, you can view the DCID for any node or edge. For example, the DCID for the city of Berkeley is geoid/0606000:

+ +

KG browser

+ +

DCIDs are not restricted to entities; statistical variables also have DCIDs. For example, the DCID for the Gini Index of Economic Activity is GiniIndex_EconomicActivity:

+ +

Stat Var Explorer

+ +

Task: Find a DCID for an entity or variable

+ +

Many Data Commons tools and APIs require that you provide a DCID as input for a query. There are a few ways to do this.

+ +

To find the DCID for a place using the datacommons.org website:

+ +
    +
  1. Go to https://docs.datacommons.org/place_types.html.
  2. +
  3. Click the link on the place type of interest and click its link to open the Knowledge Graph page for the entity; for example, City.
  4. +
  5. Scroll to the In Arcs section to look up the places of interest.
  6. +
  7. If necessary, continue to drill down on links until you find the place of interest.
  8. +
+ +

KG browser

+ +

To find the DCID for a place using other methods:

+ +
    +
  • Use the Google Sheets add-on Fill place dcids feature.
  • +
  • Use the REST v2 Resolve API, either interactively (e.g. using curl or the browser address bar) or programmatically.
  • +
+ +

To find the DCID for a statistical variable:

+ +
    +
  1. Open the Statistical Variable Explorer.
  2. +
  3. Search for the variable of interest, and optionally filter by data source and dataset.
  4. +
  5. Look under the heading for the DCID.
  6. +
+ +

Stat Var Explorer

+ +

Property

+ +

Every node also contains properties or characteristics that describe its entity, event, or statistical variable. Each property is actually an edge to another node, with a label. If the object node is a primitive type, such as a string, date, or number, it is a “leaf”, or terminal node, which we call an attribute. Examples are properties such as latitude, year, various unique IDs and so on.

+ +

Other properties are links to other entities/events/ etc. In the Knowledge Graph, you can click through links to non-terminal nodes.

+ +

For example, in this node for the city of Addis Ababa, Ethiopia, the typeOf and containedInPlace edges link to other entities, namely City and Ethiopia, whereas all the other values are terminal.

+ +

KG browser

+ +

Note that the DCID for a property is the same as its name.

+ +

Observation

+ +

An observation is a single measured value for a statistical variable, at or during a specified period of time, for a specific entity.

+ +

For example, the value of the statistical variable Median Age of Female Population for the city of San Antonio, Texas in 2014 could have an observation Observation_Median_Age_Person_Female_SanAntonio_TX_2014. The type of an observation is always the special sub-class StatVarObservation.

+ +

Time series made up of many observations underlie the data available in the Timeline Explorer and timeline graphs. For example, here is the median income in Berkeley, CA over a period of ten years, according to the US Census Bureau:

+ +

Timeline Explorer

+ +

Provenance, Source, Dataset

+ +

Every node and triple also have some important properties that indicate the origin of the data.

+ + + +

Knowledge graph

+ +

Note that a given statistical variable may have multiple provenances, since many data sets define the same variables. You can see the list of all the data sources for a given statistical variable in the Statistical Variable Explorer. For example, the explorer shows multiple sources (Censuses from India, Mexico, Vietnam, OECD, World Bank, etc.) for the variable Life Expectancy:

+ +

Stat Var Explorer

+ +

You can see a list of all sources and data sets in several places:

+ +
    +
  • The Data sources pages in this site.
  • +
  • The Data source and Dataset drop-down menus in the Statistical Variable Explorer.
  • +
+ +

Stat Var Explorer

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Agriculture.html b/datasets/Agriculture.html new file mode 100644 index 000000000..a7b05bfe6 --- /dev/null +++ b/datasets/Agriculture.html @@ -0,0 +1,563 @@ + + + + + Agriculture - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Agriculture

+ + + +

U.S. Department of Agriculture (USDA)

+ +

Agricultural Survey

+

Conducted by the National Agricultural Statistics Service, this survey contains information about agricultural production, economics, demographics and the environment.

+ +

Census of Agriculture

+

The Census of Agriculture contains information about land use, operators, production, and finances of US farms and ranches. Data Commons contains several of the Census tables relating to crop production and operator demographics from the 2017 Census.

+ +

Policies and Links.

+ +

United Nations Office for the Coordination of Humanitarian Affairs(UN OCHA)

+ +

Sri Lanka Census

+

Sri Lanka Demographics, Education and Agriculture statistics for Sri Lanka at country,province and district Level.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Biomedical.html b/datasets/Biomedical.html new file mode 100644 index 000000000..f7f7263e4 --- /dev/null +++ b/datasets/Biomedical.html @@ -0,0 +1,687 @@ + + + + + Biomedical - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Biomedical

+ + + +

ELIXIR Core Data Resources

+ +

The Molecular INTeraction (MINT) Database

+

The MINT Database “focuses on experimentally verified protein-protein interactions mined from the scientific literature by expert curators.”

+ +

Licata, Luana, Leonardo Briganti, Daniele Peluso, Livia Perfetto, Marta Iannuccelli, Eugenia Galeota, Francesca Sacco et al. “MINT, the molecular interaction database: 2012 update.” Nucleic acids research 40, no. D1 (2012): D857-D861.

+ +

Encyclopedia of DNA Elements (ENCODE)

+ +

Experimental Data

+

The ENCODE experimental dataset contains information for approximately 7000 experiments along with 14,000 BED files collected by The Encyclopedia of DNA Elements (ENCODE) Consortium. Examples of experiment metadata captured include the target biosample, assay type, gene assembly, etc. Data Commons include the meta data for all experimental datasets in ENCODE as of 2019.

+ +

Data made available under: ENCODE Data Use Policy for External Users. This data was formatted for Data Commons through a collaboration with Dr. Anthony Oro’s group at Stanford University.

+ +

European Molecular Biology Laboratory - European Bioinformatics Institute (EMBL-EBI)

+ +

UniProt

+

Data Commons includes protein sequence and functional information including protein interaction with chemical compounds maintained by the UniProt Consortium. The data is made available by the Creative Commons Attribution (CC BY 4.0) License. Further information on UniProt License and Disclaimer can be found here. The UniProt Consortium states how to cite UniProt data used in a journal article.

+ +

This data is made available by EMBL-EPI Terms of Use.

+ +

Gene Ontology Consortium

+ +

The Sequence Ontology

+

“The Sequence Ontology is a set of terms and relationships used to describe the features and attributes of biological sequence. SO includes different kinds of features which can be located on the sequence. Biological features are those which are defined by their disposition to be involved in a biological process. Examples are ‘binding site’ and ‘exon’. Biomaterial features are those which are intended for use in an experiment such as aptamer and PCR_product. There are also experimental features which are the result of an experiment. SO also provides a rich set of attributes to describe these features such as ‘polycistronic’ and ‘maternally imprinted’.” +Gene Ontology Consortium data and data products are licensed under the Creative Commons Attribution 4.0 Unported License. When using or citing GO data please mention the particular release. For example, include where applicable the date (e.g. ‘2024-01-17’), Zenodo DOI (e.g. ‘10.5281/zenodo.10536401’), and links. More information on licensing and attribution in regards to the Gene Ontology Consortium can be found here.

+ +

International Committee on Taxonomy of Viruses (ICTV)

+ +

Master Species List

+

The official, current virus taxonomy approved by the ICTV. To accomplish the task of organizing and maintaining this virus taxonomy, the ICTV is composed of 7 subcommittees covering Animal DNA viruses and Retroviruses, Animal dsRNA and ssRNA (-) viruses, Animal ssRNA (+) viruses, Bacterial viruses, Archaeal Viruses, Fungal and Protist viruses, and Plant viruses. The ICTV has established over 100 international Study Groups (SGs) covering all major virus families and genera. The MSL version currently in the graph is MSL38 v3 released on 2023-09-11.

+ +

Virus Metadata Resource

+

The ICTV chooses an exemplar virus for each species and the VMR provides a list of these exemplars. An exemplar virus serves as an example of a well-characterized virus isolate of that species and includes the GenBank accession number for the genomic sequence of the isolate as well as the virus name, isolate designation, suggested abbreviation, genome composition, and host source. The VMR version currently in the graph is VMR MSL38 v2 released on 2023-09-13. +This data is made available under Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0).

+ +

Jensen Lab (University of Copenhagen)

+ +

DISEASES: Experiment

+

DISEASES is a weekly updated web resource that integrates evidence on disease-gene associations from automatic text mining, manually curated literature, cancer mutation data, and genome-wide association studies. This dataset further unifies the evidence by assigning confidence scores that facilitate comparison of the different types and sources of evidence. All files start with the following four columns: gene identifier, gene name, disease identifier, and disease name. The knowledge files further contain the source database, the evidence type, and the confidence score. For further details please refer to the following Open Access articles about the database: DISEASES: Text mining and data integration of disease-gene associations and DISEASES 2.0: a weekly updated database of disease–gene associations from text mining and data integration. The data is made available under the CC-BY license.

+ +

DISEASES: Knowledge

+

DISEASES is a weekly updated web resource that integrates evidence on disease-gene associations from automatic text mining, manually curated literature, cancer mutation data, and genome-wide association studies. This dataset further unifies the evidence by assigning confidence scores that facilitate comparison of the different types and sources of evidence. All files start with the following four columns: gene identifier, gene name, disease identifier, and disease name. The experiments files instead contain the source database, the source score, and the confidence score. For further details please refer to the following Open Access articles about the database: DISEASES: Text mining and data integration of disease-gene associations and DISEASES 2.0: a weekly updated database of disease–gene associations from text mining and data integration. The data is made available under the CC-BY license.

+ +

DISEASES: Textmining

+

DISEASES is a weekly updated web resource that integrates evidence on disease-gene associations from automatic text mining, manually curated literature, cancer mutation data, and genome-wide association studies. This dataset further unifies the evidence by assigning confidence scores that facilitate comparison of the different types and sources of evidence. All files start with the following four columns: gene identifier, gene name, disease identifier, and disease name. The textmining files contain the z-score, the confidence score, and a URL to a viewer of the underlying abstracts. For further details please refer to the following Open Access articles about the database: DISEASES: Text mining and data integration of disease-gene associations and DISEASES 2.0: a weekly updated database of disease–gene associations from text mining and data integration. The data is made available under the CC-BY license.

+ +

This data is made available under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.

+ +

PharmGKB

+ +

PharmGKB Primary Data

+

The Pharmacogenomics Knowledge Base, PharmGKB, is an interactive tool for researchers investigating how genetic variation affects drug response. PharmGKB displays genotype, molecular, and clinical knowledge integrated into pathway representations and Very Important Pharmacogene (VIP) summaries with links to additional external resources. Users can search and browse the knowledge base by genes, variants, drugs, diseases, and pathways. The Primary Data contains summary information on chemicals, drugs, genes, genetic variants, and phenotypes.

+ +

PharmGKB Relationships Data

+

PharmGKB reports association between chemicals, diseases, genes, and genetic variants, both with themselves and with each other.

+ +

Data made available under Creative Commons Attribution-ShareAlike 4.0 Intergovernmental Organization (CC BY-SA 4.0 IGO) licence. Explicit licensing for PharmGKB can be viewed on the download page.

+ +

The Human Protein Atlas

+ +

The Tissue Atlas

+

The Human Protein Tissue Atlas contains information about the distribution of proteins on human tissues derived from the antibody-based protein profiling from 44 normal human tissues types and mRNA expression data from 37 different normal tissue types.

+ +

This dataset is available under CC BY-SA 3.0. Please also see their Disclaimer and Licence & Citation.

+ +

U.S. National Institutes of Health: National Center for Biotechnology Information (NIH: NCBI)

+ +

NCBI Assembly

+

“The NCBI Assembly database provides stable accessioning and data tracking for genome assembly data. The model underlying the database can accommodate a range of assembly structures, including sets of unordered contig or scaffold sequences, bacterial genomes consisting of a single complete chromosome, or complex structures such as a human genome with modeled allelic variation. The database provides an assembly accession and version to unambiguously identify the set of sequences that make up a particular version of an assembly, and tracks changes to updated genome assemblies. The Assembly database reports metadata such as assembly names, simple statistical reports of the assembly (number of contigs and scaffolds, contiguity metrics such as contig N50, total sequence length and total gap length) as well as the assembly update history. The Assembly database also tracks the relationship between an assembly submitted to the International Nucleotide Sequence Database Consortium (INSDC) and the assembly represented in the NCBI RefSeq project” (Kitts et al. 2016). In this import we include the metadata for all genome assemblies documented in assembly_summary_genbank.txt and assembly_summary_refseq.txt. Assemblies are stored in GenomeAssembly nodes whose information is integrated from both the GenBank and RefSeq datasets.

+ +

NCBI Gene

+

NCBI Gene supplies gene-specific connections in the nexus of map, sequence, expression, structure, function, citation, and homology data. Unique identifiers are assigned to genes with defining sequences, genes with known map positions, and genes inferred from phenotypic information. These gene identifiers are used throughout NCBI’s databases and tracked through updates of annotation. Gene includes genomes represented by NCBI Reference Sequences (or RefSeqs) and is integrated for indexing and query and retrieval from NCBI’s Entrez and E-Utilities systems. Gene comprises sequences from thousands of distinct taxonomic identifiers, ranging from viruses to bacteria to eukaryotes. It represents chromosomes, organelles, plasmids, viruses, transcripts, and millions of proteins.”

+ +

NCBI Taxonomy

+

“NCBI Taxonomy “consists of a curated set of names and classifications for all of the source organisms represented in the International Nucleotide Sequence Database Collaboration (INSDC). The NCBI Taxonomy database contains a list of names that are determined to be nomenclaturally correct or valid (as defined according to the different codes of nomenclature), classified in an approximately phylogenetic hierarchy (depending on the level of knowledge regarding phylogenetic relationships of a given group) as well as a number of names that exist outside the jurisdiction of the codes. That is, it focuses on nomenclature and systematics, rather than documenting the description of taxa.”

+ +

This data is from an NIH human genome unrestricted-access data repository and made accessible under the NIH Genomic Data Sharing (GDS) Policy.

+ +

U.S. National Institutes of Health: National Library of Medicine

+ +

Medical Subject Headings (MeSH)

+

The Medical Subject Headings (MeSH) thesaurus is a controlled and hierarchically-organized vocabulary produced by the National Library of Medicine. It is used for indexing, cataloging, and searching of biomedical and health-related information. Data Commons includes the Concept, Descriptor, Qualifier, Supplementary Concept Record, and Term elements of MeSH as described here defined by all four xml files provided by MeSH (desc, pa, qual, and supp). Data Commons includes production year 2024 MeSH.

+ +

PubChem

+

PubChem is the world’s largest collection of freely accessible chemical information. Search chemicals by name, molecular formula, structure, and other identifiers. Find chemical and physical properties, biological activities, safety and toxicity information, patents, literature citations and more.

+ +

This data is from the National Library of Medicine (NLM) and is not subject to copyright and is freely reproducible as stated in the NLM’s copyright policy.

+ +

University of Maryland School of Medicine, Institute of Genome Sciences

+ +

Disease Ontology

+

The Disease Ontology was developed as a project by the Institute of Genome Sciences at the University of Maryland School of Medicine. It “is a community driven, open source ontology that is designed to link disparate datasets through disease concepts”. It provides a “standardized ontology for human disease with the purpose of providing the biomedical community with consistent, reusable and sustainable descriptions of human disease terms, phenotype characteristics and related medical vocabulary disease concepts”.

+ +

The data is made available under C0 1.0 Universal (CC0 1.0) Public Domain Dedication.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Crime.html b/datasets/Crime.html new file mode 100644 index 000000000..829c5920e --- /dev/null +++ b/datasets/Crime.html @@ -0,0 +1,566 @@ + + + + + Crime - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Crime

+ + + +

U.S. Bureau of Justice Statistics (BJS)

+ +

National Prisoner Statistics (NPS) Program

+

Data on jurisdiction, custody, admission, and dischange for prisoners incarcerated in state and federal prisons.

+ +

Terms of Service.

+ +

U.S. Federal Bureau of Investigation (FBI)

+ +

Hate Crime Statistics

+

Data about crimes motivated by prejudice based on race, gender and gender identity, religion, disability, sexual orientations, or ethnicity.

+ +

Uniform Crime Reporting (UCR) Program

+

Volume of violent crime by type as reported by city and town law enforcement agencies.

+ +

U.S. Department of Justice Legal Policies and Disclaimers Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Demographics.html b/datasets/Demographics.html new file mode 100644 index 000000000..de88be0a5 --- /dev/null +++ b/datasets/Demographics.html @@ -0,0 +1,1040 @@ + + + + + Demographics - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Demographics

+ + + +

Australian Bureau of Statistics

+ +

Australia Statistics

+

Australia Demographics, Health, Economy statistics at country,state,territories and 4 levels of statistial areas.

+ +

Australia Subnational Administrative Boundaries

+

Administrative boundaries for regions within Australia

+ +

Brazil VISDATA

+

Brazil VISDATA

+ +

Brazil VIS DATA 3

+

Census with respect to pact against hunger, development programs and facilities provided to the people of Brazil.

+ +

Brazilian Institute of Geography and Statistics (IBGE)

+ +

Brazil Census

+

Population Census and Statistics for Brazil.

+ +

Census of India

+ +

India Census Tables

+

Data Commons has imported variables related to demographics, in particular concerning literacy, work, housing, and religion from the Indian Census on the state, district, and city level.

+ +

Central Bureau of Statistics (CBS), Israel

+ +

Israel Census

+

Israel Demographics, Health, Economy statistics for Israel at country, district and sub-district Level.

+ +

Central Statistics Office(CSO), Ireland

+ +

Ireland Census

+

Ireland Demographics, Health and Economy data from Central Statistics Office(CSO) by country, county and city.

+ +

DataMeet

+ +

DataMeet Maps

+

Maps of India sourced from different government websites. (Terms of Use.)

+ +

Department of Statistics Singapore

+ +

Singapore Census

+

Singapore Demographics and Health statistics for Singapore at country.

+ +

European Union (EU) Eurostat

+ +

Regional Statistics by NUTS Classification

+ + +

Terms of Use.

+ +

Feeding America

+ +

Feeding America: Map Meal Gap

+

Feeding america’s mission is to advance change in America by ensuring equitable access to nutritious food for all in partnership with food banks, policymakers, supporters, and the communities we serve.

+ +

General Statistics Office (GSO), Vietnam

+ +

Vietnam Census

+

Vietnam Demographics, Economy, Health, Education data from Portal Site of General Statistics Office by national, province and city level.

+ +

GeoBoundaries

+ +

Global Database of Political Administrative Boundaries Database

+

geoBoundaries is an open database of political administrative boundaries

+ +

GeoSadak PMGSY National GIS, India

+ +

India GeoSadak

+

Data about civic structure facilities for India from GeoSadak PMGSY National GIS at district level.

+ +

Google

+ +

Google Places

+

Mapping of Google maps place identifiers to Data Commons entities. +Data made publicly available under the standard Google Terms of Service.

+ +

India National Informatics Centre

+ +

India Local Government Directory

+

India Local Government Directory provides unique codes for revenue entities such as districts, villages, local government bodies. +Copyright, Terms of Use.

+ +

Mexico National Institute of Statistics and Geography(INEGI)

+ +

Mexico Census

+

Population Census and Statistics for Mexico at Country and State levels.

+ +

National Institute of Statistics and Censuses (INDEC)

+ +

Argentina Census

+

Population Census and Statistics for Argentina.

+ +

National Institution for Transforming India.

+ +

India Life Expectancy by State

+

Life expectancy of a person in India based on gender at state level by National Data and Analytics Platform (NDAP).

+ +

India National Family Health Survey

+

India National Family Health Survey - Data on population dynamics and health indicators as well as data on emerging issues in health and family welfare and associated domains.

+ +

India Poverty Status

+

India poverty statistics - percentage of people below poverty line.

+ +

Open Data for Africa

+ +

Kenya Census

+

Kenya Demographics, Health and Education data from Kenya National Bureau Of Statistics by country, county and towns and suburbs. +Terms of use.

+ +

SouthAfrica Census

+

South Africa Demographics, Health and Education data from South Africa Data Portal by country, province and district municipality.

+ +

Uganda Bureau of Statistics (UBOS)

+

Uganda Demographics, education and Health data from Uganda Bureau of Statistics (UBOS) by country, region and district. Terms of Use for this dataset.

+ +

Opportunity Insights

+ +

The Opportunity Atlas

+
    +
  • Outcomes (social mobility and a variety of other outcomes from life expectancy to patent rates) by neighbourhood, college, parental income level and racial background. For Census tracts, county and commuting zone.
  • +
  • Neighbourhood characteristics for Census tracts, county and commuting zones.
  • +
+ +

Terms of Use.

+ +

Organisation for Economic Co-operation and Development (OECD)

+ +

OECD Regional Demography Statistics

+

Includes regional statistics for OECD countries on population by age, population density, life expectancy and mortality by age group.

+ +

License

+ +

Portal Site of Official Statistics of Japan (e-Stat)

+ +

Japan Census

+

Japan Demographics, Economy, Health, Education data from Portal Site of Official Statistics of Japan (e-Stat) by country, prefecture and municipality.

+ +

Stadt Zurich open data

+ +

Zurich GeoCoordinates

+

Administrative Area divisions of Zurich.

+ +

Zurich population

+

Population of Zurich city contains structure and organization of the city administration

+ +

Statistics Canada

+ +

Canada Statistics

+

Canada Demographics, Health, Education and Economy statistics at Canada country and subnational levels. +Terms and Conditions.

+ +

Statistics Sweden

+ +

Sweden Census

+

Sweden Demographics, Health and Education data from Statistics Sweden at country, nuts1, nuts2, nuts3 and municipality level.

+ +

Statistics of New Zealand

+ +

New Zealand Census

+

New Zealand Demographics, statistics for New Zealand at country, district and city level.

+ +

The Central Bureau of Statistics, Indonesia

+ +

Indonesia Census

+

Population Census and Statistics for Indonesia at country, provinces and regency and city level.

+ +

U.S. Bureau of Transportation Statistics

+ +

US Tract Transportation Characteristics for Households

+

Information related to transportation characteristics for households which includes data at Census Tract level on daily personal travel, including information on household and demographic characteristics, employment status, vehicle ownership, trips taken, modal choice, and other related transportation data pertinent to U.S. households.

+ +

U.S. Census Bureau

+ +

American Community Survey (ACS)

+

The American Community Survey covers a broad range of topics about social, economic, demographic, and housing characteristics of the U.S. population. The ACS 5-year (and 1-year) estimates are updated every year, based on the last 5 years (1 year) of collected data. Data Commons includes thousands of variables across the full range of ACS topics at the country, state, county, city, zip code tabulation area, school district, census tract levels, and more.

+ +

Cartographic Boundary Files

+

KML files for counties, states, congressional districts, etc.

+ +

Gazetteer Files

+

Basic geographic information about counties, county subdivisions, congressional districts, states, etc.

+ +

Population Estimates Program (PEP)

+

The Census Bureau’s Population Estimates Program (PEP) produces yearly estimates of the population for the United States, its states, counties, cities, and towns, as well as for the Commonwealth of Puerto Rico and its municipios. Data Commons imports the total population estimate data for the US and its states, counties, and cities.

+ +

US Decennial Census - Redistricting data

+

Basic population, race demographics and housing statistics from the redistricting data release of US Decennial Census mapped down to block-group level. +U.S. Census Terms of Service.

+ +

U.S. Center for Disease Control and Prevention (CDC)

+ +

Agency for Toxic Substances and Disease Registry(ATSDR)

+

ATSDR is a federal health agency that provides health information about hazardous substances and their health effects.

+ +

BRFSS-NCHS Asthma Prevalence

+

The statistics for prevalence of asthma among adults is for counties in 50 states and prevalence of asthma among children is for counties in 27 participating states. The data source is the 2016–2018 Behavioral Risk Factor Surveillance System (BRFSS) which is merged with the 2013 National Center for Health Statistics (NCHS) Urban-Rural Classification Scheme for Counties.

+ +

National Notifiable Diseases Surveillance System (NNDSS)

+

Weekly and Annual cases of selected national notifiable (infectious and non-infectious) diseases reported by the 50 states, New York City, the District of Columbia, and the U.S. territories.

+ +

Wonder: Compressed Mortality

+

Mortality counts for all US states and counties broken down by underlying cause of death, age, race, sex, and year.

+ +

Wonder: Mortality, Underlying Cause Of Death

+

The Underlying Cause of Death database contains mortality data based on death certificates for U.S. residents.

+ +

Wonder: Natality

+

Includes “counts of live births occurring within the United States to U.S. residents. Counts can be obtained by a variety of demographic characteristics, such as state and county of residence, mother’s race, and mother’s age, and health and medical items, such as tobacco use, method of delivery, and congenital anomalies. The data are derived from birth certificates.”

+ +

CDC Data Terms of Service.

+ +

U.S. Commerce Data Hub

+ +

Economic Development Administration (EDA)

+

EDA has led the federal economic development agenda by promoting innovation and competitiveness, preparing American regions for growth and success in the worldwide economy.

+ +

NTIA Internet Use Survey

+

NTIA programs and policymaking focus largely on expanding broadband Internet access and adoption in America, expanding the use of spectrum by all users.

+ +

U.S. Department of Housing and Urban Development (HUD)

+ +

Income Limits

+

Data Commons has imported 80th and 150th percentile median family income estimates for different household sizes for US counties and county subdivisions.

+ +

U.S. Federal Election Commission (FEC)

+ +

Candidates & Committees

+

Data from statements and reports filed with the FEC.

+ +

FEC Terms of Use.

+ +

U.S. National Center for Education Statistics

+ +

Public School and School District Data

+

General descriptive information such as name, address, and phone number; select demographic characteristics about students and staff; and fiscal data such as revenues and current expenditures. Data Commons includes school and school district level data about student populations by race, gender, lunch eligibility, and grade, as well as student-teacher ratio and teacher count statistics.

+ +

US Private School Data

+

General descriptive information such as name, address, and phone number; select demographic characteristics about students and staff. Data Commons includes school data about student populations by race, grade, as well as student-teacher ratio and teacher count statistics.

+ +

NCES Data Usage Agreement and US Department of Education Copyright Status Notice.

+ +

U.S. National Highway Traffic Safety Administration (NHTSA)

+

The National Highway Traffic Safety Administration is responsible for keeping people safe on America’s roadways.

+ +

Fatality Analysis Reporting System (FARS) Crash Data

+

Data on fatal motor vehicle crashes in the US.

+ +

UAE Bayanat Open Data Portal

+ +

UAE Population

+

UAE Population By Emirates Nationality and gender.

+ +

UK Ministry of Housing Communities and Local Government

+ +

IMD2019

+

Statistics on relative deprivation in small areas in England.

+ +

UK Office for National Statistics

+ +

UK Open Geography Portal

+

The Open Geography portal from the Office for National Statistics (ONS) provides free and open access to the definitive source of geographic products, web applications, story maps, services and APIs.

+ +

United Nations (UN)

+ +

UN OCHA Subnational Administrative Boundaries

+

Subnational administrative boundaries for a set of countries outside of the US and Europe. Includes state-equivalent and county-equivalent administrative levels. Terms of Use for this dataset.

+ +

UNData

+

Population data for countries, capital cities, urban and rural areas not covered by other sources.

+ +

Terms of Use.

+ +

United Nations Office for the Coordination of Humanitarian Affairs(UN OCHA)

+ +

Mexico Subnational Population Statistics

+

Population Census and Statistics for Mexico at Municipal level.

+ +

Sri Lanka Census

+

Sri Lanka Demographics, Education and Agriculture statistics for Sri Lanka at country,province and district Level.

+ +

Wikimedia Foundation

+ +

Wikidata

+

Data Commons includes some information about administrative divisions, municipalities, cities, villages and neighborhoods of all countries in the world from Wikidata. This also includes population statistics and various well-known identifiers associated with the places.

+ +

Terms of Use.

+ +

World Bank

+ +

World Bank Datasets

+

World Bank datasets related to demographics, economy, education, etc.

+ +

World Bank Official Boundaries

+

World Bank-approved administrative boundaries including international boundaries.

+ +

World Bank Subnational Population

+

World Bank population data for States and Countries.

+ +

World Development Indicators

+

Data Commons includes variables related to demographics, energy, health, labor, etc. from the World Bank.

+ +

Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Disasters.html b/datasets/Disasters.html new file mode 100644 index 000000000..6af0d0f19 --- /dev/null +++ b/datasets/Disasters.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/datasets/Economy.html b/datasets/Economy.html new file mode 100644 index 000000000..08212056a --- /dev/null +++ b/datasets/Economy.html @@ -0,0 +1,821 @@ + + + + + Economy - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Economy

+ + + +

Australian Bureau of Statistics

+ +

Australia Statistics

+

Australia Demographics, Health, Economy statistics at country,state,territories and 4 levels of statistial areas.

+ +

Brazilian Institute of Geography and Statistics (IBGE)

+ +

Brazil Bank of Statistical Tables

+

Brazil Census from Bank of Statistical Variables.

+ +

Central Bureau of Statistics (CBS), Israel

+ +

Israel Census

+

Israel Demographics, Health, Economy statistics for Israel at country, district and sub-district Level.

+ +

Central Statistics Office(CSO), Ireland

+ +

Ireland Census

+

Ireland Demographics, Health and Economy data from Central Statistics Office(CSO) by country, county and city.

+ +

Data One Org

+ +

One.org Debt

+

OneOrg principal, currency composition, interest and disbursed and outstanding of debt for different countries.

+ +

European Union (EU) Eurostat

+ +

Regional Statistics by NUTS Classification

+ + +

Terms of Use.

+ +

Food and Agriculture Organization of the United Nations

+ +

FAO Currency and Exchange Rate

+

The exchange rate of currency broken down by country, currency standardization type, and currency (using ISO 4217 Currency Code). +FAQ

+ +

General Statistics Office (GSO), Vietnam

+ +

Vietnam Census

+

Vietnam Demographics, Economy, Health, Education data from Portal Site of General Statistics Office by national, province and city level.

+ +

India Ministry of Statistics and Programme Implementation

+ +

Periodic Labour Force Survey

+

Wage and salary data for Indian states.

+ +

MarineRegions.org

+ +

Global Oceans and Seas

+

This dataset represents the boundaries of the 10 main oceans and seas (Arctic Ocean, North and South Atlantic Ocean, North and South Pacific Ocean, Southern Ocean, Indian Ocean, Baltic Sea, Mediterranean Region, South China and Eastern Archipelagic Seas). The boundaries are largely based on the publication ‘Limits of Oceans & Seas, Special Publication No. 23’, published by the IHO in 1953. The dataset is available in World Geodetic System of 1984 (WGS84). This dataset was composed by the Flanders Marine Data Centre.

+ +

Mexico National Institute of Statistics and Geography(INEGI)

+ +

Mexico Census

+

Population Census and Statistics for Mexico at Country and State levels.

+ +

National Institution for Transforming India.

+ +

India Poverty Status

+

India poverty statistics - percentage of people below poverty line.

+ +

OpenFIGI

+ +

FIGI

+

OpenFIGI is a system for identifying global financial instruments. It provides tools for Identifying, mapping, and requesting a free Financial Instrument Global Identifier (FIGI)

+ +

Portal Site of Official Statistics of Japan (e-Stat)

+ +

Japan Census

+

Japan Demographics, Economy, Health, Education data from Portal Site of Official Statistics of Japan (e-Stat) by country, prefecture and municipality.

+ +

Reserve Bank of India

+ +

Database on Indian Economy

+

Data Commons includes variables related to poverty and unemployment in Indian states from the Reserve Bank of India.

+ +

Statistics Canada

+ +

Canada Statistics

+

Canada Demographics, Health, Education and Economy statistics at Canada country and subnational levels. +Terms and Conditions.

+ +

U.S. Bureau of Economic Analysis (BEA)

+ +

GDP by County, Metro, and Other Areas

+

Includes Gross Domestic Product categorized by county, metro, and other areas.

+ +

Gross Domestic Product

+

Gross domestic product for counties, metropolitan statistical areas and states, broken down by industry.

+ +

Regional Price Parities by State and Metro Area

+

Price parity data measuring the differences in price levels across states and metropolitan areas for a given year and are expressed as a percentage of the overall national price level. +Terms of Use.

+ +

U.S. Bureau of Labor Statistics (BLS)

+ +

Consumer Price Index

+

Consumer Price Index broken down by categories of consumers.

+ +

Job Openings and Labor Turnover Survey

+

Survey giving job postings, hires, and separations broken down by industry.

+ +

Labor Force Statistics from the Current Population Survey (CPS)

+

Monthly survey of households conducted by the Bureau of Census for the Bureau of Labor Statistics.

+ +

Local Area Unemployment Statistics (LAUS)

+

Employment, unemployment, and labor force data for Census regions and divisions, States, counties, metropolitan areas, and many cities, by place of residence.

+ +

Quarterly Census of Employment and Wages (QCEW)

+

Quarterly and annual employment and wage statistics broken down by industry and ownership.

+ +

Terms of Service.

+ +

U.S. Census Bureau

+ +

American Community Survey (ACS)

+

The American Community Survey covers a broad range of topics about social, economic, demographic, and housing characteristics of the U.S. population. The ACS 5-year (and 1-year) estimates are updated every year, based on the last 5 years (1 year) of collected data. Data Commons includes thousands of variables across the full range of ACS topics at the country, state, county, city, zip code tabulation area, school district, census tract levels, and more.

+ +

County Business Patterns

+

Per-industry number of establishments, employment, payroll and annual payroll, by county, metropolitan statistical area and zip code.

+ +

Economic Census

+

Number of businesses and amount of revenue, by business payroll status, industry, operation type, and tax status.

+ +

U.S. Census Terms of Service.

+ +

U.S. Commerce Data Hub

+ +

Economic Development Administration (EDA)

+

EDA has led the federal economic development agenda by promoting innovation and competitiveness, preparing American regions for growth and success in the worldwide economy.

+ +

U.S. Department of Housing and Urban Development (HUD)

+ +

Income Limits

+

Data Commons has imported 80th and 150th percentile median family income estimates for different household sizes for US counties and county subdivisions.

+ +

U.S. Department of Labor (DOL)

+ +

USA Minimum Wages

+

USA minimum wages at state level.

+ +

Weekly Claims and Extended Benefits Trigger Data

+

Weekly new and continuing unemployment insurance claims for US states.

+ +

Terms of Service.

+ +

U.S. Federal Reserve

+ +

Treasury Nominal and Inflation-Indexed Constant Maturity Series

+

Data Commons includes all published statistics for 1-Month, 3-Month, 6-Month, 1-Year, 2-Year, 3-Year, 5-Year, 7-Year, 10-Year, 20-Year, and 30-Year constant maturities.

+ +

The data is in the public domain.

+ +

US Federal Reserve H.15 Interest Rates

+

USA Federal Reserve H.15 Interest Rates

+ +

World Bank

+ +

World Bank Datasets

+

World Bank datasets related to demographics, economy, education, etc.

+ +

World Development Indicators

+

Data Commons includes variables related to demographics, energy, health, labor, etc. from the World Bank.

+ +

Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Education.html b/datasets/Education.html new file mode 100644 index 000000000..3750d3619 --- /dev/null +++ b/datasets/Education.html @@ -0,0 +1,738 @@ + + + + + Education - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Education

+ + + +

Brazilian Institute of Geography and Statistics (IBGE)

+ +

Brazil Census

+

Population Census and Statistics for Brazil.

+ +

California Assessment of Student Performance and Progress

+ +

California School Performance

+

California schools performance data across different grade levels and sub-groups (like race, disability etc). +CAASPP

+ +

European Union (EU) Eurostat

+ +

EuroStat Early Education and Training

+

Participation in early childhood education by sex (children aged 4 and over). The indicator measures the share of the children between the age of four and the starting age of compulsory primary education who participated in early childhood education.

+ +

Regional Statistics by NUTS Classification

+ + +

Terms of Use.

+ +

General Statistics Office (GSO), Vietnam

+ +

Vietnam Census

+

Vietnam Demographics, Economy, Health, Education data from Portal Site of General Statistics Office by national, province and city level.

+ +

India Ministry of Education

+

Data on schools, such as dropout rate and access to computers and toilets, in Indian states and school districts.

+ +

Unified District Information System for Education (UDISE)

+

The Unified District Information System for Education (UDISE), by the Ministry of Education, India, collects and provides data related to schools and their resources.

+ +

Mexico National Institute of Statistics and Geography(INEGI)

+ +

Mexico Census

+

Population Census and Statistics for Mexico at Country and State levels.

+ +

Open Data for Africa

+ +

Kenya Census

+

Kenya Demographics, Health and Education data from Kenya National Bureau Of Statistics by country, county and towns and suburbs. +Terms of use.

+ +

SouthAfrica Census

+

South Africa Demographics, Health and Education data from South Africa Data Portal by country, province and district municipality.

+ +

Uganda Bureau of Statistics (UBOS)

+

Uganda Demographics, education and Health data from Uganda Bureau of Statistics (UBOS) by country, region and district. Terms of Use for this dataset.

+ +

Organisation for Economic Co-operation and Development (OECD)

+ +

OECD Regional Education Statistics

+

OECD 2024, OECD Regional Education Statistics, url:https://stats.oecd.org/Index.aspx?DataSetCode=REGION_EDUCATaccessed on 01/17/2024.

+ +

License

+ +

Portal Site of Official Statistics of Japan (e-Stat)

+ +

Japan Census

+

Japan Demographics, Economy, Health, Education data from Portal Site of Official Statistics of Japan (e-Stat) by country, prefecture and municipality.

+ +

Statistics Canada

+ +

Canada Statistics

+

Canada Demographics, Health, Education and Economy statistics at Canada country and subnational levels. +Terms and Conditions.

+ +

Statistics Sweden

+ +

Sweden Census

+

Sweden Demographics, Health and Education data from Statistics Sweden at country, nuts1, nuts2, nuts3 and municipality level.

+ +

U.S. Census Bureau

+ +

American Community Survey Education Tabulation (ACS-ED)

+

The National Center for Education Statistics collaborates with the US Census Bureau to create a variety of custom data files that describe the condition of school-age children in the United States at the country, state, and school district level. ACS-ED is updated annually based on ACS five-year period estimates.

+ +

U.S. Census Terms of Service.

+ +

U.S. Department of Education (ED)

+ +

College Scorecard

+

University Data: data about all undergraduate degree-granting institutions of higher education.

+ +

Terms of Service.

+ +

U.S. National Center for Education Statistics

+ +

National Center for Education Statistics

+

NCES Collects, collates, analyzes, and report full and complete statistics on the condition of education in the United States and other Nations

+ +

Nations Report Card

+

National educational performance - Assessment score data across different grades, subjects and student categories(Like race, disability etc).

+ +

Public School and School District Data

+

General descriptive information such as name, address, and phone number; select demographic characteristics about students and staff; and fiscal data such as revenues and current expenditures. Data Commons includes school and school district level data about student populations by race, gender, lunch eligibility, and grade, as well as student-teacher ratio and teacher count statistics.

+ +

US Private School Data

+

General descriptive information such as name, address, and phone number; select demographic characteristics about students and staff. Data Commons includes school data about student populations by race, grade, as well as student-teacher ratio and teacher count statistics.

+ +

NCES Data Usage Agreement and US Department of Education Copyright Status Notice.

+ +

U.S. National Science Foundation

+ +

National Center for Science and Engineering Statistics

+

National Center for Science and Engineering Statistics provide data on the status of the science and engineering enterprise in the U.S. and other countries.

+ +

United Nations Office for the Coordination of Humanitarian Affairs(UN OCHA)

+ +

Sri Lanka Census

+

Sri Lanka Demographics, Education and Agriculture statistics for Sri Lanka at country,province and district Level.

+ +

World Bank

+ +

World Bank Datasets

+

World Bank datasets related to demographics, economy, education, etc. +Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Energy.html b/datasets/Energy.html new file mode 100644 index 000000000..59c0f06ed --- /dev/null +++ b/datasets/Energy.html @@ -0,0 +1,596 @@ + + + + + Energy - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Energy

+ + + +

U.S. Energy Information Administration (EIA)

+ +

Commercial Buildings Energy Consumption Survey (CBECS)

+

Energy consumption and expenditures for U.S. commercial buildings including energy sources across U.S. census regions and divisions.

+ +

Form EIA-860

+

Survey form collects generator-level data about electric power plants.

+ +

Open Data

+

County, state, and plant-level data on generation, consumption, and sales for different energy sources and “sectors” (residential, commercial, etc). Data Commons has imported data about coal, electricity, natural gas, nuclear outages, and petroleum.

+ +

Copyrights and Reuse.

+ +

U.S. National Renewable Energy Laboratory (NREL)

+ +

RE Atlas

+

Data Commons has imported the potential for solar energy generation in different counties in the US.

+ +

Disclaimer.

+ +

United Nations (UN)

+ +

Energy Statistics

+

Data Commons has imported energy data about annual energy production, transformation, and consumption for countries.

+ +

Terms of Use.

+ +

World Bank

+ +

World Bank Datasets

+

World Bank datasets related to demographics, economy, education, etc.

+ +

World Development Indicators

+

Data Commons includes variables related to demographics, energy, health, labor, etc. from the World Bank.

+ +

Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Environment.html b/datasets/Environment.html new file mode 100644 index 000000000..542abdbff --- /dev/null +++ b/datasets/Environment.html @@ -0,0 +1,883 @@ + + + + + Environment - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Environment

+ + + +

Brazil INPE - National Institute for Space Research

+ +

BRAZIL INPE Fire Event Count

+

This dataset represents count of occurrence of fire event in Brazil.Data available for Country and state level.

+ +

Climate TRACE

+ +

Climate TRACE GHG Emissions

+

Historical Data about Greehouse Gas (GHG) emissions from 10 sectors and various sub-sectors at country level. +The Climate TRACE data is made available through the Climate TRACE terms of use.

+ +

Data Commons

+ +

Temperature Event

+

The events for places with unusual temperatures, either too hot or too cold, computed with reference to long term temperature averages, e.g. the average maximum daily temperature in January over the years 1980-2010.

+ +

WetBulb Temperature Event

+

Places with WetBulb Temperature exceeding 30 degree Celsius as per NASA’s Modern-Era Retrospective analysis for Research and Applications version 2 (MERRA-2) dataset on Google Earth Engine.

+ +

Dynamic World Project

+ +

Inferred Floods from Dynamic World

+

This dataset includes flooded regions computed from the Dynamic World dataset. These are regions labelled as water and outside regions marked as permanent water in the Hansen Global Forest Change dataset.

+ +

This dataset is produced for the Dynamic World Project by Google in partnership with National Geographic Society and the World Resources Institute.

+ +

European Union (EU) Copernicus

+ +

Copernicus ECMWF - ERA5 Climate Reanalysis Data

+

ERA5 is the fifth generation ECMWF atmospheric reanalysis of the global climate. Reanalysis combines model data with weather observations from across the world into a globally complete and consistent dataset.

+ +

Copernicus Global Land Cover

+

Land cover data from the Copernicus Land Cover viewer. Data Commons currently includes observations for US states and counties.

+ +

Citation for Use.

+ +

Federal Emergency Management Agency

+ +

National Flood Insurance Program (NFIP)

+

The National Flood Insurance Program (NFIP), managed by the Federal Emergency Management Agency (FEMA), enables homeowners, business owners and renters in participating communities to purchase federally backed flood insurance. The data includes insurance claims and amounts paid for flood damage to buildings and its contents aggregated by census-tracts, counties and states. +This product uses the Federal Emergency Management Agency’s OpenFEMA API, but is not endorsed by FEMA. The Federal Government or FEMA cannot vouch for the data or analyses derived from these data after the data have been retrieved from the Agency’s website(s).

+ +

National Risk Index

+

Data Commons includes relative measures of risk from the 18 natural hazards included in the study for counties and census tracts, as well as annual expected loss figures in USD from individual hazards and in aggregate. This study and associated data are released with this disclaimer.

+ +

Global Land Ice Measurements from Space (GLIMS)

+ +

Randolph Glacier Inventory

+

A global inventory of glaciers, including surface areas.

+ +

India Water Resources Information System

+

The Water Resources Information System (WRIS) is a repository of water resources and related data for India at national, state and district level.

+ +

India Water Quality

+

Water quality data measured at ground and surface water qualiy stations across India providing concentrations of dissolved constituents in water in terms of physical, chemical and biological parameters.

+ +

WRIS India Rainfall

+

WRIS India monthly rainfall data of district level.

+ +

Organisation for Economic Co-operation and Development (OECD)

+ +

Air and GHG emissions

+

Country wise air and greenhouse gas emission from Organization for Economic Cooperation and Development (OECD).

+ +

OECD Waste Water Treatment

+

Population connected to the waste water treatment using different methods from the Organisation for Economic Co-operation and Development (OECD) for different countries. +License

+ +

Resources for the Future (RFF)

+ +

US Wildfire, Smoke and Drought statistics - County and State

+

This dataset incorporates statistics aggregated by RFF from the following +sources:

+ +
    +
  1. +

    Temperature, precipitation, and vapor pressure deficit data were obtained +from PRISM Climate Group, Oregon State University. Available at: +https://prism.oregonstate.edu/recent/. All data span the years 1981 to 2020. +Data on maximum temperature, vapor pressure deficit, and precipitation are +monthly. Data on minimum temperature are daily.

    + +

    License: All data retrieved from https://prism.oregonstate.edu may be freely +reproduced and distributed for non-commercial purposes only.

    +
  2. +
  3. +

    Palmer Drought Severity Index (PDSI) data come from gridMET. Data are daily for the years 1981 to 2020.

    + +

    License: These data are freely available for public use.

    +
  4. +
  5. +

    Data on forest cover and fire severity in the western US is from Parks & +Abatzoglou (2020), available here.

    + +

    License: This work is licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain +Dedication license.

    +
  6. +
  7. +

    County-level population estimates from the US Census Bureau. Available +here

    + +

    License: These data are freely available for public use.

    +
  8. +
  9. +

    Data on heatwaves come from Resources for the Future and Google Data Commons, +available here.

    + +

    License: RFF derives heatwave indicators from daily minimum temperature data + generated by PRISM Climate Group, University of Oregon. When using these + data, please clearly and prominently state the PRISM Climate Group and their + URL ( https://prism.oregonstate.edu/ ). According to PRISM’s terms of use, + these data may be freely reproduced and distributed for non-commercial + purposes only.

    +
  10. +
  11. +

    MTBS Data Access: Fire Level Geospatial Data. MTBS Project (USDA Forest +Service/U.S. Geological Survey), available online +here.

    + +

    License: These data are freely available for public use.

    +
  12. +
  13. +

    Data on PM2.5 from wildfire smoke is from Childs et al. 2022, available +here.

    + +

    License: Permission is hereby granted, free of charge, to any person +obtaining a copy, of this software and associated documentation files (the +“Software”), to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following +conditions:

    + +
      +
    • +

      The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software.

      +
    • +
    • +

      The software is provided “as is”, without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall +the authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising +from, out of or in connection with the software or the use or other +dealings in the software.

      +
    • +
    +
  14. +
+ +

This data is made available for non-commercial purposes only.

+ +

U.S. Bureau of Transportation Statistics

+ +

US Tract Transportation Characteristics for Households

+

Information related to transportation characteristics for households which includes data at Census Tract level on daily personal travel, including information on household and demographic characteristics, employment status, vehicle ownership, trips taken, modal choice, and other related transportation data pertinent to U.S. households.

+ +

U.S. Center for Disease Control and Prevention (CDC)

+ +

Environmental Health Toxicology

+

Data Commons has imported data on Palmer Drought Severity Index, Standardiazed Precipitation Evapotranspiration Index, Standardized Precipitation Index, Ozone, and PM2.5.

+ + +

Includes data about various heat-stress-induced medical incidents.

+ +

CDC Data Terms of Service.

+ +

U.S. Environmental Protection Agency (EPA)

+ +

Air Data

+

Air quality data collected from outdoor monitors on the county, CBSA, and site monitor level.

+ +

EJSCREEN

+

Environmental justice mapping tool based on environmental and demographic indicators.

+ +

Greenhouse Gas Reporting Program

+

Annual reporting of greenhouse gases from large emission sources.

+ +

National Emissions Inventory

+

The National Emissions Inventory (NEI) is a comprehensive and detailed estimate of air emissions of criteria pollutants, hazardous pollutants and greenhouse gases from 188 onroad air emission sources (mobile sources such as highway and border crossing vehicles electricity measurement), 248 nonroad air emissions sources (mobile sources such as off-highway vehicle gasoline measurement), 703 nonpoint air emissions sources (such as industrial processes, oil and gas exploration and production) and 5818 point air emissions sources (such as chemical and organic solvent evaporation measurement) at the US county level.

+ +

Superfund Sites

+

Site contamination data, hazard scores and more.

+ +

Copyright Status.

+ +

U.S. National Aeronautics and Space Administration (NASA)

+ +

NEX - Downscaled Climate Projections for US from IPCC CMIP5

+

Atmospheric variables from multiple CMIP5 climate models for the United States.

+ +

Tech Note.

+ +

NEX - Global Downscaled Climate Projections from IPCC CMIP5

+

Atmospheric variables from multiple CMIP5 climate models for the entire world.

+ +

Tech Note.

+ +

NEX - Global Downscaled Climate Projections from IPCC CMIP6

+

Atmospheric variables from multiple CMIP6 climate models for the entire world.

+ +

Tech Note.

+ +

PO.DAAC - Sea level Projections from IPCC CMIP6

+

Sea Level projections from 2020 to 2150 for all future scenarios in CMIP6 on a regular global grid and local projections at individual tide gauge locations.

+ +

VIIRS Active Fire Data

+

The Visible Infrared Imaging Radiometer Suite (VIIRS) aboard S-NPP satellite provides 375m resolution data for active fires. This dataset includes area under fire per level 13 S2 cell every day starting in 2012.

+ +

U.S. National Oceanic and Atmospheric Administration (NOAA)

+ +

GPCC Monthly SPI Data

+

Historical monthly SPI calculated from data observed from German Meteorological Service(Deutscher Wetterdienst).

+ +

International Best Track Archive for Climate Stewardship (IBTrACS)

+

The IBTrACS project provides tropical cyclone best track data in a centralized location. Data Commons includes cyclone name, start date, end date, max wind speed, minimum pressure, max classification, oceanic basin, and affected places.

+ +

NOAA CoastWatch

+

Sea surface salinity and temperature data mapped to S2 cells.

+ +

NOAA-EPA Observed Weather Data

+

Historical weather data from stations reported largely from NOAA Global Historical Climate Network (GHCN).

+ +

NOAA-GFS Weather Forecast

+

Global daily weather forecast generated from National Centers for Environmental Prediction (NCEP) model.

+ +

National Climatic Data Center Storm Events Database

+

Occurrence of storms and other significant weather phenomena having sufficient intensity to cause loss of life, injuries, significant property damage, and/or disruption to commerce; rare, unusual, weather phenomena that generate media attention, such as snow flurries in South Florida or the San Diego coastal area; and other significant meteorological events, such as record maximum or minimum temperatures or precipitation that occur in connection with another event.

+ +

National Weather Service Use of NOAA/NWS Data and Products Terms of Service.

+ +

U.S. National Wildfire Coordinating Group

+ +

National Interagency Fire Center Interagency Situation Report - 209 (SIT-209)

+

Information related to the wildland fire management incidents and resources.

+ +

US Forest Service Terms of Service.

+ +

United States Geological Service (USGS)

+ +

National Water Use Data

+

Water use data for states and counties in the US, broken down by water source (ground water, surface water), water type (fresh water, saline water), and category of use (domestic, industrial, etc.).

+ +

USGS Copyrights and Credits Terms of Service.

+ +

World Bank

+ +

World Bank Datasets

+

World Bank datasets related to demographics, economy, education, etc. +Terms of Use.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Health.html b/datasets/Health.html new file mode 100644 index 000000000..87f0dcfb2 --- /dev/null +++ b/datasets/Health.html @@ -0,0 +1,884 @@ + + + + + Health - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Health

+ + + +

Australian Bureau of Statistics

+ +

Australia Statistics

+

Australia Demographics, Health, Economy statistics at country,state,territories and 4 levels of statistial areas.

+ +

Central Bureau of Statistics (CBS), Israel

+ +

Israel Census

+

Israel Demographics, Health, Economy statistics for Israel at country, district and sub-district Level.

+ +

Central Statistics Office(CSO), Ireland

+ +

Ireland Census

+

Ireland Demographics, Health and Economy data from Central Statistics Office(CSO) by country, county and city.

+ +

Dartmouth Atlas Project

+ +

Dartmouth Atlas of Health Care

+

The Dartmouth Atlas Project “uses Medicare and Medicaid data to provide information and analysis about national, regional, and local markets, as well as hospitals and their affiliated physicians.” Data Commons includes the Medicare Reimbursements, Medicare Mortality Rates, and Selected Primary Care Access and Quality Measures datasets.

+ +

Data is made available under the Dartmouth Atlas Project Terms of Use.

+ +

DataMeet

+ +

COVID-19

+

DataMeet provides cleaned datasets relating to COVID-19 in India, sourced from various government websites. (Terms of Use.)

+ +

Department of Statistics Singapore

+ +

Singapore Census

+

Singapore Demographics and Health statistics for Singapore at country.

+ +

European Union (EU) Eurostat

+ +

EuroStat Health

+

Health statistics measure both objective and subjective aspects of people’s health. They cover different kinds of health-related aspects, including key indicators on the functioning of the health care systems and health and safety at work.

+ +

Regional Statistics by NUTS Classification

+ + +

Terms of Use.

+ +

Feeding America

+ +

Feeding America: Map Meal Gap

+

Feeding america’s mission is to advance change in America by ensuring equitable access to nutritious food for all in partnership with food banks, policymakers, supporters, and the communities we serve.

+ +

General Statistics Office (GSO), Vietnam

+ +

Vietnam Census

+

Vietnam Demographics, Economy, Health, Education data from Portal Site of General Statistics Office by national, province and city level.

+ +

Google

+ +

COVID-19 Community Mobility Reports

+

Google’s COVID-19 Community Mobility Reports “chart movement trends over time by geography, across different categories of places such as retail and recreation, groceries and pharmacies, parks, transit stations, workplaces, and residential.” Data Commons includes all statistics for countries, US states, and US counties.

+ +

Data made publicly available under the standard Google Terms of Service.

+ +

India National Health Mission

+

National Health Mission (NHM) is a flagship programme of the Government of India to address the health needs of under-served ruralareas and health concerns of the urban poor population.

+ +

Health Management Information System

+

The Health management Information System (HMIS) of the National Health Mission, India captures medical facility-wise information such as reproductive, meternal and child health, immunization, family planning and vector borne diseases on a monthly basis ats district, state and national levels.

+ +

India National Sample Survey

+

The India National Sample Survey (NSS) Organizes and conducts large scale all-India sample surveys on different population groups in diverse socio economic areas, such as employment, consumer expenditure, housing conditions and environment, literacy levels, health, nutrition, family welfare, etc.

+ +

India National Sample Survey - Health

+

Household health survey on profile of ailments including their treatment, role of government and private facilities in providing healthcare, expenditure on medicines, expenditure on medical consultation and investigation, hospitalization and expenditure, maternity and childbirth, the condition of the aged, etc. +Terms of Use

+ +

Mexico National Institute of Statistics and Geography(INEGI)

+ +

Mexico Census

+

Population Census and Statistics for Mexico at Country and State levels.

+ +

National Institute of Statistics and Censuses (INDEC)

+ +

Argentina Census

+

Population Census and Statistics for Argentina.

+ +

National Institution for Transforming India.

+ +

India National Family Health Survey

+

India National Family Health Survey - Data on population dynamics and health indicators as well as data on emerging issues in health and family welfare and associated domains.

+ +

Open Data for Africa

+ +

Kenya Census

+

Kenya Demographics, Health and Education data from Kenya National Bureau Of Statistics by country, county and towns and suburbs. +Terms of use.

+ +

SouthAfrica Census

+

South Africa Demographics, Health and Education data from South Africa Data Portal by country, province and district municipality.

+ +

Uganda Bureau of Statistics (UBOS)

+

Uganda Demographics, education and Health data from Uganda Bureau of Statistics (UBOS) by country, region and district. Terms of Use for this dataset.

+ +

Our World in Data

+ +

COVID-19 Vaccinations

+

Data Commons imports country-level COVID-19 vaccine data from Our World in Data.

+ +

Terms of Use.

+ +

Portal Site of Official Statistics of Japan (e-Stat)

+ +

Japan Census

+

Japan Demographics, Economy, Health, Education data from Portal Site of Official Statistics of Japan (e-Stat) by country, prefecture and municipality.

+ +

Statistics Canada

+ +

Canada Statistics

+

Canada Demographics, Health, Education and Economy statistics at Canada country and subnational levels. +Terms and Conditions.

+ +

Statistics Sweden

+ +

Sweden Census

+

Sweden Demographics, Health and Education data from Statistics Sweden at country, nuts1, nuts2, nuts3 and municipality level.

+ +

Statistics of New Zealand

+ +

New Zealand Census

+

New Zealand Demographics, statistics for New Zealand at country, district and city level.

+ +

The Central Bureau of Statistics, Indonesia

+ +

Indonesia Census

+

Population Census and Statistics for Indonesia at country, provinces and regency and city level.

+ +

The New York Times

+ +

Coronavirus (Covid-19) Data in the United States

+

The New York Times releases cumulative counts of coronavirus cases in the United States at the country, state, and county level, over time. The New York Times compiles this time series data from state and local governments and health departments in an attempt to provide a complete record of the ongoing outbreak. Data Commons imports this data and computes incremental counts for users.

+ +

Data made available for non-commercial purposes only with proper citation.

+ +

U.S. Census Bureau

+ +

Small Area Health Insurance Estimates (SAHIE)

+

The Small Area Health Insurance Estimates program provides yearly estimates of health insurance coverage status for all counties and states. Data Commons includes all estimates, available by age, race, sex, and income.

+ +

U.S. Census Terms of Service.

+ +

U.S. Center for Disease Control and Prevention (CDC)

+ +

Agency for Toxic Substances and Disease Registry(ATSDR)

+

ATSDR is a federal health agency that provides health information about hazardous substances and their health effects.

+ +

BRFSS-NCHS Asthma Prevalence

+

The statistics for prevalence of asthma among adults is for counties in 50 states and prevalence of asthma among children is for counties in 27 participating states. The data source is the 2016–2018 Behavioral Risk Factor Surveillance System (BRFSS) which is merged with the 2013 National Center for Health Statistics (NCHS) Urban-Rural Classification Scheme for Counties.

+ +

Diabetes Surveillance System

+

Estimates of the number and percentage of US adults with diabetes.

+ + +

Includes data about various heat-stress-induced medical incidents.

+ +

National Notifiable Diseases Surveillance System (NNDSS)

+

Weekly and Annual cases of selected national notifiable (infectious and non-infectious) diseases reported by the 50 states, New York City, the District of Columbia, and the U.S. territories.

+ +

National Outbreak Reporting System (NORS)

+

National Outbreak Reporting System (NORS) data from reports of foodborne and waterborne disease outbreaks and enteric (intestinal) disease outbreaks spread by contact with environmental sources, infected people or animals, and other means.

+ +

PLACES: Local Data for Better Health

+

“PLACES provides model-based, population-level analysis and community estimates of health measures to all counties, places (incorporated and census designated places), census tracts, and ZIP Code Tabulation Areas (ZCTAs) across the United States.”

+ +

Pregnancy Risk Assessment Monitoring System (PRAMS)

+

Pregnancy Risk Assessment Monitoring System (PRAMS) is a population-based surveillance system designed to identify groups of women and infants at high risk for health problems, to monitor changes in health status, and to measure progress towards goals in improving the health of mothers and infants.

+ +

Wonder: Compressed Mortality

+

Mortality counts for all US states and counties broken down by underlying cause of death, age, race, sex, and year.

+ +

Wonder: Mortality, Underlying Cause Of Death

+

The Underlying Cause of Death database contains mortality data based on death certificates for U.S. residents.

+ +

Wonder: Natality

+

Includes “counts of live births occurring within the United States to U.S. residents. Counts can be obtained by a variety of demographic characteristics, such as state and county of residence, mother’s race, and mother’s age, and health and medical items, such as tobacco use, method of delivery, and congenital anomalies. The data are derived from birth certificates.”

+ +

CDC Data Terms of Service.

+ +

U.S. Drug Enforcement Agency (DEA)

+ +

ARCOS Retail Drug Summary Reports

+

Data from the Automated Reports and Consolidated Ordering System (ARCOS) is a data collection system in which manufacturers and distributors report their controlled substances transactions to the Drug Enforcement Administration (DEA). Data Commons includes quarterly retail drug distributions from ARCOS Report 1, provided annually from 2006-2017. The 3-digit zip prefixes from the report were aggregated to the county level using 2010 ZIP Code Tabulation Area (ZCTA) Relationship records from the US Census. Please see the disclaimers page about the scope of the data.

+ +

U.S. Department of Justice Legal Policies and Disclaimers Terms of Use.

+ +

UK Ministry of Housing Communities and Local Government

+ +

IMD2019

+

Statistics on relative deprivation in small areas in England.

+ +

World Bank

+ +

World Development Indicators

+

Data Commons includes variables related to demographics, energy, health, labor, etc. from the World Bank.

+ +

Terms of Use.

+ +

World Health Organization (WHO)

+ +

Coronavirus Disease (COVID-19) Dashboard

+

The World Health Organization publishes national COVID-19 cases and death counts for countries across the world. Data Commons imports this data on a daily basis.

+ +

Data made available under CC BY-NC-SA 3.0 IGO.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/Housing.html b/datasets/Housing.html new file mode 100644 index 000000000..e4fdd93a4 --- /dev/null +++ b/datasets/Housing.html @@ -0,0 +1,554 @@ + + + + + Housing - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Housing

+ + + +

U.S. Census Bureau

+ +

American Community Survey (ACS)

+

The American Community Survey covers a broad range of topics about social, economic, demographic, and housing characteristics of the U.S. population. The ACS 5-year (and 1-year) estimates are updated every year, based on the last 5 years (1 year) of collected data. Data Commons includes thousands of variables across the full range of ACS topics at the country, state, county, city, zip code tabulation area, school district, census tract levels, and more.

+ +

US Decennial Census - Redistricting data

+

Basic population, race demographics and housing statistics from the redistricting data release of US Decennial Census mapped down to block-group level. +U.S. Census Terms of Service.

+ + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/covid19.html b/datasets/covid19.html new file mode 100644 index 000000000..6af0d0f19 --- /dev/null +++ b/datasets/covid19.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/datasets/index.html b/datasets/index.html new file mode 100644 index 000000000..8aa0c44ce --- /dev/null +++ b/datasets/index.html @@ -0,0 +1,561 @@ + + + + + Data sources - Docs - Data Commons + + + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Data Sources

+ +

Data in the Data Commons Graph comes from a variety of sources, each of which often includes multiple surveys. Some sources/surveys include a very large number of variables, some of which might not yet have been imported into Data Commons. The sources have been grouped by category and are listed alphabetically within each category.

+ +
    +
  1. Agriculture
  2. +
  3. Biomedical
  4. +
  5. Crime
  6. +
  7. Demographics
  8. +
  9. Economy
  10. +
  11. Education
  12. +
  13. Energy
  14. +
  15. Environment
  16. +
  17. Health
  18. +
  19. Housing
  20. +
+ +

 

+ +

Data coverage

+ +

The following charts illustrate the data coverage in terms of global statistical variables at the country, state, and district levels. The first chart illustrates the total number of statistical variables available per country, excluding the USA where data coverage is currently most extensive

+ +

 

+
+

 

+ +

This chart goes a level deeper and illustrates the total number of statistical variables available at the state level for each country worldwide.

+

 

+
+

 

+ +

Finally, this third chart illustrates the total number of statistical variables available at the district/county level worldwide.

+ +

 

+
+

 

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/datasets/international.html b/datasets/international.html new file mode 100644 index 000000000..6af0d0f19 --- /dev/null +++ b/datasets/international.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/datasets/sustainability.html b/datasets/sustainability.html new file mode 100644 index 000000000..6af0d0f19 --- /dev/null +++ b/datasets/sustainability.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/datasets/united_states.html b/datasets/united_states.html new file mode 100644 index 000000000..6af0d0f19 --- /dev/null +++ b/datasets/united_states.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/feed.xml b/feed.xml new file mode 100644 index 000000000..327ccd1a3 --- /dev/null +++ b/feed.xml @@ -0,0 +1,153 @@ +Jekyll2025-01-14T23:42:01+00:00https://docs.datacommons.org/feed.xmlData Commons DocsData Commons DocumentationData Commons’ New Natural Language Interface2023-09-13T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2023/09/13/explore<p>Data Commons is now harnessing the power of AI, specifically large language models (LLMs), to create a natural language interface. LLMs are used to understand the query and the results come straight from Data Commons, including a link to the original data source.</p> + +<p>Learn more in our <a href="https://blog.google/technology/ai/google-data-commons-ai/">Keyword blog post</a>.</p>R.V.GuhaData Commons is now harnessing the power of AI, specifically large language models (LLMs), to create a natural language interface. LLMs are used to understand the query and the results come straight from Data Commons, including a link to the original data source.New Courseware - Data Literacy with Data Commons2022-12-28T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2022/12/28/courseware<h3 id="tldr">tl;dr</h3> + +<p>Today, we are announcing the open and public availability of “Data Literacy with Data Commons” which comprises curriculum/course materials for instructors, students and other practitioners working on or helping others become <em>data literate</em>. This includes detailed modules with pedagogical narratives, explanations of key concepts, examples, and suggestions for exercises/projects focused on advancing the <em>consumption</em>, <em>understanding</em> and <em>interpretation</em> of data in the contemporary world. In our quest to expand the reach and utility of this material, we assume no background in computer science or programming, thereby removing a key obstacle to many such endeavors.</p> + +<p>This material can be accessed on our <a href="/courseware/data_literacy/course_materials/">courseware page</a> and it is open for anyone to take advantage of. If you use any of this material, we would love to hear from you! If you end up finding any of this material useful and would like to be notified of updates, do <a href="https://docs.google.com/forms/d/e/1FAIpQLSeVCR95YOZ56ABsPwdH1tPAjjIeVDtisLF-8oDYlOxYmNZ7LQ/viewform">drop us a line</a>.</p> + +<h3 id="what-is-it">What is it?</h3> + +<p>A set of <a href="/courseware/data_literacy/course_materials/modules.html">modules</a> focusing on several <a href="/courseware/data_literacy/course_materials/key_themes.html">key concepts</a> focusing on data modeling, analysis, visualization and the (ab)use of data to tell (false) narratives. Each module lists its objectives and builds on a pedagogical narrative around the explanation of key concepts, e.g. the differences between correlations and causation. We extensively use the Data Commons platform to point to <em>real world</em> examples without needing to write a single line of code!</p> + +<h3 id="who-is-this-for">Who is this for?</h3> + +<p>Anyone and everyone. Instructors, students, aspiring data scientists and anyone interested in advancing their data comprehension and analysis skills without needing to code. For instructors, the <a href="/courseware/data_literacy/course_materials/">curriculum page</a> details the curriculum organization and how to find key concepts/ideas to use.</p> + +<h3 id="whats-different">What’s Different?</h3> + +<p>There are several excellent courses which range from basic data analysis to advanced data science. We make no claim about “Data Literacy with Data Commons” being a replacement for them. Instead, we hope for this curriculum to become a useful starting point for those who want to whet their appetite in becoming data literate. This material uses a hands on approach, replete with <em>real world</em> examples but without requiring any programming. It also assumes only a high-school level of comfort with math and statistics. Data Commons is a natural companion platform to enable easy access to data and core visualizations. We hope that anyone exploring the suggested examples will rapidly be able to explore more and even generate new examples and case studies on their own! If you end up finding and exploring new examples and case studies, please <a href="https://docs.google.com/forms/d/e/1FAIpQLScJTtNlIItT-uSPXI98WT6yNlavF-kf5JS0jMrCvJ9TPLmelg/viewform">share them with us through this form</a>.</p> + +<h3 id="what-is-data-literacy">What is Data Literacy?</h3> + +<p>What does it mean to be “data literate”? Unsurprisingly, the answer depends on who one asks: from those who believe it implies being a casual consumer of data visualizations (in the media, for example) to those who believe that such a person ought to be able to run linear regressions on large volumes of data in a spreadsheet. Given that most (or all) of us are proliferate <em>consumers</em> of data, we take an opinionated approach to defining “data literacy”: someone who is data literate ought to be comfortable with <em>consuming</em> data across a wide range of modalities and be able to interpret it to make informed decisions. And we believe that data literacy ought not to be exclusionary and should be accessible to anyone and everyone.</p> + +<p>There is no shortage of data all around us. While some of it will always be beyond the comprehension of most of us, e.g. advanced clinical trials data about new drugs under development or data reporting the inner workings of complex systems like satellites, much of the data we consume is not as complex and should not need advanced degrees to consume and decipher. For example, the promise of hundreds of dollars in savings when switching insurance providers or that nine out of ten dentists recommend a particular brand of toothpaste or that different segments of the society (men, women, youth, veterans etc) tend to vote a certain way on specific issues. We <em>consume</em> this data regularly and being able to interpret it to draw sound conclusions ought not to require advanced statistics.</p> + +<p>Unfortunately, data literacy has been an elusive goal for many because it has been gated on relative comfort with programming or programming-like skills, e.g. spreadsheets. We believe data literacy should be more inclusive and require fewer prerequisites. There is no hiding from a basic familiarity with statistics, e.g. knowing how to take a sample average—after all, interpreting data is a sStatistical exercise. However, for a large majority of us the consumption, interpretation and decision-making based on data does not need a working knowledge of computer science (programming).</p> + +<p>As a summary, our view on “Data Literacy” can be described as follows:</p> + +<ul> + <li>Ability to consume, understand, create, and communicate with data.</li> + <li>Ability to make decisions based on data.</li> + <li>And to do so confidently, i.e. reduce “data anxiety”.</li> + <li>A skill for everyone, not just “data scientists”.</li> +</ul> + +<p>With these goals in mind, we hope that this introductory curriculum can help the target audiences towards achieving data literacy and inspire many to dive deeper and farther to become data analysts and scientists.</p> + +<p>Crystal, Jehangir, and Julia, on behalf of the Data Commons team</p>Crystal Wang, Jehangir Amjad, and Julia Wutl;drNew Data Download Tool2022-09-14T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2022/09/14/download-tool<p>In the last year, we have added several interesting datasets and exciting new features to Data Commons. One such feature is the new <a href="https://datacommons.org/tools/download">Data Download tool</a> that allows you to easily download statistical variable data for a large number of places with just a few button clicks.</p> + +<p><img src="/assets/images/posts/download_tool.png" alt="The new data download tool" /></p> + +<p>The Data Commons knowledge graph is huge – there are over 240B data points for over 120K statistical variables. Sometimes, you may want to export just some of this data and use it in a custom tool. We now make that easy to do with the new data download tool. The new tool gives you the data in a csv file, does not require any coding experience to use, and allows you to select the statistical variables, places, and dates that you are interested in.</p> + +<p>Maybe you want to explore the population of all the countries in the world (get the data <a href="https://datacommons.org/tools/download#pt=Country&amp;place=Earth&amp;sv=Count_Person&amp;dtType=LATEST&amp;facets=%7B%7D">here</a>). Or you want to analyze poverty levels during COVID-19 (get the data <a href="https://datacommons.org/tools/download#pt=State&amp;place=country%2FUSA&amp;sv=Count_Person_BelowPovertyLevelInThePast12Months__CumulativeCount_MedicalConditionIncident_COVID_19_ConfirmedOrProbableCase&amp;dtType=RANGE&amp;facets=%7B%7D&amp;dtMin=2020&amp;dtMax=2021">here</a>). Or you’re interested in projected temperature differences (relative to 2006) and activities that can be affected by temperature rise (get the data <a href="https://datacommons.org/tools/download#pt=County&amp;place=country%2FUSA&amp;sv=DifferenceRelativeToBaseDate2006_Max_Temperature_RCP45__Percent_Person_WithCoronaryHeartDisease__WithdrawalRate_Water__Area_Farm_IrrigatedLand&amp;dtType=LATEST&amp;facets=%7B%7D">here</a>). The Data Download tool gives you the power to use the data in our knowledge graph to explore all of this and much more in your tool of choice.</p> + +<p>As always, we would love to hear from you! Please share your <a href="https://datacommons.org/feedback">feedback</a> with our team.</p> + +<p>Jennifer on behalf of the Data Commons team</p>Jennifer ChenIn the last year, we have added several interesting datasets and exciting new features to Data Commons. One such feature is the new Data Download tool that allows you to easily download statistical variable data for a large number of places with just a few button clicks.Sustainability Data Commons2022-04-22T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2022/04/22/earth-day<p>Data Commons now includes <a href="https://docs.datacommons.org/datasets/">100+ sources of Sustainability data</a>, covering topics from climate predictions (CMIP 5 and CMIP 6) from NASA, emissions from EPA, energy from EIA, NREL and UN, disasters from USGS and USFS, health from CDC and <a href="https://docs.datacommons.org/datasets/">more</a>. You can learn more about the launch of Sustainability Data Commons on the <a href="https://blog.google/outreach-initiatives/sustainability/data-commons-sustainability/">Google Keyword Blog</a>.</p> + +<p>As always, we are eager to hear your <a href="https://datacommons.org/feedback">feedback</a>.</p> + +<p>Jennifer on behalf of the Data Commons team</p>Jennifer ChenData Commons now includes 100+ sources of Sustainability data, covering topics from climate predictions (CMIP 5 and CMIP 6) from NASA, emissions from EPA, energy from EIA, NREL and UN, disasters from USGS and USFS, health from CDC and more. You can learn more about the launch of Sustainability Data Commons on the Google Keyword Blog.Data Commons Updates2021-10-10T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2021/10/10/updates<p>Over the past few months, we’ve continued to incorporate new data into our knowledge graph and develop new tools. Here are some of the highlights:</p> + +<h3 id="new-statistical-variable-explorer">New Statistical Variable Explorer</h3> +<p>As Data Commons has grown, the number of <a href="https://docs.datacommons.org/glossary.html">Statistical Variables</a> has increased. With over 300k variables to choose from (and counting!), we wanted to make it easier for you to find the right variables for your analysis. To address this, we added a new <a href="https://datacommons.org/tools/statvar">tool for exploring Statistical Variables</a>. The tool provides metadata about the observations, places, and provenances we have for each variable.</p> + +<h3 id="new-data">New Data</h3> +<p>Lately, we’ve been focused on building up our inventory of sustainability-related data. Some of recent our imports include:</p> +<ul> + <li>Several of the IPCC RCP scenarios (e.g. <a href="https://datacommons.org/tools/map#%26sv%3DDaily_Max_Temperature_RCP85%26pc%3D0%26pd%3Dcountry%2FUSA%26pn%3DUnited%20States%20of%20America%26pt%3DCountry%26ept%3DCounty">Max Daily Temperature Based on RCP 8.5</a> in the US)</li> + <li>WHO’s Global Health Observatory (e.g. <a href="https://datacommons.org/tools/timeline#statsVar=WHO%2FNCD_BMI_30A_Female&amp;place=country%2FUSA">Prevalence (%) of females in the US with BMI of 30 or greater</a>, <a href="https://datacommons.org/tools/timeline#statsVar=WHO%2FWSH_WATER_BASIC_Rural&amp;place=country%2FZAF">Percent of rural population in South Africa with at least basic drinking water services</a>, and <a href="https://datacommons.org/tools/timeline#statsVar=WHO%2FFINPROTECTION_CATA_TOT_10_POP_Urban&amp;place=country%2FUSA">Percent of urban population in the US with household expenditures on health greater than 10% of total household expenditure or income</a>)</li> + <li>UN’s Energy Statistics Database (e.g. <a href="https://datacommons.org/tools/timeline#statsVar=Annual_Generation_Energy_Coal&amp;place=country%2FUSA">Annual Generation of Coal</a> in the US)</li> + <li>EPA’s Greenhouse Gas Reporting Program (e.g. Greenhouse Gas emissions from large facilities in <a href="https://datacommons.org/browser/geoId/06085?statVar=Annual_Emissions_GreenhouseGas_NonBiogenic">Santa Clara County</a>, and <a href="https://datacommons.org/browser/geoId/06?statVar=Annual_Emissions_GreenhouseGas_NonBiogenic">California</a>, as well as EPA reporting facilities such as <a href="https://datacommons.org/browser/epaGhgrpFacilityId/1002576">Anheuser Busch Baldwinsville Brewery</a> and <a href="https://datacommons.org/browser/epaGhgrpFacilityId/1002004">Glen Burnie Landfill</a>)</li> + <li>Stanford’s DeepSolar (e.g. <a href="https://datacommons.org/tools/map#%26sv%3DCount_SolarInstallation%26pc%3D1%26pd%3DgeoId%2F06%26pn%3DCalifornia%26pt%3DState%26ept%3DCounty">Count of Solar Installation</a> per capita in California)</li> +</ul> + +<p>We’re also in the process of importing a large number of US Census American Community Survey Subject Tables, which contain detailed demographic data about a variety of topics. For example:</p> +<ul> + <li><a href="https://datacommons.org/tools/map#%26sv%3DCount_Household_WithFoodStampsInThePast12Months_BelowPovertyLevelInThePast12Months%26pc%3D1%26pd%3Dcountry%2FUSA%26pn%3DUnited%20States%20of%20America%26pt%3DCountry%26ept%3DCounty">Count of With Food Stamps in The Past 12 Months, Below Poverty Level in The Past 12 Months</a> per capita</li> + <li><a href="https://datacommons.org/tools/map#%26sv%3DCount_Household_HouseholderEducationalAttainmentSomeCollegeOrAssociatesDegree_SingleMotherFamilyHousehold%26pc%3D0%26pd%3Dcountry%2FUSA%26pn%3DUnited%20States%20of%20America%26pt%3DCountry%26ept%3DCounty">Count of Single Mother Family Household, Some College or Associate’s Degree</a></li> +</ul> + +<h3 id="new-import-tool">New Import Tool</h3> +<p>We’ve made it easier for contributors to add datasets to Data Commons with our new open source command-line tool. This tool provides linting and detailed stats validation, streamlining our data ingestion process and making it more accessible.</p> + +<p>Check out our Github repo <a href="https://github.com/datacommonsorg/import">here</a>.</p> + +<p>As always, please feel free to share any <a href="https://datacommons.org/feedback">feedback</a>.</p> + +<p>Thanks!</p> + +<p>Natalie on behalf of the Data Commons team</p>Natalie DiazOver the past few months, we’ve continued to incorporate new data into our knowledge graph and develop new tools. Here are some of the highlights:Data Commons Updates2021-06-01T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2021/06/01/updates<p>We’ve been hard at work since we <a href="https://docs.datacommons.org/2020/10/15/search_launch.html">surfaced Data Commons in Google Search</a> last October. Some of the exciting features we’ve added include:</p> + +<h3 id="internationalization-support">Internationalization Support</h3> + +<p>Place Explorer is now available in 8 languages in addition to English: <a href="https://datacommons.org/place/country/DEU?hl=de">German</a>, <a href="https://datacommons.org/place/country/MEX?hl=es">Spanish</a>, <a href="https://datacommons.org/place/country/FRA?hl=fr">French</a>, <a href="https://datacommons.org/place/country/IND?hl=hi">Hindi</a>, <a href="https://datacommons.org/place/country/ITA?hl=it">Italian</a>, <a href="https://datacommons.org/place/country/JPN?hl=ja">Japanese</a>, <a href="https://datacommons.org/place/country/KOR?hl=ko">Korean</a> and <a href="https://datacommons.org/place/country/RUS?hl=ru">Russian</a>. Additionally, support for these languages are carried forward from Google Search, <a href="https://www.google.com/search?hl=es&amp;q=Poblaci%C3%B3n+de+M%C3%A9xico">here’s an example</a>.</p> + +<h3 id="new-graph-browser">New Graph Browser</h3> + +<p>The <a href="https://datacommons.org/browser">Graph Browser</a> was rewritten from the ground up to be faster and more responsive. It includes search support for the growing number of <a href="https://github.com/datacommonsorg/data/blob/master/docs/representing_statistics.md#intro-to-statisticalvariable-and-statvarobservation">Statistical Variables</a> available for each node, as well as redesigned to improve information density. Try it out for some nodes such as <a href="https://datacommons.org/browser/country/IND">India</a>, <a href="https://datacommons.org/browser/geoId/2507000?statVar=UnemploymentRate_Person">Unemployment Rate in Boston</a> and <a href="https://datacommons.org/browser/dc/m28y35mxfwsdb">Renal Cell Carcinoma</a>.</p> + +<h3 id="new-scatter-plot-explorer">New Scatter Plot Explorer</h3> + +<p>The new <a href="https://datacommons.org/tools/scatter">Scatter Plot Explorer</a> enables quick visual exploration of any two statistical variables for a set of places. Try it out for <a href="https://datacommons.org/tools/scatter#%26svx%3DCount_Person_Female%26svpx%3D0-8-0%26svdx%3DCount_Person%26svnx%3DFemale%26pcx%3D1%26svy%3DCount_Person_EducationalAttainmentBachelorsDegree%26svpy%3D2-0-6%26svdy%3DCount_Person_25OrMoreYears%26svny%3DBachelors_Degree%26pcy%3D1%26epd%3DgeoId%2F06%26epn%3DCalifornia%26ept%3DCounty">Bachelor Degree Attainment vs Females per capita in California Counties</a> or <a href="https://datacommons.org/tools/scatter#%26svx%3DCount_Person_BlackOrAfricanAmericanAlone%26svpx%3D0-14-2%26svdx%3DCount_Person%26svnx%3DBlack_Or_African_American_Alone%26pcx%3D1%26svy%3DCumulativeCount_MedicalTest_ConditionCOVID_19_Positive%26svpy%3D5-2-0-1%26svdy%3DCount_Person%26svny%3DPositive%26pcy%3D1%26epd%3Dcountry%2FUSA%26epn%3DUnited%20States%20of%20America%26ept%3DState">Covid-19 cases vs African Americans per capita among US States</a>.</p> + +<h3 id="api-documentation-refresh">API Documentation Refresh</h3> + +<p>We participated in the <a href="https://developers.google.com/season-of-docs/docs/2020/participants/project-datacommons-kilimannejaro">2020 Season of Docs</a>, working with Anne Ulrich (<a href="https://gist.github.com/KilimAnnejaro">@KilimAnnejaro</a>) to completely <a href="https://gist.github.com/KilimAnnejaro/722b353875241131b15866e0cf4ab7ea">refresh and improve our API documentation</a>. Every API page was rewritten, in addition to <a href="https://docs.datacommons.org/tutorials/">new Google Sheets API tutorials</a>. We had a wonderful time collaborating with Anne on this project and hope the improved documentation enables more developers to harness the power of our APIs.</p> + +<h3 id="new-stats-api">New Stats API</h3> + +<p>We have also released a new set of APIs centered around statistics retrieval. There are different REST endpoints to retrieve <a href="https://docs.datacommons.org/api/rest/stat_value.html">a single statistical value</a>, <a href="https://docs.datacommons.org/api/rest/stat_series.html">a statistical time series</a> or <a href="https://docs.datacommons.org/api/rest/stat_all.html">the entire collection of statistical data for a set of places</a>. We have used these APIs to build the new Scatter Plot Explorer and hope this enables other applications too.</p> + +<h3 id="new-data">New Data</h3> + +<p>As always, we continue to add more data to the Data Commons Graph. Some recent additions include:</p> +<ul> + <li>Indian Census (e.g. <a href="https://datacommons.org/browser/country/IND?statVar=Count_Household_Houseless_Rural">houseless</a> and <a href="https://datacommons.org/browser/wikidataId/Q15116?statVar=Count_Person_Literate_Rural">rural literacy</a> populations)</li> + <li>Reserve Bank of India’s Poverty data (e.g. <a href="https://datacommons.org/browser/wikidataId/Q1159?statVar=Count_Person_Rural_BelowPovertyLevelInThePast12Months">rural population below poverty in Andhra Pradesh</a>)</li> + <li>FDA and additional drug information (e.g. <a href="https://datacommons.org/browser/bio/CHEMBL512">drug</a> from FDA, ChEMBL, PharmGKB, etc.)</li> + <li>Improved Covid-19 statistics (e.g. <a href="https://datacommons.org/browser/country/IND?statVar=CumulativeCount_Vaccine_COVID_19_Administered">vaccination stats from ourworldindata.org</a>)</li> + <li>US Energy Information Administration (e.g. <a href="https://autopush.datacommons.org/browser/country/USA?statVar=Quarterly_Consumption_Coal_ElectricPower">coal</a> and <a href="https://autopush.datacommons.org/browser/country/USA?statVar=Quarterly_Consumption_Fuel_ForElectricityGeneration_NaturalGas">natural gas consumption</a> for electricity)</li> + <li>Expanded international data from World Bank (e.g., <a href="https://autopush.datacommons.org/browser/country/CHN?statVar=Count_CriminalActivities_MurderAndNonNegligentManslaughter_AsFractionOf_Count_Person">crime</a>, <a href="https://autopush.datacommons.org/browser/country/IND?statVar=Count_Person_15OrMoreYears_Smoking_AsFractionOf_Count_Person_15OrMoreYears">health</a><a href="https://autopush.datacommons.org/browser/country/IND?statVar=Count_Person_Upto4Years_Overweight_AsFractionOf_Count_Person_Upto4Years">stats</a>)</li> + <li>Updated data from existing sources, including: + <ul> + <li>FBI Crime (till <a href="https://datacommons.org/browser/geoId/06?statVar=Count_CriminalActivities_ViolentCrime">2019</a>)</li> + <li>BLS Unemployment (till <a href="https://datacommons.org/browser/geoId/06?statVar=UnemploymentRate_Person">2021 Q1</a>)</li> + <li>World Bank (till <a href="https://www.google.com/search?q=population+of+china&amp;oq=population+of+china">2019</a>)</li> + </ul> + </li> +</ul> + +<p>As always, we are eager to hear from you! Please <a href="https://datacommons.org/feedback">share your feedback</a> with our team.</p> + +<p>Carolyn on behalf of the Data Commons team</p>Carolyn AuWe’ve been hard at work since we surfaced Data Commons in Google Search last October. Some of the exciting features we’ve added include:Data Commons, now accessible on Google Search2020-10-15T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2020/10/15/search_launch<p>Today, we are excited to share that <a href="https://blog.google/products/search/search-on/">Data Commons is accessible via natural language queries in Google search</a>. At a time when data informs our understanding of so many issues–from public health and education to the evolving workforce and more–access to data has never been more important. Data Commons in Google search is a step in this direction, enabling users to explore data without the need for expertise or programming skills.</p> + +<p>Three years ago, the Data Commons journey started at Google with a simple observation: our ability to use data to understand our world is frequently hampered by the difficulties in working with data. The difficulties of finding, cleaning and joining <a href="https://datacommons.org/datasets">datasets</a> effectively limit who gets to work with data.</p> + +<p>Data Commons addresses this challenge head on, performing the tedious tasks of curating, joining and cleaning data sets at scale so that data users don’t have to. The result? Large scale and cloud accessible APIs to clean and normalize data originating from some of the most widely used datasets, including those from the US Census, World Bank, CDC and more. Available as a layer on top of the Knowledge Graph, Data Commons is now accessible to a much wider audience.</p> + +<p>Data Commons is Open. Open Data, Open Source. We hope that like its elder sister Schema.org, it becomes one of the foundational layers of the Web. We know this can only happen if it is built in an open and collaborative fashion. We are actively looking for partnerships on every aspect of this project, and we look forward to <a href="https://datacommons.org/feedback">hearing</a> from you!</p> + +<p>R.V.Guha &amp; the Data Commons team</p>R.V.GuhaToday, we are excited to share that Data Commons is accessible via natural language queries in Google search. At a time when data informs our understanding of so many issues–from public health and education to the evolving workforce and more–access to data has never been more important. Data Commons in Google search is a step in this direction, enabling users to explore data without the need for expertise or programming skills.Data Commons Updates2020-07-26T00:00:00+00:002025-01-14T23:38:52+00:00https://docs.datacommons.org/2020/07/26/updates<p>Over the last month and a half, we have worked hard to add some exciting new features:</p> + +<h3 id="new-map-explorer">New Map Explorer</h3> +<p>The new <a href="http://datacommons.org/tools/map">Map Explorer</a> offers an easy way to visualize how a statistical variable can vary across geographic regions. Try it out for <a href="https://datacommons.org/tools/map#&amp;sv=Count_Person_EducationalAttainmentBachelorsDegreeOrHigher&amp;pc=1&amp;pd=geoId/53&amp;pn=Washington&amp;pt=State&amp;ept=County">Attainment of Bachelor Degree or Higher across Washington Counties</a> or <a href="https://datacommons.org/tools/map#&amp;sv=Median_Income_Person&amp;pc=0&amp;pd=country/USA&amp;pn=United%20States%20of%20America&amp;pt=Country&amp;ept=State">Median Income across US States</a>.</p> + +<h3 id="new-statistical-variable-menu">New Statistical Variable Menu</h3> +<p>The Statistical Variable Menu used for the <a href="http://datacommons.org/tools/scatter">Scatter Plot Explorer</a>, <a href="http://datacommons.org/tools/timeline">Timelines Explorer</a>, and <a href="http://datacommons.org/tools/map">Map Explorer</a> was revamped to serve a much more comprehensive list of over 287000 statistical variables in an easy to consume way. This new menu comes with useful features such as search support and information on the places that each statistical variable has data for.</p> + +<h3 id="new-data">New Data</h3> +<p>We’ve continued to add new data to the Data Commons graph. Some of these new additions include:</p> +<ul> + <li>Air quality data from US Environmental Protection Agency (eg. <a href="http://datacommons.org/browser/geoId/01049?statVar=AirQualityIndex_AirPollutant">Overall Air Quality Index</a>)</li> + <li>India wages data from Indian Periodic Labour Force Survey (eg. mean daily wages for <a href="http://datacommons.org/tools/timeline#place=country%2FIND&amp;statsVar=Mean_WagesDaily_Worker_Urban">urban workers</a> and <a href="http://datacommons.org/tools/timeline#place=country%2FIND&amp;statsVar=Mean_WagesDaily_Worker_Rural">rural workers</a>)</li> + <li>India unemployment rate data from Reserve Bank of India (eg. unemployment rate amongst <a href="http://datacommons.org/tools/timeline#place=country%2FIND&amp;statsVar=UnemploymentRate_Person_Urban">urban residents</a> and <a href="http://datacommons.org/tools/timeline#place=country%2FIND&amp;statsVar=UnemploymentRate_Person_Rural">rural residents</a>)</li> +</ul> + +<p>We would love to <a href="https://datacommons.org/feedback">hear any feedback</a> you may have!</p> + +<p>Jennifer on behalf of the Data Commons team</p>Jennifer ChenOver the last month and a half, we have worked hard to add some exciting new features: \ No newline at end of file diff --git a/glossary.html b/glossary.html new file mode 100644 index 000000000..f4e75b472 --- /dev/null +++ b/glossary.html @@ -0,0 +1,670 @@ + + + + + Glossary - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Glossary of Common Terms

+ +

This page contains a selection of key terms important to understanding the structure of data within Data Commons.

+ +

Term List

+ + + +

Cohort

+ +

A group of entities sharing some characteristic. Interchangeably referred to in a Data Commons context as Cohort and CohortSet. Examples include the CDC’s list of the United States’ 500 largest cities.

+ +
+

The type Cohort is a legacy type not used by the Sheets method DCCOHORTMEMBERS().

+
+ +

Date

+ +

The date of measurement. Specified in ISO 8601 format. Examples include 2011 (the year 2011), 2019-06 (the month of June in the year 2019), and 2019-06-05T17:21:00-06:00 (5:17PM on June 5, 2019, in CST).

+ +

DCID

+ +

Every entity in the Data Commons graph has a unique identifier, called “DCID” (short for “Data Commons Identifier”). So, for example, the DCID of California is geoId/06 and of India is country/IND. DCIDs are not restricted to entities; every node in the graph has a DCID. Statistical variables have DCID, for example the DCID for the Gini Index of Economic Activity is GiniIndex_EconomicActivity.

+ +

To find a DCID for an entity or variable, see the Key concepts page.

+ +

Entity

+ +

An entity represented by a node in the Data Commons knowledge graph. These can represent a wide range of concepts, including cities, countries, elections, schools, plants, or even the Earth itself.

+ +

Facet

+ +

Metadata on properties of the data and its provenance. For example, multiple sources might provide data on the same variable, but use different measurement methods, cover data spanning different time spans, or use different underlying predictive models. Data Commons uses “facet” to refer to a data’s source and its associated metadata.

+ +

Measurement Denominator

+ +

The denominator of a fractional measurement.

+ +

Measurement Method

+ +

The technique used for measuring a variable. Describes how a measurement is made, whether by count or estimate or some other approach. May name the group making the measurement to indicate a certain organizational method of measurement is used. Examples include the American Community Survey and WorldHealthOrganizationEstimates. Multiple measurement methods may be specified for any given node.

+ +

Observation (Statistical Variable Observation)

+ +

A measurement of a variable for a particular place and time. For example, a StatVarObservation of the StatisticalVariable Median_Income_Person for Brookmont, Maryland, in the year 2018 would be $126,199. A complete list of properties of statistical variable observations can be found in the Knowledge Graph.

+ +

Observation Period

+ +

The time period over which an observation is made. Specified in ISO 8601 formatting for durations.

+ +

Place

+ +

Entities that describe specific geographic locations. Use the search box in Place Explorer to search for places in the graph, or view the Knowledge Graph entry for Place for a full view of the node. To learn more about place types, take a look at the place types page.

+ +

Preferred Facet

+ +

When a variable has values from multiple facets, one facet is designated the preferred facet. The preferred facet is selected by an internal ranking system which prioritizes the completeness and quality of the data. Unless otherwise specified, endpoints will default to returning values from preferred facets.

+ +

Property

+ +

Attributes of the entities in the Data Common knowledge graph. Instead of statistical values, properties describe unchanging characteristics of entities, like scientific name.

+ +

Scaling Factor

+ +

Property of variables that measure proportions, used in conjunction with the measurementDenominator property to indicate the multiplication factor applied to the proportion’s denominator (with the measurement value as the final result of the multiplication) when the numerator and denominator are not equal.

+ +

As an example, in 1999, approximately 36% of Canadians were Internet users. Here the measured value of Count_Person_IsInternetUser_PerCapita is 36, and the scaling factor or denominator for this per capita measurement is 100. Without the scaling factor, we would interpret the value to be 36/1, or 3600%.

+ +

Statistical Variable

+ +

Any type of metric, statistic, or measure that can be measured for a specific entity (most typically a place, but could be any other entity in the graph, such as a school or power plant) and time. Examples include median income of persons older than 16, number of female high school graduates aged 18 to 24, unemployment rate, or percentage of persons with diabetes. A complete list of variables can be found in the Knowledge Graph.

+ +

Statistical Variable Group

+ +

Represents a grouping of variables that are conceptually related. For example, variable group Person With Gender = Female consists of variables like Female Median Age, Female Median Income and etc. A variable group could also have child variable groups, which describe a subset of the parent variable group. For example, variable group Person With Age, Gender = Female is a child of Person With Gender = Female. It contains variables that have age constraints.

+ +

Triple

+ +

A three-part grouping describing node and edge objects in the Data Commons graph.

+ +

Given tabular data such as the following:

+ + + + + + + + + + + + + + + + + + + + + +
country_idcountry_namecontinent_id
USAUnited States of Americanorthamerica
INDIndiaasia
+ +

You can represent this data as a graph via subject-predicate-object “triples” that describe the node and edge relationships.

+ +
USA -- typeOf ------------> Country
+USA -- name --------------> United States of America
+USA -- containedInPlace --> northamerica
+
+ +

Unit

+ +

The unit of measurement. Examples include kilowatt hours, inches, and Indian Rupees. A complete list of properties can be found in the Knowledge Graph.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/how_to_use.html b/how_to_use.html new file mode 100644 index 000000000..4fe12929b --- /dev/null +++ b/how_to_use.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/import_dataset/guideimage.png b/import_dataset/guideimage.png new file mode 100644 index 000000000..e137c53b6 Binary files /dev/null and b/import_dataset/guideimage.png differ diff --git a/import_dataset/index.html b/import_dataset/index.html new file mode 100644 index 000000000..3faec4026 --- /dev/null +++ b/import_dataset/index.html @@ -0,0 +1,539 @@ + + + + + Data Imports - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + +

Data Commons Data Imports

+ +

This page houses documents for step-by-step educational and instructional guides for anyone desiring to import a dataset to the Data Commons Graph. Currently there is schema-less import guide, linked below, that can also be used for Custom Data Commons.

+ +

Schemas, data, and import tools all live on Data Commons Github, with accompanying technical documentation included in each repository under the respective “docs” folders.

+ +

Prerequisites

+ +
    +
  1. A GitHub account
  2. +
  3. A dataset(s) for import
  4. +
  5. Enough working knowledge of python to be able to write simple python scripts for .csv file manipulation
  6. +
+ +

Guides

+ +

Schema-less Import Guide

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/import_dataset/schema_less_guide.html b/import_dataset/schema_less_guide.html new file mode 100644 index 000000000..b20bec3a9 --- /dev/null +++ b/import_dataset/schema_less_guide.html @@ -0,0 +1,879 @@ + + + + + Data Commons Schema-less Guide - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Data Commons Schema-less Guide

+ +

About This Guide

+ +

This document is a step-by-step educational and instructional guide for anyone to be able to create a Data Commons schema-less import to contribute to the Data Commons Graph.

+ +

This guide accompanies the Data Commons Schema-Less Import Template. Sections within the template link into this guide. In the template itself, new terminology will be linked out to a glossary of definitions the first time the terminology appears.

+ +

This guide may also be used as a stand-alone document for familiarizing oneself with the Data Commons schema-less import process.

+ +

Schemas, data, and import tools all live on Data Commons Github, with accompanying technical documentation included in each repository under the respective “docs” folders.

+ +

Goal

+ +

To allow any third party contributor to be able to create a schema-less import into Data Commons without prior knowledge of the pipeline or terminology.

+ +

Prerequisites

+ +
    +
  1. A GitHub account
  2. +
  3. A dataset(s) for import
  4. +
  5. Enough working knowledge of python to be able to write simple python scripts for .csv file manipulation +

  6. +
+ +

DC Data Imports

+ +

Data Commons is a platform that allows users to access and share structured data in a common format. A data import on Data Commons refers to the process of uploading data to the platform and making it available for use by other users. The data can be imported in various formats such as CSV, JSON, and RDF, etc.
+
+From there, the data can be used to answer queries like how many people live in a city, what is the average income of a certain city, or how many schools are there in a certain area. However, in order for that to be done, the import needs to be accompanied by a schema design, or at the very least statistical variable categories that represent the semantic information represented by the data.
+
+After the import process, the data will be transformed and standardized to fit the Data Commons schema, which is based on the schema.org vocabulary, making it easier for other users to query and integrate with other data.

+ +

Import Design: Statistical Variables

+ +

In Data Commons, a statistical variable (SV) represents the subject of interest and is associated with factual statistical observations (SVO), which represent specific pieces of data. An SV can be a demographic characteristic, an economic indicator, or any other type of data that can be quantified and measured.

+ +

SVs on Data Commons are organized and presented in a way that makes them easy to find and understand. They are grouped under different categories such as demographic, economic, and social variables, and are linked to relevant external sources such as the US Census Bureau, Bureau of Labor Statistics, etc.

+ +

SVs are comprised of the following elements:

+ +
    +
  • statType refers to a small set of Property nodes +
      +
    • default is measuredValue; others include meanValue, minValue, etc.
    • +
    +
  • +
  • measuredProperty refers to a Property node + +
  • +
  • populationType refers to a Class node
  • +
  • zero or more constraintProperties with singleton constraint values +
      +
    • These Property nodes have domainIncludes of the Class referred to in populationType
    • +
    • The constraint values are Enumerations or Quantity nodes +
        +
      • Example: Female, [20 Years], AsianAlone
      • +
      +
    • +
    +
  • +
  • [optional] measurementQualifier refers to Enumeration nodes +
      +
    • e.g., Nominal / Real for GDP
    • +
    +
  • +
  • [optional] measurementDenominator refers to another StatVar node +
      +
    • For per-capita, measurementDenominator: dcs:Count_Person
    • +
    +
  • +
+ +

For a more in-depth look into SVs and an introduction into Statistical Variable Observations (SVOs), see Representing Statistics in Data Commons.

+ +

Schema-less SVs

+ +

For datasets with complex schema or ones that we want to import quickly, we can start with a schema-less import, and iteratively add schema. The “schema-less” part of this framework means that the SV is not yet fully defined. This lets us get the dataset into Data Commons without blocking on schema definition.

+ +

Schema-less SVs have the following requirements:

+ +
    +
  1. The measuredProperty value must match the stat-var DCID. +
      +
    • This is important, because this is how we identify it is a schema-less SV. As an example:
    • +
    + +
     Node: dcid:Count_MedicalConditionIncident_Tuberculosis
    + typeOf: dcs:StatisticalVariable
    + measuredProperty: dcs:Count_MedicalConditionIncident_Tuberculosis
    + statType: dcs:measuredValue
    +
    +
  2. +
  3. They should have well-formed, stable DCIDs. +
      +
    • As we incrementally add schema, we should not change this DCID.
    • +
    +
  4. +
  5. They should have a name. +
      +
    • We will not auto-generate names, so a user-provided name is essential for display on SV hierarchy, SV explorer, etc.
    • +
    • See more on naming in the DCID Naming Conventions section.
    • +
    +
  6. +
  7. They can have additional constraints that refer to existing schema (as long as they satisfy #1).
  8. +
  9. They should ideally be organized in a hierarchy made of SVGroups (especially if you add a pile of schema-less SVs). +
      +
    • The SVGroups should not have a “dc/g/” DCID prefix.
    • +
    • SVGroups are organized in a specializationOf hierarchy
    • +
    • The root of your hierarchy should be linked to a vertical SVGroup from here
    • +
    • Schema-less stat-vars should be linked to an SVGroup via memberOf property
    • +
    • Example: /dc/g/Person_Gender
    • +
    +
  10. +
+ +

Dataset Types

+ +

For each new data import, summarize the incoming dataset and identify the types of data contained within it with the following steps:

+ +
    +
  1. Identify the source of the data: Determine where the data is coming from and what organization or agency is responsible for collecting and maintaining it. This information can be found in the metadata or documentation that accompanies the dataset.
  2. +
  3. Review the dataset’s structure: Look at the number of columns and rows, as well as the variable names and data types. This will give you an idea of the overall structure of the data and the types of variables it contains.
  4. +
  5. Check the data quality: Look for missing data, outliers, or other issues that may impact the accuracy or completeness of the data. If possible, remove or correct any problematic data before importing it.
  6. +
  7. Identify the types of data: Look at the variables and their values to determine what types of data the dataset contains. Some examples of data types include demographic information, economic indicators, and geographic data.
  8. +
+ +

Contributing New Variables

+ +

When importing new data into DC, there may be some existing variables from previous data imports that represent all or part of your new import. It is important to consider whether existing statistical variables can be reused or if new ones need to be created.

+ +

Here is a quick 1-2 step guide to help you determine when to reuse existing variables and when to create new ones:

+ +
    +
  1. Check existing variables: Before creating a new variable, take a look at our Statistical Variable Explorer to check if an existing variable can be used to represent the data you are importing. This will save time and effort, and it also helps to maintain consistency in the Data Commons graph.
  2. +
  3. Check the variable’s definitions: It’s important to ensure that the variable’s definitions match with the variable’s intended use; if not, you may need to create a new variable.
  4. +
+ +

If, as in most cases, you’ll need to create new statistical variables, please do so with the following guidance below.

+ +

DCID Naming Conventions

+ +

Each new variable receives its own unique identifier, or DCID (Data Commons ID). DCIDs should be clear and written in CamelCase.

+ +

For schema-less SVs, the DCID is not automatically generated, so you’ll need to use the constraint properties above to define the DCID. If your SV does not have an existing populationType to use, please still add a descriptor word or words to the DCID to differentiate your SV, and add in any constraint properties to the DCID as well.

+ +

As an FYI, naming conventions generally follow these rules (click here for notable exceptions):

+ +
    +
  1. +

    For a basic SV without measurementQualifier or measurementDenominator:

    + +
     <statType>_<measuredProp>_<populationType>_<constraintVal1>_<constraintVal2>
    +
    + +

    Example: GrowthRate_Amount_EconomicActivity_GrossDomesticProduction

    +
  2. +
  3. If statType is the default measuredValue, skip it. + Example: Count_Person_Male_AsianAlone
  4. +
  5. Constraint values are ordered based on the alphabetic ordering of the constraint properties. + Example: in Count_Person_Male_AsianAlone, Male_AsianAlone because gender < race
  6. +
  7. +

    For a SV with measurementQualifier, add the value to the prefix.

    + +

    Example: Annual_Average_RetailPrice_Electricity

    +
  8. +
  9. +

    For a SV with measurementDenominator, add a suffix of:

    + +
    _AsAFractionOf_<measurementDenominator>
    +
    + +

    Example: Count_Death_Female_AsAFractionOf_Count_Person_Female

    +
  10. +
+ +

Proposing New Variables or Groups

+ +

When proposing new variables or groups on the import template, follow these guidelines for each column:

+ +

SV name: The name that describes your SV. Human-readable.

+ +

Proposed DCID: The proposed DCID following the naming convention above.

+ +

Value for…

+ +
    +
  • +

    statType: See here.

    +
  • +
  • +

    measuredProperty: Matches the proposed DCID name for an SV in schema-less imports.

    +
  • +
  • +

    populationType: Since populationType is required, please include a value type for this property if the value type already exists (Thing is a commonly used populationType and a great first class to explore). See here for more info.

    +
  • +
  • +

    measurementQualifier, measurementDenominator: These are very helpful to have if the value type already exists in DC. See here for more info.

    +
  • +
  • +

    SV group: The group to which your SV(s) belongs. If the group already exists, then please reuse. Use the aforementioned Statistical Explorer tool to find existing SV groups, similar to how you found existing SVs. Hint: The subtitles on the navigation bar of the SV explorer are akin to SV groups.

    +
  • +
  • +

    Group already exists?: “Y” if you used an existing group; “N” if you needed to create a new group.

    +
  • +
  • +

    Parent group: The vertical group to which your SV group belongs. Try to reuse any of the existing groups if applicable.

    +
  • +
+ +

Data Processing

+ +

After the schema-less design has been decided upon above, it’s time for the data import to begin! The data processing and cleaning process involves the follow stages:

+ +
    +
  1. +

    Data cleaning: Once the data is collected, it needs to be cleaned and prepared for import. This includes tasks such as removing duplicate data, correcting errors, and standardizing the format of the data. Most of these high level issues should have already been identified and addressed in the Dataset Type section of the template; now, make sure to follow through and actually clean the data accordingly.

    +
  2. +
  3. +

    Data transformation: After cleaning, the data is transformed to fit the DataCommons schema, which is based on the schema.org vocabulary. This includes tasks such as mapping the data to the appropriate entities and properties (see Tips for Data Cleaning and Transformation below). Example scripts have been checked into the data repository.

    +
  4. +
  5. +

    Data loading: After the data is transformed, it is loaded into the Data Commons GitHub, where it is made available for use by other users. If the data source is new (e.g. there are not yet other datasets from this source in the scripts folder), create a new folder with the Source name.

    +
  6. +
  7. +

    Data validation: After the data is loaded, the data quality assurance process is done which includes tasks such as checking for errors, inconsistencies, and missing data. Data commons has a “dc-import” tool to help with this validation.

    +
  8. +
  9. +

    Data review: After you validate your new dataset structure, submit your PR for review by the DC team for final approval.

    +
  10. +
+ +

Throughout the process, the data import and cleaning may be aided by scripts and tools that are available in the GitHub repository of Data Commons. These scripts are designed to automate many of the tasks involved in the process, making it more efficient and accurate.

+ +

A clear overview of the data cleaning and transformation process can be found here.

+ +

Tips for Data Cleaning and Transformation

+ +

Your data may be cleaned and transformed in the following ways; please identify in the import template in which ways your data was transformed:

+ +
    +
  • Filtering: Invalid data points, outliers, duplicates
  • +
  • Data transformations such as mapping data attributes to schema, unit conversions, scaling, data types for different fields, such as string vs int vs float
  • +
  • Computations: Any derived stats such as area of geoJsons, etc
  • +
  • Place resolution
  • +
  • Entity resolution
  • +
  • Libraries/frameworks used: geo, html, etc
  • +
  • Dependencies: data, scripts, libraries
  • +
+ +

Creating Your New Data Structure

+ +

Once you have identified what transformations need to occur, it’s time to figure out how to convert your raw data into your new data structure. The best way to do this is to take a screenshot of your original .csv file with all its columns and value types; create a representation of the new .csv data structure that maps to the DC model, and identify the transformations that need to happen. Then, it’s time to script it.

+ +

In order for the data to be transformed into a format that can map onto the DataCommons schema, you’ll most likely need to write a new conversion script. Example scripts have been checked into the data repository. While these existing scripts most likely will not work for your data structure exactly, you can still find similar scripts and view their code.

+ +

Please use this example folder to name your files, scripts, and folders accordingly, and to structure your README.md file.

+ +

Essentially, you’ll need to create a python script that takes in your original .csv file, transforms the data to fit the DC model, and outputs the new .csv file (ideally in a clearly marked output folder).

+ +

Defining Template MCF nodes

+ +

You may have noticed the TMCF files in the example folder. A template MCF node is essentially a template that can be used to create new MCF nodes that represent specific entities or concepts. Refer here for background and examples on creating Template MCF (TMCF) nodes from corresponding .csv files.

+ +

This template will be used to check your new .csv output against for data validation.

+ +

Data Validation

+ +

Now that you have created your new data structure .csv, it’s time to validate the output. Validate the structure of your .csv output, TMCF, and MCF files using the [dc-import](https://github.com/datacommonsorg/import/blob/master/docs/usage.md) tool in lint mode.

+ +

Include the successful output for this validation in a new folder titled validation. This should be one .json file and one results.html file.

+ +

To validate using the dc-import tool, you’ll need the following artifacts (files) below.

+ +

Preparing artifacts

+ +

Once you have successfully created a script to transform your data structure, it’s time to prepare your artifacts (files) for review by the Data Commons github.

+ +

Here is an example of the content you’ll need to submit. The following checklist should help you organize your files for submission:

+ +
    +
  1. +

    StatisticalVariable MCF nodes (if any) to be checked into the schema repo. These nodes may be written by hand when there are only a handful in number. Otherwise, these nodes can be generated via scripts. This should look like a new MCF file named with the source and dataset name. Note that for schema-less SVs, the MCF nodes still take the DCID as the measuredProperty value.

    +
  2. +
  3. +

    Template MCF and corresponding cleaned tabular files (typically CSV). Like StatisticalVariable MCF nodes, the Template MCF nodes can also be hand-written or script-generated depending on the number of nodes. See Defining Template MCF nodes above.

    +
  4. +
  5. +

    Data cleaning code (along with README), original .csv dataset, transformed .csv output, and validation results for the artifacts checked into data repo.

    +
  6. +
+ +

Once your files are ready, please do the following for the Github PR approval process:

+ +
    +
  1. +

    Create a PR with the proposed changes above. It may be easier for you to create 2 PRs, one for the /schema repo for artifact 1) above, and a subsequent one for the /data repo for artifacts 2) and 3) above.

    +
  2. +
  3. +

    For any MCF additions to the /schema repository, run dc-import lint <mcf-files> and attach the output counters to the PR.

    +
  4. +
  5. +

    After approval, do not merge the PR on github. Instead wait for it to be merged by copybara service. This can take a few days as it goes through google team reviews.

    +
  6. +
+ +


+ +

The Data Commons team is looking forward to reviewing your submission!

+ +


+ +

Appendix

+ +

Notable Exceptions for DCID naming

+ +

You will generally find a lot of prior StatVars that don’t follow this convention, such as:

+ +
    +
  1. +

    When constraintProperty is also in name: In cases where the constraint value is not very meaningful (e.g., Boolean) or ambiguous, we include the constraintProperty in the name too.

    + +

    Examples:

    + + +
  2. +
  3. +

    Omitted source-specific prefixes: Consider removing source-specific prefixes in populationType, constraintValues, like USC_, EIA_, BLS, etc.

    + +

    Example: WagesAnnual_Worker_LocalGovernmentOwnedEstablishment_NAICSTotalAllIndustries

    +
  4. +
  5. +

    Excluding populationType from name when irrelevant: In cases where the populationType isn’t adding much value (e.g., just the measuredProperty is self-explanatory), we exclude it.

    + +

    Example: Daily_PrecipitationRate_RCP26

    +
  6. +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 000000000..2d0753f71 --- /dev/null +++ b/index.html @@ -0,0 +1,587 @@ + + + + + How to use Data Commons - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ +

How to use Data Commons

+ +

Data Commons offers many different ways to consume its data:

+ + + +

There are also several options for providing new data to Data Commons:

+ + +

Interact with the datacommons.org website

+ +

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.

+ +

Learn about the data in Data Commons

+ +

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

+ +

Query the Data Commons data directly

+ +

There are several options for directly querying the data, without accessing the datacommons.org website, both interactive and programmatic:

+ +
    +
  • +

    APIs: Data Commons publishes REST, Python, Pandas, and SPARQL APIs. These APIs support both low-level exploration of the knowledge graph as well as higher-level statistical analysis of data. You can call them from any application that supports REST protocols.

    + +

    The Python/ and Pandas APIs provide convenient wrappers, that you can call programatically or interactively, for example, from a Python virtual environment shell or from Google Colab. We have developed a set of Google Colab tutorials to help you get started with analysis.

    + +

    Data Commons also provides ideal training data for developing machine learning models and other data science applications. We have developed a Data science curriculum featuring the Python APIs and data, currently in use at MIT.

    +
  • +
  • +

    Google Sheets Add-on: You can load Data Commons data into Google Sheets for analysis and charting, using a familiar spreadsheet interface. Install and run the Data Commons Google Sheets add-on.

    +
  • +
+ +

Embed Data Commons visualizations in your website

+ +

Data Commons provides a Web components API that makes it a snap to embed various chart elements in your own site, such as scatter plots, maps, pie charts, and many more, using the base Data Commons data.

+ +

Download data for offline analysis

+ +

Data Commons provides tools for downloading its data in CSV format. To preview and download for selected places and statistical variables:

+ +
    +
  • Use the standalone Data Download Tool
  • +
  • Click the Download link in any of the results pages of the visualization tools.
  • +
+ +

Contribute data to datacommons.org

+ +

We are always looking to expand the data available from the base Data Commons site, datacommons.org. If you are interested in contributing data, please fill out this form.

+ +

Develop and host a Data Commons site with your own data

+ +

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 Build your own Data Commons for details.

+ +

Contribute to the open-source initiative

+ +

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

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/papers/DataGemma-FullPaper.pdf b/papers/DataGemma-FullPaper.pdf new file mode 100644 index 000000000..864b73253 Binary files /dev/null and b/papers/DataGemma-FullPaper.pdf differ diff --git a/papers/dc_overview.pdf b/papers/dc_overview.pdf new file mode 100644 index 000000000..f26fbe9db Binary files /dev/null and b/papers/dc_overview.pdf differ diff --git a/papers/index.html b/papers/index.html new file mode 100644 index 000000000..a2319fd4a --- /dev/null +++ b/papers/index.html @@ -0,0 +1,571 @@ + + + + + Papers - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Papers

+ +
    +
  • +

    Data Commons overview paper — background on the motivation, development, and architecture of the Data Commons initiative

    + +

    Citation:

    + +
      @misc{guha2023datacommons,
    +    title={Data Commons}, 
    +    author={Ramanathan V. Guha and Prashanth Radhakrishnan and Bo Xu and Wei Sun and Carolyn Au and Ajai Tirumali and Muhammad J. Amjad and Samantha Piekos and Natalie Diaz and Jennifer Chen and Julia Wu and Prem Ramaswami and James Manyika},
    +    year={2023},
    +    eprint={2309.13054},
    +    archivePrefix={arXiv},
    +    primaryClass={cs.CY},
    +    url={https://arxiv.org/abs/2309.13054}, 
    +  }
    +
    +
  • +
  • +

    Knowing When to Ask - Bridging Large Language Models and Data — technical report on the use of Data Commons statistical data for improving the accuracy of large-language model outputs

    + +

    Citation:

    + +
      @misc{radhakrishnan2024knowing,
    +    title={Knowing When to Ask - Bridging Large Language Models and Data}, 
    +    author={Prashanth Radhakrishnan and Jennifer Chen and Bo Xu and Prem Ramaswami and Hannah Pho and Adriana Olmos and James Manyika and R. V. Guha},
    +    year={2024},
    +    eprint={},
    +    archivePrefix={arXiv},
    +    primaryClass={cs.CL},
    +    url={https://arxiv.org/abs/2409.13741}, 
    +  }
    +
    +
  • +
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/place_types.html b/place_types.html new file mode 100644 index 000000000..509df08de --- /dev/null +++ b/place_types.html @@ -0,0 +1,770 @@ + + + + + Place types - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

Place types

+ +

In Data Commons, a “place type” is a specific geographic or administrative unit +for which we provide data. This could range from broad categories such as +countries, states, and provinces to more granular classifications like counties, +cities, and postal codes. This page provides the DCIDs and a description of +place types available in our APIs and tools.

+ +
+

Note: Not all data is available for all place types. Sources often don’t +provide data at all levels of granularity. You can check which place types have +data available for a specific variable using the +Statistical Variable Explorer.

+
+ +

Globally available geographic divisions

+ +

These place types are generally available for Earth and/or all countries.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
AdministrativeArea1A country’s first-level administrative divisions.

For example, this would encompass US states, Canada’s provinces, and Japan’s prefectures.
AdministrativeArea2A country’s second-level administrative divisions.

For example, this would encompass US counties, France’s departments, or India’s divisions.
CountryA nation.

Note that sources can differ on which countries are recognized. Thus, this category may include some territories and disputed regions.
CityA city.
+ +

Partially available geographic divisions

+ +

These place types represent administrative divisions that are available for some +countries, but not all countries.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
AdministrativeArea3A country’s third-level adminstrative divisions.
AdministrativeArea4A country’s fourth-level administrative divisions.
AdministrativeArea5A country’s fifth-level administrative divisions.
TownA settlement that is bigger than a village but smaller than a city.
VillageA small clustered human settlement smaller than a town.
+ +

U.S.-specific geographic divisions

+ +

These place types can only be used for places that are contained within the +United States (DCID: +country/USA). See https://datacommons.org/browser/dc/base/BaseGeos for additional places defined for the U.S.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
StateU.S. states.

For example, California or Maryland
CountyU.S. counties.

For example, Santa Clara County
CensusZipCodeTabulationAreaU.S. zip codes as defined by the U.S. Census Bureau.

For example, 94043.

While there is significant overlap, these codes don’t always correspond to the zip codes used by the US Postal Service.
CensusTractU.S. census tracts as defined by the U.S. Census Bureau.

For example, Census Tract 10
CensusBlockGroupU.S. block groups as defined by the U.S. Census Bureau.

For example, Block Group 0
+ +

India-specific administrative divisions

+ +

These place types can only be used for places that are contained within +India (dcid: +country/IND).

+ + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
StateIndian states.

For example, Uttar Pradesh or Karnataka
+ +

Europe-specific administrative divisions

+ +

These place types can only be used for places that are contained within Europe +(dcid: europe).

+ + + + + + + + + + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
EurostatNUTS1First-level statistical subdivision within an EU member country.
EurostatNUTS2Second-level statistical subdivision within an EU member country.
EurostatNUTS3Third-level statistical subdivision within an EU member country.
+ +

Earth grids

+ +

These place types represent regions defined by various geographic grid systems. These +place types are typically used with climate-related data.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Place Type DCIDPlace Type Description
GeoGridPlace_0.25DegA place representing a uniform 0.25x0.25 degree grid on the surface of the earth.
GeoGridPlace_1DegA place representing a uniform 1x1 degree grid on the surface of the earth. Unlike IPCCPlace entities, these are not defined in the context of a country.
GeoGridPlace_4KMA place representing a uniform 4km grid on the surface of the earth.
IPCCPlace_25A grid on the earth’s surface approximately corresponding to 0.25-degree resolution for attaching climate-related observations. These are defined within the context of a specific country.
IPCCPlace_50A grid on the earth’s surface approximately corresponding to 0.50-degree resolution for attaching climate related observations. These are defined within the context of a specific country.
S2CellLevel7S2 cell at level 7 which corresponds to an average area of 5188.66 sq km.
S2CellLevel8S2 cell at level 8 which corresponds to an average area of 1297.17 sq km.
S2CellLevel9S2 cell at level 9 which corresponds to an average area of 324.29 sq km.
S2CellLevel10S2 cell at level 10 which corresponds to an average area of 81.07 sq km.
S2CellLevel11S2 cell at level 11 which corresponds to an average area of 20.27 sq km.
S2CellLevel12S2 cell at level 12 which corresponds to an average area of 5.07 sq km.
S2CellLevel13S2 cell at level 13 which corresponds to an average area of 1.27 sq km.
S2CellLevel14S2 cell at level 14 which corresponds to an average area of 0.32 sq km.
+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/redirects.json b/redirects.json new file mode 100644 index 000000000..7f2fcc072 --- /dev/null +++ b/redirects.json @@ -0,0 +1 @@ +{"/blog.html":"https://blog.datacommons.org/","/csv_download.html":"https://datacommons.org/tools/download","/bigquery/data_in_bq":"https://docs.datacommons.org/data_model.html","/bigquery/unique_identifiers":"https://docs.datacommons.org/data_model.html","/courseware/data_literacy/course_materials/how_to_use":"https://docs.datacommons.org/courseware/data_literacy/how_to_use.html","/how_to_use":"https://docs.datacommons.org/","/courseware/data_literacy/overview":"https://docs.datacommons.org/courseware/data_literacy/","/courseware/data_literacy/faq":"https://docs.datacommons.org/courseware/data_literacy/","/bigquery/dc_to_bq_queries":"https://docs.datacommons.org/bigquery/","/datasets/covid19":"https://docs.datacommons.org/datasets/","/datasets/international":"https://docs.datacommons.org/datasets/","/datasets/sustainability":"https://docs.datacommons.org/datasets/","/datasets/united_states":"https://docs.datacommons.org/datasets/","/datasets/Disasters":"https://docs.datacommons.org/datasets/","/api/rest/v2/getting_started":"https://docs.datacommons.org/api/rest/v2/","/courseware/data_literacy/course_materials/key_themes":"https://docs.datacommons.org/courseware/data_literacy/key_themes.html","/courseware/data_literacy/course_materials/modules":"https://docs.datacommons.org/courseware/data_literacy/modules.html","/statistical_variables.html":"https://datacommons.org/tools/statvar","/tutorials":"https://docs.datacommons.org/api/python/tutorials.html","/tutorials/index":"https://docs.datacommons.org/api/python/tutorials.html"} \ No newline at end of file diff --git a/resources.html b/resources.html new file mode 100644 index 000000000..93c1dabdb --- /dev/null +++ b/resources.html @@ -0,0 +1,531 @@ + + + + + Additional resources - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + + +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + + diff --git a/statistical_variables.html b/statistical_variables.html new file mode 100644 index 000000000..529b63210 --- /dev/null +++ b/statistical_variables.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/tutorials.html b/tutorials.html new file mode 100644 index 000000000..5ee309511 --- /dev/null +++ b/tutorials.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/tutorials/index.html b/tutorials/index.html new file mode 100644 index 000000000..5ee309511 --- /dev/null +++ b/tutorials/index.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + The content has moved. If you are not redirected automatically, please follow this link. + + diff --git a/what_is.html b/what_is.html new file mode 100644 index 000000000..fc0c12e85 --- /dev/null +++ b/what_is.html @@ -0,0 +1,592 @@ + + + + + What is Data Commons? - Docs - Data Commons + + + + + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
+
+ + + + + +

What is Data Commons?

+ + + +

A single source for publicly available statistical data

+ +

In keeping with Google’s mission to organize the world’s information and make it universally accessible and useful, Data Commons offers a unified view of large-scale, public, statistical data, created by organizations across the world. Data Commons enables researchers, consumers, journalists, students, public policy and other key decision-makers to get high-level analytical answers to data questions, at the click of a button, and in your own words.

+ +

Data Commons is not a repository of public datasets (such as Kaggle or Google Cloud BiqQuery Public Datasets). Instead, it is a single unified data source created by normalizing and aligning schemas and references to the same entities (such as cities, counties, organizations, etc.) across different datasets. Behind the scenes, Data Commons does the tedious work of finding data, understanding the data collection methodologies, cleaning the data, reconciling different formats and schemas, figuring out how to merge data about the same entity from different sources, and so on – saving organizations months of tedious, costly and error-prone work.

+ +

For example, if you wanted to get population stats, poverty and unemployment rates of a specific county, you don’t need to go to three different datasets; instead, you can get the data from a single data source, using one schema, and one API. Data Commons is also used by Google Search whenever it can provide the most relevant statistical results to a query. For example, the top Google Search result for the query “what is the life expectancy of Vietnam” returns a Data Commons timeline graph and a link to the Place page for Vietnam:

+ +

Google Search query result

+ +

A standards-based knowledge graph, schema, and APIs

+ +

Data Commons needs to be able to stitch together data from disparate data sets in different formats and encodings, in a wide range of domains, from time series about demographics and employment, to hurricanes, to protein structures. To do so, it models the world as a knowledge graph consisting of nodes, or entities, with properties (attributes) and relationships between them forming directed edges between the nodes. The data model is based on the Schema.org framework, an open framework used by over 40M websites; its schema is an extension of Schema.org constructs, introducing both general constructs (such as intervals) and values for common properties.

+ +

The Data Commons Knowledge Graph browser allows you to peek into the structure of the graph, and the APIs allow you to directly query the parts of the graph (e.g. nodes, triples, etc.).

+ +

Importantly, numeric time series data are first-class entities, with “(statistical) variable” being an entity that represents a metric definition, and “observation” being an entity that represents the value of a variable at a specific time. The Statistical Variable Explorer allows you to browse existing variables, and the Visualization tools provide aggregated views of this data over time, geography, or 2-dimensional space. The APIs also allow you to directly query observations.

+ +

To learn more about the data model and key concepts, see Key concepts.

+ +

An open-source project and website platform

+ +

Data Commons is a community-based resource, where individuals and organizations can contribute data, code, documentation and educational materials. Source code, schemas, and documentation are publicly available at https://github.com/datacommonsorg.

+ +

Google has partnerships with the United Nations, the World Health Organization, One.org, TechSoup, and many other non-profit, academic, and governmental organizations across the world. We are always looking to expand data coverage and welcome contributions from data owners around the world.

+ +

In addition, Data Commons makes its data and visualizations accessible to any website through REST and Web components APIs.

+ +

Finally, Data Commons provides an open-source, customizable implementation, for organizations that want to host their own version of a Data Commons website, using their own data and user interfaces.

+ +

Key features

+ +

Here are just some of the unique features of Data Commons:

+ +
    +
  • Reliable data from official sources such as governmental agencies and NGOs
  • +
  • Out-of-the-box visualizations, such as timeline charts, scatter plots, and maps.
  • +
  • Natural-language query interface offers a Google Search-like experience, allowing users to answer high-level queries with low latency
  • +
  • Massive scale, with over 100 datasets and 250 billion data points
  • +
  • Support for interactive and programmatic querying, ad hoc and bulk data downloads.
  • +
  • Easily customizable website implementation that can be adapted for specific data needs
  • +
  • Integration with the Google Search stack
  • +
+ +

Learn more

+ +

For more background on why and how Data Commons was built, see the Data Commons Overview paper.

+ +
+
+

+ Page last updated: January 14, 2025 • + Send feedback about this page + +

+
+
+
+ + +
+ + + + + + + + +