Skip to content

Commit 8e353d6

Browse files
authored
Merge pull request #125 from ronnie-llamado/issue-124
Update year bounds to address API changes #124
2 parents f3a2e5b + 9812474 commit 8e353d6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cenpy/products.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,11 @@ class ACS(_Product):
678678
def __init__(self, year="latest"):
679679
self._cache = dict()
680680
if year == "latest":
681-
year = 2018
682-
if year < 2013:
681+
year = 2019
682+
if year not in list(range(2017,2020)):
683683
raise NotImplementedError(
684-
"The requested year {} is too early. "
685-
"Only 2013 and onwards is supported.".format(year)
684+
"The requested year ({}) is too early/late. "
685+
"Only 2017, 2018, or 2019 are supported.".format(year)
686686
)
687687
self._api = APIConnection("ACSDT{}Y{}".format(5, year))
688688
self._api.set_mapservice("tigerWMS_ACS{}".format(year))

cenpy/tests/test_functional_products.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_all():
9292

9393
# In[8]:
9494

95-
aus = dectest.from_msa("Austin, TX", level="block", variables=["^P003", "P001001"])
95+
aus = dectest.from_msa("Carson City, NV", level="block", variables=["^P003", "P001001"])
9696

9797
# In[9]:
9898

@@ -128,11 +128,11 @@ def test_all():
128128

129129
# # Additional Products
130130
#
131-
# This works for all of the ACSs that are supported by the Web Mapping Service. This means that `cenpy` supports this place-based API for the results from 2013 to 2017:
131+
# This works for all of the ACSs that are supported by the Web Mapping Service. This means that `cenpy` supports this place-based API for the results from 2017 to 2019:
132132

133133
# In[17]:
134134

135-
for year in range(2013, 2018):
135+
for year in range(2017, 2020):
136136
print(year)
137137
acs = products.ACS(year=year)
138138
acs.from_place("Tucson, AZ")

0 commit comments

Comments
 (0)