I heard recently that the price of cherries has suddenly dropped dramatically. Many people have dreamed of the “freedom of cherries” before, but now they can achieve it. In fact, the main reason for the decline in the price of cherries is the greatly reduced cost of imported freight. In order to find the best way to purchase cherries, I decided to use Python +BI for data analysis.
Therefore, I used Python to crawl 3000 pieces of data on Taobao, then imported them into FineBI for visual analysis, and finally produced the following visual report:
Here’s how it works:
1. Data acquisition
It is a plite operation to use Python to conduct data crawling on Taobao. Search “cherry fruit” directly on Taobao, as can be seen from the commodity page below, the main labels we crawl this time are “commodity name”, “price”, “number of payers”, “store name”, “shipping address”, etc. :
Press F12 to call up the background source code to find different item tags such as “price g_price g_price-highlight”>” number of payers “deal-cnt” and so on:
Now that you know the code structure of the web page, the next step is to write the code directly in Python.
After climbing the data, import it into Excel, and then go through simple data cleaning and processing in Excel, and finally get a completed data table:
2. Data analysis
Although Python can also realize the function of data analysis, but it needs to be coded, so the learning cost and difficulty are relatively high. It is better to directly use professional data analysis tools for analysis, such as common ones such as FineBI, Tableau, PowerBI, etc.
Below, I directly take FineBI as an example. FineBI is a well-known local data analysis tool in China. Compared with Tableau, the biggest advantage of FineBI is simple and flexible.
In fact, FineBI is essentially an enterprise-level business data analysis platform. In addition to data analysis, it can also realize data management, data platform construction and other functions. I will not introduce it in detail here, but I will introduce it in the next article if you are interested.
With the Excel source table, first let’s import Excel into FineBI:
Then directly click “Create Dashboard” in the upper left corner of the page to enter the visual background:
Next to the dashboard for visualization operation, the basic step is to “choose chart type – select metrics and dimensions – drag and drop to the specified axis, beautify the details”, I want to create a visual map, for example, must first to choose the chart type as the “regional map”, then choose metrics and dimensions, but the original data table without geographic latitude, So create your own:
Finally, drag and drop to the specified axes and beautify the details to create a visual map:
By analogy, other visualizations can be made to suit our own needs, which we won’t go into here.
Data visualization
1. Sales distribution of cherries
It can be seen that the largest sales volume of cherries in China comes from Shanghai, zhejiang and Guangdong provinces, while there is no sales volume in Xizang, Qinghai, Inner Mongolia and other provinces. Basically speaking, the sales volume in coastal areas is higher than that in inland areas.
2. Sales volume of each province
The bar chart makes it even more obvious that Shanghai’s sales volume is more than 200,000, almost as much as zhejiang, Guangdong and Sichuan combined.
3. Sales volume of each city
We screened out the top ten cities in terms of sales volume and the average price of cherries in each city. It can be seen that Shanghai has the highest sales volume and price, which can be seen how strong Shanghai’s purchasing power is.
4. The price range of cherries
The data table divides the price range into “below 50”, “50-100”, “100-150”, “150-200”, “200-500” and “above 500”, etc. It can be seen that the price range with the largest proportion is “50-100”, which should belong to the civilian price. It is worth noting that the price of “200-500” is also higher than that of “100-150”.
5. Sales volume and price of each store
It can be seen that flagship stores have the highest sales volume and the highest average price is around 600-800.
Four,
Because the data is not much, we did not do in-depth data analysis this time. You can take the data by yourself and conduct more analysis in FineBI.