Skip to content

Commit

Permalink
update dcid glossary entry; small formatting fixes (#375)
Browse files Browse the repository at this point in the history
* update dcid entry; small formatting fixes

* readme tweak
  • Loading branch information
beets authored Nov 4, 2023
1 parent edd126b commit 13b23a5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The documentation site is built using Jekyll. To run this locally:

1. Install [Ruby](https://jekyllrb.com/docs/installation/)
1. Run `bundle update`
1. Run `bundle exec jekyll serve`
1. Run `bundle exec jekyll serve --incremental`

If you make changes to yml files, re-run `bundle exec jekyll serve`

Expand Down
13 changes: 7 additions & 6 deletions api/sheets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ has_children: true

The **Data Commons Sheets API** is a Google Sheets add-on that enables Google Sheets users 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](glossary.html#dcid)), and some custom functions for importing data into a spreadsheet.

> **Note:** For more information on DCIDs, refer to [Unique Identifiers (dcid)](/bigquery/unique_identifiers.html).
> **Note:**
> For more information on DCIDs, refer to the entry for [DCID in the Glossary](/glossary.html#dcid).
Also read our [step-by-step guides](tutorials/) for more examples.

Expand Down Expand Up @@ -66,15 +67,15 @@ Your browser does not support the video tag.

The preceding video performs the following steps in a blank Sheets document:

1. Returns a list of DCIDs in column A that represent counties in California, using the formula **<code>={"Place";DCPLACESIN(geoId/06", "County"}</code></strong>.
2. Uses the DCIDs in column A to fill in the names of each county in column B using the <strong><code>=DCGETNAME(A2)</code></strong> formula.
3. Retrieves the population of the county in column C using the DCIDs in column A using the <strong><code>=DCGET(A2, "Count_Person")</code></strong> formula.
1. Returns a list of DCIDs in column A that represent counties in California, using the formula <code><b>={"Place";DCPLACESIN(geoId/06", "County"}</b></code>.
2. Uses the DCIDs in column A to fill in the names of each county in column B using the <code><b>=DCGETNAME(A2)</b></code> formula.
3. Retrieves the population of the county in column C using the DCIDs in column A using the <code><b>=DCGET(A2, "Count_Person")</b></code> formula.
4. Highlights the entire sheet and click <strong>Data</strong> menu, <strong>Filter views</strong>, then <strong>Create new filter</strong>, or click the <strong>Create a filter</strong> icon on the toolbar.
5. Next, the filter is sorted by the <strong>Population</strong> column from <strong>A-Z</strong> and then from <strong>Z-A</strong>. The same sorts are then performed on the <strong>Name</strong> column.

To summarize, the steps for sorting Data Commons results with Google Sheets filter view feature are:

1. Populate the data columns with Data Commons Sheets API formulas.
2. Turn on filter views by clicking the **Data** menu**,** **Filter views**, then **Create new filter view**, or by clicking the **Create a filter** icon on the toolbar
3. Click the reverse triangle on each column to sort, excluding the header row.
2. Turn on filter views by clicking the **Data** menu, **Filter views**, then **Create new filter view**, or by clicking the **Create a filter** icon on the toolbar
3. Click the reverse triangle on each column to sort, excluding the header row.

8 changes: 4 additions & 4 deletions bigquery/unique_identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ nav_order: 2
parent: BigQuery
---

# Unique Identifiers (dcid)
# Unique Identifiers (DCID)

Every entity in Data Commons (DC) has a unique identifier, called ‘dcid’. So, for example, the dcid of California is ['geoId/06'](https://datacommons.org/place/geoId/06) and of India is ['country/IND'](https://datacommons.org/place/country/IND). dcids are not restricted to entities; statistical variables also have dcid, for example the dcid for the Gini Index of Economic Activity is ['GiniIndex_EconomicActivity'](https://datacommons.org/tools/statvar#GiniIndex_EconomicActivity).
Every entity in Data Commons (DC) has a unique identifier, called ‘DCID’. So, for example, the DCID of California is ['geoId/06'](https://datacommons.org/place/geoId/06) and of India is ['country/IND'](https://datacommons.org/place/country/IND). DCIDs are not restricted to entities; statistical variables also have DCID, for example the DCID for the Gini Index of Economic Activity is ['GiniIndex_EconomicActivity'](https://datacommons.org/tools/statvar#GiniIndex_EconomicActivity).

Answers to questions like ‘what are all the cities in California?’ is a set of dcid for the cities. To facilitate joining DC entities with non-DC data, Data Commons stores the various unique IDs (e.g., FIPS, Wikidata ID, Google Maps place ID, etc) used to reference places in different sources. See the sample queries about [Joining DC with your own data](/bigquery/query_join_your_data.html) for some examples.
Answers to questions like ‘what are all the cities in California?’ is a set of DCIDs for the cities. To facilitate joining DC entities with non-DC data, Data Commons stores the various unique IDs (e.g., FIPS, Wikidata ID, Google Maps place ID, etc) used to reference places in different sources. See the sample queries about [Joining DC with your own data](/bigquery/query_join_your_data.html) for some examples.

You can find the dcid for a place by searching for it in the [Place Explorer tool](https://datacommons.org/place).
You can find the DCID for a place by searching for it in the [Place Explorer tool](https://datacommons.org/place), and the DCID for statistical variables in the [Statistical Variable Explorer tool](https://datacommons.org/tools/statvar).
4 changes: 3 additions & 1 deletion glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ The date of measurement. Specified in ISO 8601 format. Examples include `2011` (
### DCID
{: #dcid}

Short for 'Data Commons Identifier', a DCID is a distinct identifier for a node in the knowledge graph. These can represent variables or entities. For example, Austin, Texas, has a DCID of `geoId/4805000`, while the plant species _Austrobaileya scandens_ has a DCID of `dc/bsmvthtq89217`.
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`](https://datacommons.org/browser/geoId/06) and of India is [`country/IND`](https://datacommons.org/browser/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`](https://datacommons.org/tools/statvar#GiniIndex_EconomicActivity).

You can find the DCID for a place by searching for it in the [Place Explorer tool](https://datacommons.org/place), and the DCID for statistical variables in the [Statistical Variable Explorer tool](https://datacommons.org/tools/statvar). All nodes have an entry in the [Graph Browser](https://datacommons.org/browser/).

### Entity
{: #entity}
Expand Down

0 comments on commit 13b23a5

Please sign in to comment.