You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With PR #127 to dynamically update layers most ACS updates will only need an update to the years supported (3 lines), i.e., for 2020;
def__init__(self, year="latest"):
self._cache=dict()
ifyear=="latest":
year=2020ifyearnotinlist(range(2017,2021)):
raiseNotImplementedError(
"The requested year ({}) is too early/late. ""Only 2017, 2018, 2019 or 2020 are supported.".format(year)
)
However, because ACS 2020 does not have it's own tiger MapService it's a special case and needs additional handling to redirect it to the 2020 census geographies. This could be in products, remote or tiger so it may merit discussion. My preference is remote where self.mapservice is assigned, e.g.,:
ifisinstance(key, tig.TigerConnection):
self.mapservice=keyelifisinstance(key, str):
ifkey=='tigerWMS_ACS2020':
# No unique layer use census 2020 geographiesself.mapservice=tig.TigerConnection(name='tigerWMS_Census2020')
else:
self.mapservice=tig.TigerConnection(name=key)
returnself
Open to more elegant solution than above, but should work.
The text was updated successfully, but these errors were encountered:
Only 2020 will be a special case. ACS 2021 and 2022 geographies are available and should work with the dynamic layer PR so just the years have to be updated once the data is available (5-year ACS 2021 is scheduled for December).
Confirmed - PR #127 works as intended for the recently released 5-year 2021 vintage:
def__init__(self, year="latest"):
self._cache=dict()
ifyear=="latest":
year=2021ifyearnotinlist(range(2017,2022)):
raiseNotImplementedError(
"The requested year ({}) is too early/late. ""Only 2017, 2018, 2019, 2020, or 2021 are supported.".format(year)
)
With PR #127 to dynamically update layers most ACS updates will only need an update to the years supported (3 lines), i.e., for 2020;
However, because ACS 2020 does not have it's own tiger MapService it's a special case and needs additional handling to redirect it to the 2020 census geographies. This could be in products, remote or tiger so it may merit discussion. My preference is remote where self.mapservice is assigned, e.g.,:
Open to more elegant solution than above, but should work.
The text was updated successfully, but these errors were encountered: