@@ -73,25 +73,25 @@ def get_places_in(dcids, place_type):
73
73
74
74
75
75
def get_related_places (dcids , population_type , constraining_properties = {},
76
- measured_prop = 'count' ,
76
+ measured_property = 'count' ,
77
77
stat_type = 'measured' , within_place = '' ,
78
78
per_capita = False , same_place_type = False ):
79
79
""" Returns :obj:`Place`s related to :code:`dcids` for the given constraints.
80
80
81
81
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.
83
83
population_type (:obj:`str`): The type of statistical population.
84
84
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.
87
87
measured_property (:obj:`str`): The measured property.
88
88
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.
91
91
per_capita(:obj:`bool`): Optional, whether to take into account
92
- `PerCapita` when compute the relatedness.
92
+ `PerCapita` when compute the relatedness.
93
93
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 .
95
95
96
96
Returns:
97
97
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={},
106
106
`Santa Clara county <https://browser.datacommons.org/kg?dcid=geoId/06085>`
107
107
Specifying the :code:`dcids` as a :obj:`list` result in the following.
108
108
109
- >>> get_places_in (["geoId/06"], "Person", {
109
+ >>> get_related_places (["geoId/06"], "Person", {
110
110
"age": "Years21To64",
111
111
"gender": "Female"
112
112
}, "count", "measured")
@@ -128,7 +128,7 @@ def get_related_places(dcids, population_type, constraining_properties={},
128
128
'dcids' : dcids ,
129
129
'populationType' : population_type ,
130
130
'pvs' : pvs ,
131
- 'measuredProperty' : measured_prop ,
131
+ 'measuredProperty' : measured_property ,
132
132
'statType' : '' , # TODO: Set to stat_type when having it in BT data.
133
133
'withinPlace' : within_place ,
134
134
'perCapita' : per_capita ,
0 commit comments