人口普查编码问题

Census Goecoding Issue

我正在尝试做一个简单的地理编码操作,我过去已经做过很多次了。这个简单的代码不再有效,因为它 returns 这个输出。 {'States': [], 'Counties': [], '2020 年人口普查区块': [], 'Census Tracts': []}。什么可以解释这个?我以前 运行 多次使用过此代码,但我以前从未见过。

import censusgeocode as cg
census = cg.coordinates(x=40.81918, y=-83.29061)
census

x是经度,y是纬度。你需要像这样交换它们:

census = cg.coordinates(x=-83.29061, y=40.81918)

来自Geocoding Services Web Application Programming Interface (API)

x,y (searchtype = coordinates) – The longitude and latitude represented as decimal x/y values. Only returns geoLookup data. Can only be used with returntype = geographies.