From 72cc344efceed745acbf86b2451114870e8b5b59 Mon Sep 17 00:00:00 2001 From: kmoscoe <165203920+kmoscoe@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:04:41 -0700 Subject: [PATCH] External links (#489) * troubleshooting API * Revert to gerund Though the style guide says to just use imperatives, "get started" just sounds weird. Also this is more consistent with "troubleshooting" * merge * make external links open in a new browser window * Merging * add disclaimer about BQ and remove references from elsewhere * revert changes --- api/rest/v2/sparql.md | 2 +- api/sheets/get_name.md | 2 +- api/sheets/get_property.md | 4 ++-- api/sheets/get_variable.md | 8 ++++---- api/sheets/places_in.md | 6 +++--- api/web_components/bar.md | 2 +- api/web_components/highlight.md | 2 +- api/web_components/index.md | 18 ++++++++---------- api/web_components/line.md | 2 +- api/web_components/map.md | 4 ++-- api/web_components/ranking.md | 2 +- api/web_components/scatter.md | 2 +- bigquery/index.md | 2 +- bigquery/query_join_your_data.md | 8 ++++---- bigquery/query_more_complex.md | 2 +- bigquery/query_places.md | 4 ++-- bigquery/query_property_places.md | 2 +- contributing/index.md | 18 +++++++++--------- .../course_materials/how_to_use.md | 2 +- .../data_literacy/course_materials/index.md | 2 +- courseware/data_literacy/faqs.md | 12 ++++++------ courseware/data_literacy/overview.md | 6 +++--- courseware/index.md | 4 ++-- 23 files changed, 57 insertions(+), 59 deletions(-) diff --git a/api/rest/v2/sparql.md b/api/rest/v2/sparql.md index 279eb4a59..3c086a35f 100644 --- a/api/rest/v2/sparql.md +++ b/api/rest/v2/sparql.md @@ -10,7 +10,7 @@ published: true # /v2/sparql This endpoint makes it possible to query the Data Commons knowledge graph using -[SPARQL](https://www.w3.org/TR/rdf-sparql-query/). SPARQL is a query language developed to retrieve data from [RDF graph](https://en.wikipedia.org/wiki/Resource_Description_Framework) content on the web. It leverages the graph structure innate in the data it +[SPARQL](https://www.w3.org/TR/rdf-sparql-query/){: target="_blank"}. SPARQL is a query language developed to retrieve data from [RDF graph](https://en.wikipedia.org/wiki/Resource_Description_Framework){: target="_blank"} 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. diff --git a/api/sheets/get_name.md b/api/sheets/get_name.md index c73adfc26..75bdf66f3 100644 --- a/api/sheets/get_name.md +++ b/api/sheets/get_name.md @@ -26,7 +26,7 @@ The `=DCGETNAME(dcids)` formula returns the names associated with given [DCIDs]( The names associated with given node DCIDs to a cell or a range of cells. -> **Note**: It’s best to minimize the number of function calls to `=DCGETNAME(dcids)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization). If your sheet contains thousands of separate calls to `=DCGETNAME(dcids)` you can expect it to be slow and return with errors. +> **Note**: It’s best to minimize the number of function calls to `=DCGETNAME(dcids)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization){: target="_blank"}. If your sheet contains thousands of separate calls to `=DCGETNAME(dcids)` you can expect it to be slow and return with errors. ## Examples diff --git a/api/sheets/get_property.md b/api/sheets/get_property.md index eb828c770..d473a51f3 100644 --- a/api/sheets/get_property.md +++ b/api/sheets/get_property.md @@ -22,7 +22,7 @@ The `=DCPROPERTY(dcids, property)` formula returns values associated with the gi ### Required Arguments * `dcids`: A list of [Place](/glossary.html#place) nodes, identified by their [DCIDs](/glossary.html#dcid). -* `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. If you aren’t sure what properties are available for a particular DCID, you can use the [Data Commons Knowledge Graph](https://datacommons.org/browser/) +* `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. If you aren’t sure what properties are available for a particular DCID, you can use the [Data Commons Knowledge Graph](https://datacommons.org/browser/){: target="_blank"}. to look up the DCID of interest and see what properties it is associated with. ## Returns @@ -30,7 +30,7 @@ The `=DCPROPERTY(dcids, property)` formula returns values associated with the gi The values of the property label for the specified DCIDs. > **Note**: -> It’s best to minimize the number of function calls to `=DCPROPERTY(dcids, property)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization). If your sheet contains thousands of separate calls to `=DCPROPERTY(dcids, property)` you can expect it to be slow and return with errors. +> It’s best to minimize the number of function calls to `=DCPROPERTY(dcids, property)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization){: target="_blank"}. If your sheet contains thousands of separate calls to `=DCPROPERTY(dcids, property)` you can expect it to be slow and return with errors. ## Examples diff --git a/api/sheets/get_variable.md b/api/sheets/get_variable.md index 9dcfb5d13..7596f3d3c 100644 --- a/api/sheets/get_variable.md +++ b/api/sheets/get_variable.md @@ -8,7 +8,7 @@ grand_parent: API # Getting the Value of a Statistical Variable at a Given Place and Time -The`=DCGET(dcids, variable, date)` formula returns the measurements of a specified [statistical variable](/glossary.html#variable) at a given place and optional time based on a list of parent [Place](https://datacommons.org/browser/Place) [DCIDs](/glossary.html#dcid). A complete list of variables can be found in the [Statistical Variable Explorer](https://datacommons.org/tools/statvar). +The`=DCGET(dcids, variable, date)` formula returns the measurements of a specified [statistical variable](/glossary.html#variable) at a given place and optional time based on a list of parent [Place](https://datacommons.org/browser/Place){: target="_blank"} [DCIDs](/glossary.html#dcid). A complete list of variables can be found in the [Statistical Variable Explorer](https://datacommons.org/tools/statvar){: target="_blank"}. > **Note**: Be sure to follow the instructions for [Installing and Enabling the Sheets Add-On](/api/sheets/) before using this formula. @@ -25,17 +25,17 @@ The`=DCGET(dcids, variable, date)` formula returns the measurements of a specifi ### 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](https://support.google.com/docs/answer/3092969?hl=en). +`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](https://support.google.com/docs/answer/3092969?hl=en){: target="_blank"}. ## Returns The value of the variable at those places on the specified date or on the latest available date, if no date is specified. -> **Note**: It’s best to minimize the number of function calls to `=DCGET(dcids, variable, date)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [per custom function call](https://developers.google.com/apps-script/guides/sheets/functions#optimization). If your sheet contains thousands of separate calls to `=DCGET(dcids, variable, date)` you can expect it to be slow and return with errors. +> **Note**: It’s best to minimize the number of function calls to `=DCGET(dcids, variable, date)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [per custom function call](https://developers.google.com/apps-script/guides/sheets/functions#optimization){: target="_blank"}. If your sheet contains thousands of separate calls to `=DCGET(dcids, variable, date)` you can expect it to be slow and return with errors. ## Examples -This section contains examples of using the `=DCGET(dcids, variable, date)` formula to returns lists of [statistical variable](/glossary.html#variable) such as "Count_Person" and "Median_Income_Person". A complete list of variables can be found in the [Statistical Variable Explorer](https://datacommons.org/tools/statvar). +This section contains examples of using the `=DCGET(dcids, variable, date)` formula to returns lists of [statistical variable](/glossary.html#variable) such as "Count_Person" and "Median_Income_Person". A complete list of variables can be found in the [Statistical Variable Explorer](https://datacommons.org/tools/statvar){: target="_blank"}. ### Example 1: Get the Total Population of Hawaii in 2017 diff --git a/api/sheets/places_in.md b/api/sheets/places_in.md index 5ae88582a..77aa09e58 100644 --- a/api/sheets/places_in.md +++ b/api/sheets/places_in.md @@ -8,7 +8,7 @@ grand_parent: API # Retrieving Places Contained Within Another Place -The `=DCPLACESIN(dcids, placeType)` formula returns lists of child places from a list of parent [Place](https://datacommons.org/browser/Place) [DCIDs](https://docs.datacommons.org/glossary.html#dcid). It only returns children with a place type that matches the `placeType` parameter, such as [State](https://datacommons.org/browser/State), [Country](https://datacommons.org/browser/Country), and so on. +The `=DCPLACESIN(dcids, placeType)` formula returns lists of child places from a list of parent [Place](https://datacommons.org/browser/Place){: target="_blank"} [DCIDs](/glossary.html#dcid). It only returns children with a place type that matches the `placeType` parameter, such as [State](https://datacommons.org/browser/State){: target="_blank"}, [Country](https://datacommons.org/browser/Country){: target="_blank"}, and so on. > **Note**: Be sure to follow the instructions for [Installing and Enabling the Sheets Add-On](/api/sheets/) before using this formula. @@ -25,10 +25,10 @@ The `=DCPLACESIN(dcids, placeType)` formula returns lists of child places from a ## Returns -Lists of child places from a list of parent [Place](https://datacommons.org/browser/Place) [DCIDs](https://docs.datacommons.org/glossary.html#dcid). Returns a list of child places of the specified place DCIDs, of the specified place type. +Lists of child places from a list of parent [Place](https://datacommons.org/browser/Place){: target="_blank"} [DCIDs](/glossary.html#dcid). Returns a list of child places of the specified place DCIDs, of the specified place type. > **Note**: -> It’s best to minimize the number of function calls to `=DCPLACESIN(dcids, placeType)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization). If your sheet contains many separate calls to `=DCPLACESIN(dcids, placeType)` you can expect it to be slow and return with errors. +> It’s best to minimize the number of function calls to `=DCPLACESIN(dcids, placeType)` by using a single call to get the names for a column of nodes. This is because a spreadsheet will make one call to a Google server [*per custom function call*](https://developers.google.com/apps-script/guides/sheets/functions#optimization){: target="_blank"}. If your sheet contains many separate calls to `=DCPLACESIN(dcids, placeType)` you can expect it to be slow and return with errors. ## Examples diff --git a/api/web_components/bar.md b/api/web_components/bar.md index 420a6627c..630f9d51f 100644 --- a/api/web_components/bar.md +++ b/api/web_components/bar.md @@ -84,7 +84,7 @@ permalink: /api/web_components/bar | apiRoot | string | Domain to make data fetch API calls from. Used primarily for fetching data from custom DCs.

Default: `https://datacommons.org`. | | defaultVariableName | string | To 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". | | placeNameProp | string | Optionally specify the property to use to get the place names. | -| showExploreMore | boolean | Include to show "Explore more" link in the footer, which takes the user to Datacommons.org's [visualization tools](https://datacommons.org/tools/visualization). | +| showExploreMore | boolean | Include to show "Explore more" link in the footer, which takes the user to Datacommons.org's [visualization tools](https://datacommons.org/tools/visualization){: target="_blank"}. | | variableNameRegex | string | Optionally 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". | | yAxisMargin | number | Set size (in px) of y-axis' margin to fit the axis label text. Default: 60px. | {: .doc-table } diff --git a/api/web_components/highlight.md b/api/web_components/highlight.md index f3c43cff0..3a87e6570 100644 --- a/api/web_components/highlight.md +++ b/api/web_components/highlight.md @@ -48,7 +48,7 @@ variable value from a specific variable about a single place. | Name | Type | Description | | ---- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| date | string | Specific 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](https://datacommons.org/tools/statvar)

Default: Most recent data available. | +| date | string | Specific 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](https://datacommons.org/tools/statvar){: target="_blank"}

Default: Most recent data available. | | unit | string | Unit the variable is measured in. | {: .doc-table } diff --git a/api/web_components/index.md b/api/web_components/index.md index eeca223a0..47df117fb 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -32,7 +32,7 @@ visualizations in your web application. Include `datacommons.js` in your html's `...` tag. Then use Data Commons -[web component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) +[web component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components){: target="_blank"} tags (e.g. `datacommons-line`) to add embedded data visualizations. For example, to embed a line chart: @@ -53,7 +53,7 @@ For example, to embed a line chart: ``` See a live version of this example you can play around with in -[Playground](https://lit.dev/playground/#gist=c0c88276739f4f6061807cc943937a14) +[Playground](https://lit.dev/playground/#gist=c0c88276739f4f6061807cc943937a14){: target="_blank"} ([source](/assets/examples/web-components/line-chart.html)). ## Components @@ -70,9 +70,9 @@ See a live version of this example you can play around with in ## Code Playground Examples -- [Static page with all chart types playground](https://lit.dev/playground/#gist=822ce6018bb41113c866d703760c1def) +- [Static page with all chart types playground](https://lit.dev/playground/#gist=822ce6018bb41113c866d703760c1def){: target="_blank"} ([source](/assets/examples/web-components/all-charts.html)) -- [Dynamically updating charts playground](https://lit.dev/playground/#gist=9e3ac88e162248f849dd276ff5895ad0) +- [Dynamically updating charts playground](https://lit.dev/playground/#gist=9e3ac88e162248f849dd276ff5895ad0){: target="_blank"} ([source](/assets/examples/web-components/dynamic-map.html)) ## Variables and places @@ -84,12 +84,10 @@ places. Variables and places are identified by To look up a DCID for an entity or variable, see the different methods described in [this page](/data_model.html#find-dcid). -To find places available for a statistical variable, see [this page](/data_mode.html#find-places). - ## Styling Custom styles are supported through -[CSS shadow parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part). +[CSS shadow parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part){: target="_blank"}.