Skip to content

Commit a73d983

Browse files
authored
Fix comments, modify setup.py in preparation for release. (#114)
1 parent 7b9ee2f commit a73d983

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 1.06
4+
5+
**Date** - 01/29/2020
6+
7+
**Release Tag** - [v1.0.6](https://github.com/datacommonsorg/api-python/releases/tag/v1.0.6)
8+
9+
**Release Status** - Current head of branch [`master`](https://github.com/datacommonsorg/api-python/tree/master)
10+
11+
New features added to the Python Client API
12+
13+
- Add a new API for getting related places.
14+
15+
16+
317
## 1.0.5
418

519
**Date** - 01/27/2020

datacommons/places.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ def get_places_in(dcids, place_type):
7373

7474

7575
def 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,

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
2626
AUTHOR = 'datacommons.org'
2727
REQUIRES_PYTHON = '>=3.6.0'
28-
VERSION = '1.0.5'
28+
VERSION = '1.0.6'
2929

3030
REQUIRED = [
3131
'httplib2',

0 commit comments

Comments
 (0)