In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the R language how to achieve ggplot redraw Tmall Singles Day sales curve, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
Some time ago, a lot of people were scrubbed by this picture:
The source of this picture is an article entitled "Taobao double 11 sales data falsification in 2009-2018". The scattered points in the picture are Tmall's Singles Day sales data, and the curve is the regression line fitted by the original author. At first glance, the scattered spots are perfectly distributed on the curve, the original author directly claimed: "Taobao Singles Day sales data fraud!" there can't be such a perfect fit! " But is this really the case?
As a blogger who loves painting, let's ignore this problem and try to draw the above image in R, a better-looking version of the above image.
Let's start
Warm Tip: in this blog, you can learn the following ggplot drawing tips:
How to fit Quadric Curve in Image
How to add text to an image or adaptively
How to delete some unnecessary background lines
There are also some routine operations: change the theme, change the scale, change the color and so on. ...
Secretly put a final result:
Input data
First of all, we look up the specific annual sales data of Tmall, and then build data frame in R.
Year
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.