3

I am trying to test Twitter API and find trends in a country. How can I find the WOEID (WHERE ON EARTH IDENTIFIER) for a specific country? I tried looking on Google but could not find a list.

If there is any program in Python that provides WOEID that is fine as well.

TJ1
  • 7,578
  • 19
  • 76
  • 119

1 Answers1

8

The yweather package provides a way of doing this:

>>> import yweather
>>> client = yweather.Client()
>>> client.fetch_woeid('Australia')
'23424748'
Matthew Trevor
  • 14,354
  • 6
  • 37
  • 50
  • The only official pip package I found that gets woeid and works.. The link above is for v0.1. I found v0.1.1 ready and working - so download from the 'latest' url https://pypi.org/project/yweather/ – mork Nov 25 '18 at 15:54
  • package seems to be obsolete. Code don't working. `HTTP Error 502: Cannot find server.` – L F Nov 23 '20 at 15:06
  • @MatthewTrevor I've tried local and in colab, maybe those versions are not supported. – L F Nov 25 '20 at 00:37
  • 1
    @LuisFelipe my apologies, i thought you meant the pypi link. you're right, it has been deprecated: `As of Thursday, Jan. 3, 2019, the weather.yahooapis.com and query.yahooapis.com for Yahoo Weather API will be retired.` – Matthew Trevor Nov 25 '20 at 01:22