@@ -73,25 +73,25 @@ def get_places_in(dcids, place_type):
7373
7474
7575def get_related_places (dcids , population_type , constraining_properties = {},
76- measured_prop = 'count' ,
76+ measured_property = 'count' ,
7777 stat_type = 'measured' , within_place = '' ,
7878 per_capita = False , same_place_type = False ):
7979 """ Returns :obj:`Place`s related to :code:`dcids` for the given constraints.
8080
8181 Args:
82- dcids (:obj:`iterable` of :obj:`str`): Dcids to get contained in places.
82+ dcids (:obj:`iterable` of :obj:`str`): Dcids to get related places.
8383 population_type (:obj:`str`): The type of statistical population.
8484 constraining_properties (:obj:`map` from :obj:`str` to :obj:`str`, optional):
85- A map from constraining property to the value that the
86- :obj:`StatisticalPopulation` should be constrained by.
85+ A map from constraining property to the value that the
86+ :obj:`StatisticalPopulation` should be constrained by.
8787 measured_property (:obj:`str`): The measured property.
8888 stat_type (:obj:`str`): The statistical type for the observation.
89- within_place(:obj:`str`): Optional, the place that all the related places
90- are contained in.
89+ within_place(:obj:`str`): Optional, the DCID of the place that all the
90+ related places are contained in.
9191 per_capita(:obj:`bool`): Optional, whether to take into account
92- `PerCapita` when compute the relatedness.
92+ `PerCapita` when compute the relatedness.
9393 same_place_type(:obj:`bool`): Optional, whether to require all the
94- related places under the same ancestor place.
94+ related places under the same place type .
9595
9696 Returns:
9797 The returned :obj:`Place`'s are formatted as a :obj:`dict` from a given
@@ -106,7 +106,7 @@ def get_related_places(dcids, population_type, constraining_properties={},
106106 `Santa Clara county <https://browser.datacommons.org/kg?dcid=geoId/06085>`
107107 Specifying the :code:`dcids` as a :obj:`list` result in the following.
108108
109- >>> get_places_in (["geoId/06"], "Person", {
109+ >>> get_related_places (["geoId/06"], "Person", {
110110 "age": "Years21To64",
111111 "gender": "Female"
112112 }, "count", "measured")
@@ -128,7 +128,7 @@ def get_related_places(dcids, population_type, constraining_properties={},
128128 'dcids' : dcids ,
129129 'populationType' : population_type ,
130130 'pvs' : pvs ,
131- 'measuredProperty' : measured_prop ,
131+ 'measuredProperty' : measured_property ,
132132 'statType' : '' , # TODO: Set to stat_type when having it in BT data.
133133 'withinPlace' : within_place ,
134134 'perCapita' : per_capita ,
0 commit comments