Data, Maps, Usability, and Performance

API canvas d3 data geo GeoJSON html5 image JavaScript json maps mysql PHP WordPress

List of Countries and Capitals

list of all countries and capitals

I have previously shared some frustrations with aggregating a good list of countries and capitals. The problem is that the word country is a bit arbitrary and used to represent everything from sovereign states, various dependencies, special sovereign lands, uninhabited islands, and other entities. Adding to this, we have self-declared sovereign states like Somaliland that are unrecognized by most organizations so it’s hard to tell how you want to define that and which capital city to use. Moreover, there are countries that claim the same capital city (Jerusalem), islands with rotating capitals (Tokelau), and large geographical areas with no capital (Antarctica). So, here is my take on aggregating a complete list of countries and capitals of the world.
Read more

Comparing Quantcast to Alexa

Quantcast versus Alexa

Alexa is often used to identify the most popular websites on the Internet in terms of traffic. However, they don’t provide actual traffic numbers while other websites like QuantCast have these estimates. There are many valid use cases to leverage these rankings but I would guess that beyond the first 10k to 50k results, it gets quite inaccurate. Both services collect this data differently and they both provide a top 1 million list so today I decided to compare these two data sets against each other and figure out their differences in website ranking.
Read more

Most Repinned Pinterest Pins by Website

pinterest api

I was playing with the Pinterest API today and I think it can be quite helpful in gathering some interesting data on websites and pins. One of the things you can do is list the most repinned photos for any domain over a certain time period. Since I have previously talked about the most popular websites on Pinterest, I now want to expand on that and list the most popular pins from the top Pinterest domains. RJmetrics recently did some analysis on most shared Pinterest websites so I will leverage that data for the 5 out of the top 20 domains on Pinterest. I will use the Get the most repinned Pins endpoint to get our results.

Most Repinned Pins for Most Popular Websites on Pinterest
Read more

Hacking the Google Trends API

google trends api

Since the Google search engine is dominating the internet search market, statistical data about search keywords can be very insightful. I was amazed when I first discovered Google Trends and I still think that it is a very powerful tool for marketers, researchers, website owners, and SEO experts. The tool has expanded quite a bit over the years and now you can do much more than just see the top 10 most popular keywords. Apart from viewing the latest hot searches and the most popular phrases over the last month, you can now see these top keyword trends in a cool visualization. If you select specific keywords, you can compare and chart up to 5 keywords over time and see the top and rising related searches. You can even filter by location, time, category, and type of search (web, image, news, shopping, or YouTube) or compare keywords by location or time range.

Adding to this, Google has added Top Charts which shows you most searched and trending keywords per category and you can filter or segment the data based on any time in the past. There is a ton that you can do with this data but isn’t it really annoying that there is no official Google Trends API? We do have the hot trends atom feed and that gives you 20 trends with approximate traffic numbers and related news items. This would be good for building a little widget but it leaves a lot to be desired in terms of serious keyword and market analysis. So, today, I will dig in, sniff some network traffic and figure out what kind of calls are made between the browser and Google servers to provide this trending keyword data programatically.
Read more

Histogram Generator with D3

Histogram Generator

Histograms are really powerful means of visualizing the distribution of data. I have previously created a histogram generator with jQplot, and today I wanted to do something similar with D3.js. My motivation for this came from finding D3 histogram functions and I wanted to see how they work. I also wanted to allow the user to specify the size of the graph, the data, labels for x and y axis, and the amount of bins.
Read more

Zoom into US Zip Codes in Leaflet Map

zipdecode on leaflet

It has been a while since I touched Leaflet and today I want to play around with mapping zip codes. I really liked Ben Fry’s zipdecode project and have seen other interesting implementations. But, I want to go beyond highlighting and actually zoom into the appropriate areas based on each number of the zip code. I think this would be an interesting take on zip decoding and I am going to implement it on a Leaflet map.
Read more