@@ -72,20 +72,20 @@ def get_places_in(dcids, place_type):
7272 return result
7373
7474
75- def get_related_places (dcids , population_type , constraining_properties = {},
76- measured_property = 'count' ,
77- stat_type = 'measured' , within_place = '' ,
78- per_capita = False , same_place_type = False ):
75+ def get_related_places (dcids , population_type , measured_property ,
76+ measurement_method , stat_type , constraining_properties = {},
77+ within_place = '' , per_capita = False , same_place_type = False ):
7978 """ Returns :obj:`Place`s related to :code:`dcids` for the given constraints.
8079
8180 Args:
8281 dcids (:obj:`iterable` of :obj:`str`): Dcids to get related places.
8382 population_type (:obj:`str`): The type of statistical population.
83+ measured_property (:obj:`str`): The measured property.
84+ measurement_method(:obj:`str`): The measurement method for the observation.
85+ stat_type (:obj:`str`): The statistical type for the observation.
8486 constraining_properties (:obj:`map` from :obj:`str` to :obj:`str`, optional):
8587 A map from constraining property to the value that the
8688 :obj:`StatisticalPopulation` should be constrained by.
87- measured_property (:obj:`str`): The measured property.
88- stat_type (:obj:`str`): The statistical type for the observation.
8989 within_place(:obj:`str`): Optional, the DCID of the place that all the
9090 related places are contained in.
9191 per_capita(:obj:`bool`): Optional, whether to take into account
@@ -109,7 +109,7 @@ def get_related_places(dcids, population_type, constraining_properties={},
109109 >>> get_related_places(["geoId/06"], "Person", {
110110 "age": "Years21To64",
111111 "gender": "Female"
112- }, "count", "measured ")
112+ }, "count", "CenusACS5yrSurvey", "measuredValue ")
113113 {
114114 'geoId/06085': [
115115 'geoId/06041',
@@ -130,6 +130,7 @@ def get_related_places(dcids, population_type, constraining_properties={},
130130 'pvs' : pvs ,
131131 'measuredProperty' : measured_property ,
132132 'statType' : '' , # TODO: Set to stat_type when having it in BT data.
133+ 'measurementMethod' : measurement_method ,
133134 'withinPlace' : within_place ,
134135 'perCapita' : per_capita ,
135136 'samePlaceType' : same_place_type ,
0 commit comments