为什么一些地理标记的推文为空? (Twitter Streaming API)

时间:2010-10-01 03:12:28

标签: json api twitter streaming geolocation

我正在使用twitter流API来收集来自世界各地的推文位置。我收到了很多实时推文,但有些地理标签是空的。

我正在使用statuses/filter api以及以下网址:

http://stream.twitter.com:80/1/statuses/filter.json?locations=-180,-90,180,90

此url返回推文,某些geo json字段为null。还有其他人经历过这个吗?或者对于为什么有想法?

所述url返回的所有推文中只有大约60%返回有效(非空)lat lon位置。

感谢。

编辑: 如果你去网址(用Twitter帐户信息登录后),你可以看到我在说什么。

只需搜索'coordinates'或'geo'。

我注意到的是,有一个'geo_enabled'标签和'geo'标签。我想知道位置过滤器是否返回所有“geo_enabled”:真正的推文。如果你看起来足够努力,你可以找到一个“geo”:null标签。

对此有何想法?

1 个答案:

答案 0 :(得分:3)

Streaming API与geocoordinatesplace匹配。您可以在我从下面的流中提取的样本状态中看到place参数。

{
    "geo": null,
    "coordinates": null,
    "place": {
        "country_code": "US",
        "bounding_box": {
            "type": "Polygon",
            "coordinates": [[[ - 77.119759, 38.791645], [ - 76.909393, 38.791645], [ - 76.909393, 38.995548], [ - 77.119759, 38.995548]]]
            },
        "place_type": "city",
        "country": "United States",
        "attributes": {},
        "full_name": "Washington, DC",
        "name": "Washington",
        "url": "http:\/\/api.twitter.com\/1\/geo\/id\/01fbe706f872cb32.json",
        "id": "01fbe706f872cb32"
    },
    "user": {
    },
    "id": 73218362645282816
}