From b96941fc0800be6bd2e7301046dc214adf5f3342 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Wed, 24 Jul 2024 15:20:16 -0700 Subject: [PATCH 01/22] troubleshooting API --- api/rest/v2/troubleshooting.md | 95 ++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 api/rest/v2/troubleshooting.md diff --git a/api/rest/v2/troubleshooting.md b/api/rest/v2/troubleshooting.md new file mode 100644 index 000000000..c4d9bff0d --- /dev/null +++ b/api/rest/v2/troubleshooting.md @@ -0,0 +1,95 @@ +--- +layout: default +title: Troubleshooting +nav_order: 6 +parent: REST (v2) +grand_parent: API +published: true +--- + +{:.no_toc} +# Troubleshoot common error responses + +* TOC +{:toc} + +## "Method does not exist" + +```json +{ + "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. + +## Missing API key + +```json +{ + "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" + } + ] +} +``` + +This is seen when your request is missing an API key. Please [request your own API key](/api/index.html#get-key). + + +## "Invalid request URI" + +```json +{ + "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 + +```json +{} +``` + +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. + +## Marshaling errors + +```json +{ + "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 and ensure all required parameters are sent in the request. \ No newline at end of file From b6f53cf097c7cd0012b91eaf502c8125a824a397 Mon Sep 17 00:00:00 2001 From: kmoscoe <165203920+kmoscoe@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:03:16 -0700 Subject: [PATCH 02/22] Revert to gerund Though the style guide says to just use imperatives, "get started" just sounds weird. Also this is more consistent with "troubleshooting" --- custom_dc/quickstart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_dc/quickstart.md b/custom_dc/quickstart.md index 5027271d7..ac05585b2 100644 --- a/custom_dc/quickstart.md +++ b/custom_dc/quickstart.md @@ -1,12 +1,12 @@ --- layout: default -title: Get started +title: Getting started nav_order: 2 parent: Build your own Data Commons --- {:.no_toc} -# Get started +# Getting started This page shows you how to run a local custom Data Commons instance inside a Docker container 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/](https://github.com/datacommonsorg/). From fa8d2185fc8634b33dfed4608758d3eaca9d5a09 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 22 Aug 2024 10:05:41 -0700 Subject: [PATCH 03/22] repoint sections on finding DCs --- api/web_components/index.md | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/api/web_components/index.md b/api/web_components/index.md index 77183f37b..ad96faad5 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -82,35 +82,9 @@ places. Variables and places are identified by [Data Commons Identifiers](/glossary.html#dcid), or [DCID](/glossary.html#dcid)s. -To find the [DCID](/glossary.html#dcid) of a place or variable: +To look up a DCID for an entity or variable, see the different methods described in [this page](/data_model.html#find-dcid). -1. Browse all variables with the - [Data Commons Statistical Variable Explorer](https://datacommons.org/tools/statvar). - -2. Search for places and variables with the - [Data Commons Search](https://datacommons.org/search) page. - -3. Use the [Data Commons Knowledge Graph](https://datacommons.org/browser) to - understand the relationship between entities. - -### Finding DCIDs Examples - -#### Example #1: Finding places available for a variable - -Inspecting -[Health / Health Insurance (Household) / No Health Insurance / Households Without Health Insurance](https://datacommons.org/tools/statvar#sv=Count_Household_NoHealthInsurance) -shows us that the statistical variable `Count_Household_NoHealthInsurance` is -available in the `United States` ([DCID](/glossary.html#dcid): `country/USA`) at -`State`, `County`, and `City` levels. - - - -#### Example #2: Finding place DCIDs - -The Knowledge Graph [country/USA](https://datacommons.org/browser/country/USA) -page shows the [DCID](/glossary.html#dcid)s for all US states and territories. - - +To find places available for a statistical variable, see [this page](/data_mode.html#find-places). ## Styling From 1f34fc6ffe3aa7865d846d3032d4f303db8f7f27 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 22 Aug 2024 10:09:49 -0700 Subject: [PATCH 04/22] add additional title --- data_model.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/data_model.md b/data_model.md index e993b8492..fc1308bd4 100644 --- a/data_model.md +++ b/data_model.md @@ -1,11 +1,11 @@ --- layout: default -title: Key concepts +title: Key concepts and common tasks nav_order: 3 --- {: .no_toc} -# Key concepts +# Key concepts and common tasks Whether you're just exploring the data on [datacommons.org](http://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, CSV download, or BigQuery, you should at least be familiar with [entities](#entity) and [statistical variables](#statistical-variable). You may wish to just skip directly to those sections. @@ -69,7 +69,7 @@ The type of a statistical variable is always the special sub-class [`Statistical A statistical variable can be simple, such as [`Total Population`](https://datacommons.org/browser/Count_Person), or more complex, such as [`Hispanic Female Population`](https://datacommons.org/tools/statvar#Count_Household_NoHealthInsurance=&sv=Count_Person_Female_HispanicOrLatino)`. Complex variables may be broken down into constituent parts, or not. -### Find places available for a statistical variable {#find-places} +### Task: Find places available for a statistical variable {#find-places} 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: @@ -95,7 +95,7 @@ DCIDs are not restricted to entities; statistical variables also have DCIDs. For ![Stat Var Explorer]({{site.url}}/assets/images/dc/concept7.png){: width="900"} -### Find a DCID for an entity or variable {#find-dcid} +### Task: Find a DCID for an entity or variable {#find-dcid} 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. @@ -144,7 +144,6 @@ Time series made up of many observations underlie the data available in the [Tim ![Timeline Explorer]({{site.url}}/assets/images/dc/concept11.png){: width="900"} - ## Provenance, Source, Dataset Every node and triple also have some important properties that indicate the origin of the data. From e204fbda9b06541f7576a7c06c8ae6a7214ee5f1 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Tue, 27 Aug 2024 09:32:45 -0700 Subject: [PATCH 05/22] merge --- api/web_components/index.md | 9 +++++++++ bigquery/index.md | 8 +++----- custom_dc/index.md | 1 - data_model.md | 2 +- how_to_use.md | 2 -- index.md | 4 +--- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/api/web_components/index.md b/api/web_components/index.md index 47df117fb..bc1840bde 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -54,6 +54,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){: target="_blank"} +[Playground](https://lit.dev/playground/#gist=c0c88276739f4f6061807cc943937a14){: target="_blank"} ([source](/assets/examples/web-components/line-chart.html)). ## Components @@ -70,8 +71,10 @@ 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){: target="_blank"} - [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){: target="_blank"} - [Dynamically updating charts playground](https://lit.dev/playground/#gist=9e3ac88e162248f849dd276ff5895ad0){: target="_blank"} ([source](/assets/examples/web-components/dynamic-map.html)) @@ -84,10 +87,13 @@ 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){: target="_blank"}. +[CSS shadow parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part){: target="_blank"}. -_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 by -[filling out this form](https://docs.google.com/forms/d/e/1FAIpQLSeVCR95YOZ56ABsPwdH1tPAjjIeVDtisLF-8oDYlOxYmNZ7LQ/viewform?usp=dialog){: target="_blank"}. Typical turnaround times are 24-48 hours. +_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 [Get API key](/api/index.html#get-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
+
-To use the key in requests, see the [Authentication](/api/rest/v2/getting_started.html#authentication) section. +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](/glossary.html#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](/data_model.html) document, specifically the following sections: - [Find a DCID for an entity or variable](/data_model.html#find-dcid) -- [Find places available for a statistical variable](/data_model.html#find-places) \ No newline at end of file +- [Find places available for a statistical variable](/data_model.html#find-places) + +{: #pagination} +## 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: + +```bash +curl --request GET \ + 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*' +``` + +will return something like: + +```json +{ + "data": { + "geoId/06": { + "arcs": < ... output truncated for brevity ...> + }, + }, + "nextToken": "SoME_veRy_L0ng_S+rIng" +} +``` + +To get the next set of entries, repeat the previous command and append the `nextToken`: + +```bash +curl --request GET \ + 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*&nextToken=SoME_veRy_L0ng_S+rIng' +``` + +Similarly for POST requests, this would look like: + +```bash +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_S+rIng" +}' +``` + +{: #relation-expressions} +## 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](/glossary.html#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](https://datacommons.org/browser/country/ARG){: target="_blank"}, the property `containedInPlace` exists in both in and out directions, illustrated in the following figure: + +![](/assets/images/rest/property_value_direction_example.png) + +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](/api/rest/v2/node.html#multiple-properties)). + +### Wildcard + +To retrieve all properties linked to a node, use the `*` wildcard, e.g. `<-*`. +See more in this [Node API example](/api/rest/v2/node.html#wildcard). + +### 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}` + +## Escape codes for 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 use the [corresponding percent codes](https://en.wikipedia.org/wiki/Percent-encoding){: target="_blank"} for reserved characters. \ No newline at end of file diff --git a/api/rest/v2/node.md b/api/rest/v2/node.md index dbec9e34c..da1bfa121 100644 --- a/api/rest/v2/node.md +++ b/api/rest/v2/node.md @@ -62,7 +62,7 @@ JSON data: | Name | Type | Description | | ----------------------------------------------------- | ------ | -----------------------| -| key
Required | string | Your API key. See the section on [authentication](/api/rest/v2/getting_started.html#authentication) details. | +| key
Required | string | Your API key. See the section on [authentication](/api/rest/v2/index.html#authentication) for details. | | nodes
Required | list of strings | List of the [DCIDs](/glossary.html#dcid) of the nodes to query. | | property
Required | string | Property to query, represented with symbols including arrow notation. For more details, see [relation expressions](/api/rest/v2/#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. | @@ -99,7 +99,7 @@ The response looks like: | Name | Type | Description | | --------- | ------ | ---------------------------------------------------------------------------- | | data | object | Data of the property label and value information, keyed by the queried nodes | -| nextToken | string | A token used to query [next page of data](/api/rest/v2/getting_started.html#pagination) | +| nextToken | string | A token used to query [next page of data](/api/rest/v2/index.html#pagination) | {: .doc-table} ## Examples diff --git a/api/rest/v2/observation.md b/api/rest/v2/observation.md index 84ae7fc23..65b16f2ba 100644 --- a/api/rest/v2/observation.md +++ b/api/rest/v2/observation.md @@ -62,7 +62,7 @@ JSON data: | Name | Type | Description | |-------------------------------------------------------|--------|-----------------------------------------------------------------| -| key
Required | string | Your API key. See the section on [authentication](/api/rest/v2/getting_started.html#authentication) for details. | +| key
Required | string | Your API key. See the section on [authentication](/api/rest/v2/index.html#authentication) for details. | | date
Required | string | See [below](#date-string) for allowable values. | | variable.dcids
Required| list of strings | List of [DCIDs](/glossary.html#dcid) for the statistical variable to be queried. | | entity.dcids | list of strings | Comma-separated list of [DCIDs](/glossary.html#dcid) of entities to query. One of `entity.dcids` or `entity.expression` is required. Multiple `entity.dcids` parameters are allowed. | diff --git a/api/rest/v2/resolve.md b/api/rest/v2/resolve.md index c1fe8a034..4a421586b 100644 --- a/api/rest/v2/resolve.md +++ b/api/rest/v2/resolve.md @@ -73,7 +73,7 @@ JSON data: | Name | Type | Description | |---------------|-------|----------------| -| key
Required | string | Your API key. See the [section on authentication](/api/rest/v2/index.html#authentication) for a demo key, as well as instructions on how to get your own key. | +| key
Required | string | Your API key. See the [section on authentication](/api/rest/v2/index.html#authentication) for details. | | nodes
Required | list of strings | Comma-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 | string | [Relation expression](/api/rest/v2/#relation-expressions) that represents the relation of the given nodes to the queried entities. Note that this should always end with `->dcid` | diff --git a/api/rest/v2/sparql.md b/api/rest/v2/sparql.md index 3c086a35f..633e7b01b 100644 --- a/api/rest/v2/sparql.md +++ b/api/rest/v2/sparql.md @@ -38,7 +38,7 @@ JSON data: { "query": "SPARQL_QUERY" } | Name | Type | Description | | --------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| key
Required | string | Your API key. See the the section on [authentication](/api/rest/v2/getting_started.html#authentication) for instructions on how to get a key. | +| key
Required | string | Your API key. See the the section on [authentication](/api/rest/v2/index.html#authentication) for details. | | query
Required | string | A 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. | {: .doc-table } From 5986303acab6b68294b9450ffe86d4ab33ccdf9b Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 5 Sep 2024 10:43:59 -0700 Subject: [PATCH 07/22] add custom DC info: --- api/index.md | 2 +- api/rest/v1/getting_started.md | 3 +-- custom_dc/quickstart.md | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/index.md b/api/index.md index bb4a7e979..657f8b12b 100644 --- a/api/index.md +++ b/api/index.md @@ -55,7 +55,7 @@ A key is currently not required for the following, although this may change in t ### Obtain an API key -Data Commons API keys are managed by Apigee. To obtain an API key, go to https://apikeys.datacommons.org and request a key for the hostname(s) listed above. +Data Commons API keys are managed by Apigee. To obtain an API key, go to [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} and request a key for the hostname(s) listed above. You will need separate keys for Data Commons and DataGemma. To use the key in requests, see the relevant documentation: - For REST V2 APIs, see the section on [Authentication](/api/rest/v2/index.html#authentication). diff --git a/api/rest/v1/getting_started.md b/api/rest/v1/getting_started.md index 0a157dc23..41169ea7d 100644 --- a/api/rest/v1/getting_started.md +++ b/api/rest/v1/getting_started.md @@ -157,8 +157,7 @@ We've provided a trial API key for general public use. This key will let you try `AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI` -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 one by -[filling out this form](https://docs.google.com/forms/d/e/1FAIpQLSeVCR95YOZ56ABsPwdH1tPAjjIeVDtisLF-8oDYlOxYmNZ7LQ/viewform) and selecting "API access" to request an official key without any quota limits. We'll be happy to hear from you! +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 Data Commons Apigee portal at https://apikeys.datacommons.org and request a key for `api.datacommons.org`. ### Pagination {: #pagination} diff --git a/custom_dc/quickstart.md b/custom_dc/quickstart.md index 7023513fc..82c984f1b 100644 --- a/custom_dc/quickstart.md +++ b/custom_dc/quickstart.md @@ -37,11 +37,14 @@ The "services" Docker container consists of the following Data Commons component - If you are developing on Windows, install [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install){: target="_blank"} (any distribution will do, but we recommend the default, Ubuntu), and enable [WSL 2 integration with Docker](https://docs.docker.com/desktop/wsl/){: target="_blank"}. - Install [Docker Desktop/Engine](https://docs.docker.com/engine/install/){: target="_blank"}. - Install [Git](https://git-scm.com/){: target="_blank"}. -- Get an API key to authorize requests from your site to the base Data Commons, by [filling out this form](https://docs.google.com/forms/d/e/1FAIpQLSeVCR95YOZ56ABsPwdH1tPAjjIeVDtisLF-8oDYlOxYmNZ7LQ/viewform?usp=dialog){: target="_blank"}. Typical turnaround times are 24-48 hours. - Optional: Get a [Github](http://github.com){: target="_blank"} account, if you would like to browse the Data Commons source repos using your browser. ## One-time setup steps {#setup} +### 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 Apigee. To obtain an API key, go to the Data Commons Apigee portal at [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} and request a key for the `api.datacommons.org` domain. + ### Enable Google Cloud APIs and get a Maps API key {#maps-key} 1. Go to [https://console.cloud.google.com/apis/dashboard](https://console.cloud.google.com/apis/dashboard){: target="_blank"} for your project. From fdc49ffb631fb9479ec7270e4de64c50207d9ef5 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 5 Sep 2024 10:52:16 -0700 Subject: [PATCH 08/22] update troubleshooting page --- api/rest/v2/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/rest/v2/troubleshooting.md b/api/rest/v2/troubleshooting.md index cdf369017..78180a310 100644 --- a/api/rest/v2/troubleshooting.md +++ b/api/rest/v2/troubleshooting.md @@ -29,7 +29,7 @@ published: true } ``` -This is seen when your request is missing an API key. Please [request your own API key](/api/rest/v2/index.html#get-key). +This is seen when your request is missing an API key. Please [request your own API key](/api/index.html#get-key). ## Empty response From 23f41dc5f3e30ec9a127a51ff7f3b860f5d4c1aa Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 5 Sep 2024 11:05:56 -0700 Subject: [PATCH 09/22] try to fix nav order --- api/index.md | 10 ++-- api/pandas/index.md | 4 +- api/python/index.md | 2 +- api/rest/v2/index.md | 102 ++++++++++++++++++------------------ api/sheets/index.md | 2 +- api/web_components/index.md | 2 +- 6 files changed, 61 insertions(+), 61 deletions(-) diff --git a/api/index.md b/api/index.md index 657f8b12b..76c6d4be3 100644 --- a/api/index.md +++ b/api/index.md @@ -1,7 +1,7 @@ --- layout: default title: API -nav_order: 20 +nav_order: 0 has_children: true --- @@ -39,13 +39,13 @@ In addition, Data Commons provides additional tools for accessing its data that - [Google Sheets](sheets/index.md): provides several custom functions that populate spreadsheets with data from the Data Commons knowledge graph - [Web Components](web_components/index.md): provides JavaScript APIs and HTML templates that allow you to embed Data Commons data and visualizations into web pages -{: #get-key} -## API keys + +## API keys {: #get-key} A key is required by some APIs to authenticate and authorize requests. - All REST [V2](rest/v2/index.md) and [V1](rest/v1/index.md) 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`. -- all DataGemma APIs . These requests are served by endpoints at `datagemma.datacommons.org`. +- All DataGemma APIs . These requests are served by endpoints at `datagemma.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 DataGemma @@ -53,7 +53,7 @@ A key is currently not required for the following, although this may change in t - Google Sheets - Web Components -### Obtain an API key +### Obtain an API key Data Commons API keys are managed by Apigee. To obtain an API key, go to [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} and request a key for the hostname(s) listed above. You will need separate keys for Data Commons and DataGemma. diff --git a/api/pandas/index.md b/api/pandas/index.md index 64b38587c..c6434b7e7 100644 --- a/api/pandas/index.md +++ b/api/pandas/index.md @@ -1,7 +1,7 @@ --- layout: default title: Pandas -nav_order: 30 +nav_order: 50 parent: API has_children: true --- @@ -27,7 +27,7 @@ Before proceeding, make sure you have followed the setup instructions below. ```bash $ pip install datacommons_pandas ``` -You are ready to go! You can view our [tutorials](tutorials.md) on how to use the +You are ready to go! You can view our [tutorials](/api/python/tutorials.html) on how to use the API to perform certain tasks using [Google Colab](https://colab.sandbox.google.com/){: target="_blank"}, or refer to pages in the navigation bar for detailed information about all the methods available. ## Run Python interactively diff --git a/api/python/index.md b/api/python/index.md index a34833a63..3513d93c2 100644 --- a/api/python/index.md +++ b/api/python/index.md @@ -1,7 +1,7 @@ --- layout: default title: Python -nav_order: 20 +nav_order: 40 parent: API has_children: true --- diff --git a/api/rest/v2/index.md b/api/rest/v2/index.md index 359bec026..bdf4e1c68 100644 --- a/api/rest/v2/index.md +++ b/api/rest/v2/index.md @@ -1,7 +1,7 @@ --- layout: default title: REST (v2) -nav_order: 0 +nav_order: 10 parent: API has_children: true published: true @@ -99,7 +99,7 @@ We provide a trial API key for general public use. This key will let you try the `AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI` -_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 [Get API key](/api/index.html#get-key) for information. +_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](/api/index.html#get-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. @@ -140,54 +140,6 @@ Many requests require the [DCID](/glossary.html#dcid) of the entity or variable - [Find a DCID for an entity or variable](/data_model.html#find-dcid) - [Find places available for a statistical variable](/data_model.html#find-places) -{: #pagination} -## 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: - -```bash -curl --request GET \ - 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*' -``` - -will return something like: - -```json -{ - "data": { - "geoId/06": { - "arcs": < ... output truncated for brevity ...> - }, - }, - "nextToken": "SoME_veRy_L0ng_S+rIng" -} -``` - -To get the next set of entries, repeat the previous command and append the `nextToken`: - -```bash -curl --request GET \ - 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*&nextToken=SoME_veRy_L0ng_S+rIng' -``` - -Similarly for POST requests, this would look like: - -```bash -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_S+rIng" -}' -``` - {: #relation-expressions} ## Relation expressions @@ -250,4 +202,52 @@ To illustrate again using the Argentina example: ## Escape codes for 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 use the [corresponding percent codes](https://en.wikipedia.org/wiki/Percent-encoding){: target="_blank"} for reserved characters. \ No newline at end of file +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 use the [corresponding percent codes](https://en.wikipedia.org/wiki/Percent-encoding){: target="_blank"} for reserved characters. + +{: #pagination} +## 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: + +```bash +curl --request GET \ + 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*' +``` + +will return something like: + +```json +{ + "data": { + "geoId/06": { + "arcs": < ... output truncated for brevity ...> + }, + }, + "nextToken": "SoME_veRy_L0ng_S+rIng" +} +``` + +To get the next set of entries, repeat the previous command and append the `nextToken`: + +```bash +curl --request GET \ + 'https://api.datacommons.org/v2/node?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&nodes=geoId/06&property=<-*&nextToken=SoME_veRy_L0ng_S+rIng' +``` + +Similarly for POST requests, this would look like: + +```bash +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_S+rIng" +}' +``` \ No newline at end of file diff --git a/api/sheets/index.md b/api/sheets/index.md index 3829e7729..a5f0f3641 100644 --- a/api/sheets/index.md +++ b/api/sheets/index.md @@ -1,7 +1,7 @@ --- layout: default title: Google Sheets -nav_order: 0 +nav_order: 20 parent: API has_children: true --- diff --git a/api/web_components/index.md b/api/web_components/index.md index bc1840bde..028a85c5e 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -2,7 +2,7 @@ layout: default title: Web Components parent: API -nav_order: 20 +nav_order: 30 has_children: true published: true --- From e76d9bb3ca3a06f221def69966844ad7ef9f0145 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Thu, 5 Sep 2024 13:06:20 -0700 Subject: [PATCH 10/22] fix up mistakes from earlier merge --- api/web_components/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/api/web_components/index.md b/api/web_components/index.md index 028a85c5e..8397aeea0 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -54,7 +54,6 @@ 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){: target="_blank"} -[Playground](https://lit.dev/playground/#gist=c0c88276739f4f6061807cc943937a14){: target="_blank"} ([source](/assets/examples/web-components/line-chart.html)). ## Components @@ -71,7 +70,6 @@ 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){: target="_blank"} - [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){: target="_blank"} @@ -93,7 +91,6 @@ To find places available for a statistical variable, see [this page](/data_mode. Custom styles are supported through [CSS shadow parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part){: target="_blank"}. -[CSS shadow parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part){: target="_blank"}. -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 Data Commons Apigee portal at https://apikeys.datacommons.org and request a key for `api.datacommons.org`. +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 {: #pagination} diff --git a/custom_dc/quickstart.md b/custom_dc/quickstart.md index 82c984f1b..d2e76b510 100644 --- a/custom_dc/quickstart.md +++ b/custom_dc/quickstart.md @@ -43,7 +43,7 @@ The "services" Docker container consists of the following Data Commons component ### 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 Apigee. To obtain an API key, go to the Data Commons Apigee portal at [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} and request a key for the `api.datacommons.org` domain. +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](https://apikeys.datacommons.org){: target="_blank"} and request a key for the `api.datacommons.org` domain. ### Enable Google Cloud APIs and get a Maps API key {#maps-key} From ca6f1a5154ad81a914cfa15c89a2a91ec900454e Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Mon, 9 Sep 2024 10:49:13 -0700 Subject: [PATCH 15/22] remove links to DataGemma colab tutorials --- api/python/tutorials.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/api/python/tutorials.md b/api/python/tutorials.md index 85a859aa3..779a64f10 100644 --- a/api/python/tutorials.md +++ b/api/python/tutorials.md @@ -15,8 +15,6 @@ Example [Google Colab notebooks](https://colab.sandbox.google.com/notebooks/intro.ipynb) written in Python: -**Pandas** - - [Getting Started: Analyzing Census Data](https://colab.research.google.com/github/datacommonsorg/api-python/blob/master/notebooks/analyzing_census_data.ipynb){:target="_blank"} - [COVID-19 Feature Exploration Analysis (by Google Health)](https://colab.research.google.com/github/datacommonsorg/api-python/blob/master/notebooks/COVID_19_Feature_Exploration_Analysis_with_Data_Commons.ipynb){:target="_blank"} @@ -31,11 +29,4 @@ Python: - [Analyzing Superfund Sites with Data Commons](https://colab.sandbox.google.com/github/datacommonsorg/api-python/blob/master/notebooks/Analyzing_SuperfundSites_with_Data_Commons.ipynb){:target="_blank"} -- [Estimating CMIP6 Temperature Distributions](https://colab.sandbox.google.com/github/datacommonsorg/api-python/blob/master/notebooks/Estimating_(Temperature)_Distributions_With_DataCommons_.ipynb){:target="_blank"} - -{: #datagemma} -**DataGemma** - -- [Grounding LLM statistics facts using Retrieval Augmented Generation (RAG)](https://colab.sandbox.google.com/https://github.com/datacommonsorg/llm-tools/blob/main/notebooks/data_gemma_rag.ipynb) - -- [Grounding LLM statistics facts using Retrieval Interleaved Generation (RIG)](https://colab.sandbox.google.com/github.com/datacommonsorg/llm-tools/blob/main/notebooks/data_gemma_rig.ipynb) \ No newline at end of file +- [Estimating CMIP6 Temperature Distributions](https://colab.sandbox.google.com/github/datacommonsorg/api-python/blob/master/notebooks/Estimating_(Temperature)_Distributions_With_DataCommons_.ipynb){:target="_blank"} \ No newline at end of file From 5ff33b955d16e0f506d67fcbeb69586cd79aff06 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Mon, 9 Sep 2024 12:54:48 -0700 Subject: [PATCH 16/22] added link to DataGemma docs --- api/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/index.md b/api/index.md index 1696e2182..4208b21c6 100644 --- a/api/index.md +++ b/api/index.md @@ -45,22 +45,22 @@ In addition, Data Commons provides additional tools for accessing its data that A key is required by some APIs to authenticate and authorize requests. - All REST [V2](rest/v2/index.md) and [V1](rest/v1/index.md) 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 . These are served by endpoints at `datagemma.datacommons.org`. +- Data Commons [NL API requests](https://developers.google.com/gemma/docs/datagemma){: target="_blank"}. These are served by endpoints at `datagemma.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 DataGemma +- 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](https://apikeys.datacommons.org){: target="_blank"} and request a key for the hostname(s) listed above. You will need separate keys for Data Commons and DataGemma. +Data Commons API keys are managed by a self-service portal. To obtain an API key, go to [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} and request a key for the hostname(s) listed above. You will need separate keys for Data Commons and Data Commons NL (DataGemma). To use the key in requests, see the relevant documentation: - For REST V2 APIs, see the section on [Authentication](/api/rest/v2/index.html#authentication). - For REST V1 APIs, see the section on [Authentication](/api/rest/v2/getting_started.html#authentication). -- For DataGemma APIs, see the Python notebooks listed in [Tutorials](/api/python/tutorials.html#datagemma). +- For NL APIs (DataGemma), see the Colab notebooks in [https://github.com/datacommonsorg/llm-tools/tree/main/notebooks](https://github.com/datacommonsorg/llm-tools/tree/main/notebooks){: target="_blank"} From 20f0983b901818f37bcb159547de09758b24714b Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Mon, 9 Sep 2024 13:14:37 -0700 Subject: [PATCH 17/22] fix devsite URL --- api/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/index.md b/api/index.md index 4208b21c6..9d1cf1256 100644 --- a/api/index.md +++ b/api/index.md @@ -45,7 +45,7 @@ In addition, Data Commons provides additional tools for accessing its data that A key is required by some APIs to authenticate and authorize requests. - All REST [V2](rest/v2/index.md) and [V1](rest/v1/index.md) 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](https://developers.google.com/gemma/docs/datagemma){: target="_blank"}. These are served by endpoints at `datagemma.datacommons.org`. +- Data Commons [NL API requests](https://ai.google.devgit/gemma/docs/datagemma){: target="_blank"}. These are served by endpoints at `datagemma.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 From bde484327ea5f3539781cd2a536d944f47280e81 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Tue, 10 Sep 2024 10:32:31 -0700 Subject: [PATCH 18/22] merge --- api/web_components/index.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/web_components/index.md b/api/web_components/index.md index b842e30c5..07b8956ac 100644 --- a/api/web_components/index.md +++ b/api/web_components/index.md @@ -54,7 +54,6 @@ 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){: target="_blank"} -[Playground](https://lit.dev/playground/#gist=c0c88276739f4f6061807cc943937a14){: target="_blank"} ([source](/assets/examples/web-components/line-chart.html)). ## Components @@ -71,10 +70,8 @@ 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){: target="_blank"} - [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){: target="_blank"} - [Dynamically updating charts playground](https://lit.dev/playground/#gist=9e3ac88e162248f849dd276ff5895ad0){: target="_blank"} ([source](/assets/examples/web-components/dynamic-map.html)) From 77d95b6fa612b1589f14004fc0b61ecd0b641e45 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Wed, 11 Sep 2024 10:45:01 -0700 Subject: [PATCH 19/22] updated hostname and naming --- api/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/index.md b/api/index.md index 9d1cf1256..863c41315 100644 --- a/api/index.md +++ b/api/index.md @@ -45,7 +45,7 @@ In addition, Data Commons provides additional tools for accessing its data that A key is required by some APIs to authenticate and authorize requests. - All REST [V2](rest/v2/index.md) and [V1](rest/v1/index.md) 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](https://ai.google.devgit/gemma/docs/datagemma){: target="_blank"}. These are served by endpoints at `datagemma.datacommons.org`. +- Data Commons NL API requests (used by the [DataGemma](https://ai.google.devgit/gemma/docs/datagemma){: target="_blank"} 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 @@ -60,7 +60,7 @@ Data Commons API keys are managed by a self-service portal. To obtain an API key To use the key in requests, see the relevant documentation: - For REST V2 APIs, see the section on [Authentication](/api/rest/v2/index.html#authentication). - For REST V1 APIs, see the section on [Authentication](/api/rest/v2/getting_started.html#authentication). -- For NL APIs (DataGemma), see the Colab notebooks in [https://github.com/datacommonsorg/llm-tools/tree/main/notebooks](https://github.com/datacommonsorg/llm-tools/tree/main/notebooks){: target="_blank"} +- For NL APIs in DataGemma, see the Colab notebooks in [https://github.com/datacommonsorg/llm-tools/tree/main/notebooks](https://github.com/datacommonsorg/llm-tools/tree/main/notebooks){: target="_blank"} From dba111f6c0689924b5bed74c7267844d303ed3bb Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Wed, 11 Sep 2024 11:43:00 -0700 Subject: [PATCH 20/22] reworded about separate keys --- api/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/index.md b/api/index.md index 863c41315..cde9e6cb7 100644 --- a/api/index.md +++ b/api/index.md @@ -55,7 +55,7 @@ A key is currently not required for the following, although this may change in t ### 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](https://apikeys.datacommons.org){: target="_blank"} and request a key for the hostname(s) listed above. You will need separate keys for Data Commons and Data Commons NL (DataGemma). +Data Commons API keys are managed by a self-service portal. To obtain an API key, go to [https://apikeys.datacommons.org](https://apikeys.datacommons.org){: target="_blank"} 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: - For REST V2 APIs, see the section on [Authentication](/api/rest/v2/index.html#authentication). From 8d2120136a72f2815b5100f1270933c9a2246159 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Wed, 11 Sep 2024 14:57:51 -0700 Subject: [PATCH 21/22] fix broken link --- contributing/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing/index.md b/contributing/index.md index 68ee3c970..c6f697899 100644 --- a/contributing/index.md +++ b/contributing/index.md @@ -33,7 +33,7 @@ Data Commons welcomes the development of new tools that make the data on Data Co ### Share analysis -Example analyses are available on the [tutorials]](/tutorials) page. To add your analysis on that page, open a PR in [the Data Commons documentation repo](https://github.com/datacommonsorg/docsite/pulls){: target="_blank"} with the title of the analysis and links to its Colab notebook and Github raw .ipynb file. +Example analyses are available on the [tutorials](/api/python/tutorials) page. To add your analysis on that page, open a PR in [the Data Commons documentation repo](https://github.com/datacommonsorg/docsite/pulls){: target="_blank"} with the title of the analysis and links to its Colab notebook and Github raw .ipynb file. ### Update documentation From 9a1ed13b5ef8efc248930f399fb6e5ad836b46b3 Mon Sep 17 00:00:00 2001 From: Kara Moscoe Date: Wed, 11 Sep 2024 15:04:21 -0700 Subject: [PATCH 22/22] fix broken link again --- contributing/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing/index.md b/contributing/index.md index c6f697899..1854e0362 100644 --- a/contributing/index.md +++ b/contributing/index.md @@ -33,7 +33,7 @@ Data Commons welcomes the development of new tools that make the data on Data Co ### Share analysis -Example analyses are available on the [tutorials](/api/python/tutorials) page. To add your analysis on that page, open a PR in [the Data Commons documentation repo](https://github.com/datacommonsorg/docsite/pulls){: target="_blank"} with the title of the analysis and links to its Colab notebook and Github raw .ipynb file. +Example analyses are available on the [tutorials](/api/python/tutorials.html) page. To add your analysis on that page, open a PR in [the Data Commons documentation repo](https://github.com/datacommonsorg/docsite/pulls){: target="_blank"} with the title of the analysis and links to its Colab notebook and Github raw .ipynb file. ### Update documentation