Scraping Fiverr To Analyze Freelancing Market Trends
When deciding on a website for my web scraping project, I thought of Fiverr's captivating subway ads. Fiverr is a digital marketplace for buying and selling services or "gigs." In today's economy with many talented individuals seeking employment or supplemental income, Fiverr offers a means for people to advertise their services and make some money as a freelancer. The prices on Fiverr can range anywhere from five dollars (hence the name Fiverr) to whatever amount the seller believes appropriate for the gig.
Fiverr is not only a great resource for individuals seeking help on a project but can also serve as a valuable tool for startups looking to outsource some of their work. Such companies can use data from Fiverr to guide their research in deciding where to outsource their next big project. This aspect of Fiverr is the main focus of my web scraping project.
I used two Scrapy spiders to scrape Fiverr. My first spider was deployed to parse through the Category and Subcategory levels of the website. The individual gigs that I needed to parse were on the subcategory level page. However, I realized that Scrapy was unable to go deeper into the rabbit hole as it was unable to access the links to these ads. I decided to incorporate Selenium into my spider to get these links and write them to a CSV file. After parsing through eight categories and seventy-four subcategories, I was able to gather links to 16,403 gigs.
It was then the job of my second spider to scrape the data I needed from each of these links. This spider crawled in increments of 200 links at a time with a delay of 7-10 seconds between requests to avoid errors while crawling. The most common errors were the 301 Redirect error and the 403 Forbidden error which was a result of too many requests to the website in a short period of time. Because requests in a short time were disallowed, it took nearly seven days to scrape this data.
The information scraped included category, subcategory, gig title, and seller information such as name, star-rating, location, positive rating, languages spoken, and average response time. There was, however, a limitation to my data set since in the interest of time I decided to use the first five pages of each subcategory. The default order of gigs on a Fiverr subcategory page is by average customer rating. As I used gigs from the first five pages of each subcategory, the gigs I scraped are mostly those with higher ratings. Consequently, the star-rating and positive rating variables are of limited use in my analysis.
Exploration and Visualization
Preliminary exploration and analysis of the data revealed some interesting observations. The word cloud below shows common word patterns from gig titles. The heavy use of the word "will" implies confidence as sellers emphasize how they're not saying that they "may", or they "can", but rather they "will" provide the service you need. It's also not very surprising to see that English is the standard language spoken by sellers on Fiverr, with Spanish and Urdu coming in as distant second and third.
One of the things I wanted to learn in scraping Fiverr was where these gigs were being advertised.. I wanted to know if these sellers were located in the United States or were from all over the world. While the United States was the clear leader in the list of representation by country, I was surprised at how many gigs originated abroad. The table on the right shows that there is a significantly large number of observations in my data set from other countries such as Pakistan, India, and Bangladesh.
The bar-plot below shows the top fifteen countries overall represented in the data set. Beneath that we can see bar-plots of the average starting price and the average number of languages spoken by sellers advertising gigs from these countries. We can see the United States, Pakistan, India, and Bangladesh lead the list in terms of quantity. As far as starting price is concerned, India seems to be at the higher end of an average starting price greater than $14. This doesn't necessarily mean that India should be avoided, but it can very possibly mean that gigs from India are on average more expensive due to the technical or specialized nature of the service. One might look into Bangladesh, Sri Lanka, or Indonesia if money is a concern (which it almost always is). Morocco, Venezuela, and Serbia should be considered in multi-lingual services are required.
Category and Location
Besides getting a general overview of the representation of countries in the overall data set, I believe it's more interesting to see if there is a link between Category, or Subcategory and Country. In other words are certain countries better for Digital Marketing or Graphics and Design as compared to other countries? Before generating visualizations to check for any trends on category (or subcategory) and location, I decided to run some Chi-squared tests of independence.
The left shows chi-square results using Python giving us extremely low p-values that Python quantified as being close enough to zero to be considered as zero. On the right Pearson's Chi-squared test using R yielded similar results of p-values less than 2.2e-16, suggesting a statistically significant dependence between the category/subcategory and location variables.
Top Countries by Category
Now that we have statistical evidence suggesting a link between Country and Category, let's see what the representation of country is for each category. The bar-plots below show the top five countries for each category.
An interesting observation revealed by these plots is that the United States, Pakistan, India, and Bangladesh are present in most of categories. The information revealed by these plots can serve as a starting point for a business that can narrow down its choices based on which category of work it is looking to outsource. For example Pakistan looks like a great choice for Graphics & Design. For Music & Audio, the top choices include the US, UK, and Venezuela. And the best bets for Programming & Technology appear to be Pakistan, India, and Bangladesh.
Top Countries by Subcategory
Now let's go a little deeper and analyze the representation of countries at the subcategory level. The visualization below explores the subcategories of Programming & Technology.
Analyzing the data at this level is even more insightful than the category representation of different countries. Using subcategory level data allows someone to distinguish more specific outsourcing requirements. Either Pakistan or India would be a good choice for E-commerce needs. India seems great at Quality Assurance related services, while Pakistan seems to be a good fit for most of the other Programming & Technology subcategories.
After narrowing our choices down to a few countries, other variables from the data set can be used to help further refine our choices. The box-plot visualization on the right shows the average response time in hours for each of the top five Programming & Technology countries for each subcategory. For Quality Assurance, the United States stands out with its larger range of response times in Quality Assurance, while if you recall from the previous paragraph, India was leading in this subcategory. This is a good indication to seek talent in India if the work is Quality Assurance related.
It would be helpful to scrape more data from all pages of each subcategory to eliminate any convenience bias. This would allow regression modeling of star-rating or positive rating on variables such as average response time or starting price. International economic statistics can be incorporated into this data to see how the economy of a country relates to representation on Fiverr. Such data would definitely be helpful in predictive and prescriptive analytics.