When it comes to viewing what's trending on twitter of some other location other than your own it's very hard. Also, you can't really see twitter trends below 30 or sometimes 10 even after changing the location.
Even though there were solutions there I still wanted to work with twitter API to provide everything for free and in better UI than everybody else and if you ask me at the end I did. Here's how?
The first thing I did was to get the approval of twitter developers API. Then I used the api to get the JSON data of all the countries and town in the world that are live. You can get upto 50 trends for any country and town.
Now, I created a search bar using AJAX + PHP because I wanted to filter and echo results based upon users input. You can try typing your country or town to see what's trending there right now. It works amazing even I like it even after developing it. Link is in twitter trends above you will find as there is a single link in this post.
I also added an Index page so that the user can see how many countries and towns we can track. Right now you can see twitter trends of 62 countries and 462 towns on global twitter trends. These are live and are updated every 30 minutes.
I created a HTML table to echo JSON data of each country and town but there was a problem it used to get unresponsive on small screens I handled this by changing table design when users uses it on small screens. You can see yourself. For this I used media tag in css.
I used w3css framework in order to make the entire design because I liked it. It was fast.
Logo is simply created on canva if you are interested in that too.
That's it using all the things above I created global twitter trends.
I would love to interact with anyone on dev.to so please ask question in comments.