Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Sheets places_in.md file #367

Merged
merged 9 commits into from
Nov 3, 2023

Conversation

donaldrgosselin
Copy link
Contributor

@donaldrgosselin donaldrgosselin commented Sep 27, 2023

image
image
image
image
image
image

@shifucun shifucun requested review from shifucun and beets September 27, 2023 23:14
Copy link
Contributor

@beets beets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify that the document looks good locally.

Also curious why there is a thick black and green border on the images.


**Formula**: `=DCPLACESIN(dcids, placeType)`
## Formula {#formula}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the formatting of these shortcuts (or what's in the brackets). here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified


## Assembling the information you will need to use this formula
This section contains examples of using the `=DCPLACESIN(*dcids*, *placeType*)` formula to return lists of child places from a list of parent [Place](https://datacommons.org/browser/Place) [DCIDs](https://docs.datacommons.org/glossary.html), such as [State](https://datacommons.org/browser/State), [Country](https://datacommons.org/browser/Country), and so.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify formatting of the formula. Since it's within ``, the formatting within doesn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified.


This endpoint also requires the argument `placeType`, specifying the type of the child places you desire in the response.
![alt_text](../../assets/images/sheets/sheets_counties_delaware.png "image_tooltip")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give a proper tooltip

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the tooltip since we're not using them elsewhere.


Before trying this method out, make sure to follow the setup directions in [the main section for Sheets docs](/api/sheets/index.html).
![alt_text](../../assets/images/sheets/sheets_districts_alaska_hawaii.png "image_tooltip")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give a proper tooltip

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the tooltip since we're not using them elsewhere.

Copy link
Contributor

@beets beets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also ensure that the function call is included in the screenshot (like it is currently). At this point I prefer the existing screenshots on https://docs.datacommons.org/api/sheets/places_in.html

api/sheets/places_in.md Show resolved Hide resolved

This endpoint requires the argument `dcids`. [DCIDs](/glossary.html) are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the parent places of interest.
### Example 1: Retrieve a List of Counties in Delaware
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add descriptions for these examples like the GETNAME page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bo said he would prefer creating videos for each example, although I do like the example descriptions in the GETNAME page. Please let me know what you decide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still have text descriptions, even if there are videos or images.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add them

Copy link
Contributor

@beets beets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update filenames in place (rather than adding new filenames)
comments from other PR's apply here too, such as removing the green border around images

@@ -1,58 +1,38 @@
---
layout: default
title: Places within a Place
title: Retrieving Child Nodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function only works with place nodes. Please update the title here and below to reflect that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to "Retrieving Places Contained Within Another Place"

nav_order: 2
parent: Google Sheets
grand_parent: API
---

# Retrieve places contained within another place
# Retrieving Child Nodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to "Retrieving Places Contained Within Another Place"

* Conformed file to get_name.md
* Added Returns section
* Added Error Returns section
* Replaced images with narrower versions
* Added steps to examples
* Updated Gemfiles

## Assembling the information you will need to use this formula
Lists of child places from a list of parent [Place](https://datacommons.org/browser/Place) [DCIDs](https://docs.datacommons.org/glossary.html), such as [State](https://datacommons.org/browser/State), [Country](https://datacommons.org/browser/Country), and so on. It only returns children with a place type that matches the <code>placeType</code> parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rephrase this - State and Country are place types (not place dcid's). I think you want to say something like this: returns a list of child places of the specified place dcids, of the specified place type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it as you suggested.

3. Retrieve the DCIDs for the congressional districts by enter `=DCPLACESIN(A1:A2, "CongressionalDistrict")` into cell C1.
4. Finally, retrieve the names of the congressional districts by entering `=DCGETNAMES(C1:C3)` into cell D1.

![alt_text](/assets/images/sheets/sheets_places_in_congressional_districts_ak_hi.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use a meaningful alt_text (here and below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@beets beets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the updates. a few comments below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cut the "fill place dcid's" sidebar from this image - it's confusing to see Alaska in there, but the cell geoId/0200 highlighted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cut the "fill place dcid's" sidebar from this image - it's confusing to see Delaware in there, but the cell for Kent County highlighted.


**Formula**: `=DCPLACESIN(dcids, placeType)`
## Formula {#formula}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Formula {#formula}
## Formula


* `dcids`: A list of (parent) `Place` nodes, identified by their DCIDs.
## Required Arguments {#required-arguments}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Required Arguments {#required-arguments}
## Required Arguments

@beets beets requested a review from juliawu November 2, 2023 23:37
@beets
Copy link
Contributor

beets commented Nov 2, 2023

Made a few updates, ptal

full size screenshot with current updates


### Example 1: Retrieve a list of the 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. Enter the Delaware DCID of “geoId/10”.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 55, we use bold instead of quotes to show what the user should enter. I personally prefer the bold, but we should probably standardize across examples (and the other pages.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. it's been hard to standardize across the PR's, and i can do a sweep after the first versions are in. i'll update these to bold for now though

@beets
Copy link
Contributor

beets commented Nov 3, 2023

thanks for the review! updated the formatting as we discussed offline

@beets beets merged commit fb51dd8 into datacommonsorg:master Nov 3, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants