当前位置:网站首页>Review of Weibo hot search in 2021 and analysis of hot search in the beginning of the year
Review of Weibo hot search in 2021 and analysis of hot search in the beginning of the year
2022-07-04 15:45:00 【The way of several people】
The way of several original articles , Please contact us for reprint
2022 The bell of the new year of the tiger is about to ring , Worked hard for a year , We are all looking forward to the reunion and joy of returning home , Wash away tiredness , Adjust the State , Vigorously continue the journey of the new year . But now the domestic defense line has been broken by Omicron , The new variant of the virus is threatening , The national defense has been broken in many areas, including first tier cities , This makes the travel policy of the Spring Festival more difficult to predict . I hope everyone can go home as desired , After a good year .
In the New Year , We might as well stop in a hurry , Look back on the past 2021 year , Look at what happened , What marks are left .
This time we use the data of Weibo search 2021 Review and analysis of hot events in and at the beginning of this year . The preparations before analysis will not be repeated , Refer to the previous data analysis article .
1
Hot search annual calendar heat distribution
Get all the hot search data last year , Summarize the heat value by date , In the form of calendar , Visual output heat search annual calendar heat distribution .
【 Code 】
# Get date list def get_date_list(start, end): date_list = [] start_dt = datetime.strptime(start, "%Y-%m-%d") end_dt = datetime.strptime(end, "%Y-%m-%d") while start_dt <= end_dt: date_list.append(start_dt.strftime("%Y-%m-%d")) start_dt = start_dt + timedelta(days=1) return date_list # Get hot search information def get_trend_topic(): # Specify the date range for hot search date_list = get_date_list("2021-01-01", "2021-12-31") topic = [] hotNumber = [] date = [] month = [] icon = [] durations = [] fenlei = [] # Crawl the hot search content of the specified date for i in range(0, len(date_list)): url = "url" + date_list[i] res = requests.get(url=url, headers=headers) res.encoding = "utf-8" trend = json.loads(res.text) trend = trend["data"] # Cycle through the information items of the hot search for j in range(0, len(trend)): try: topic.append(trend[j]["topic"]) hotNumber.append(trend[j]["hotNumber"]) date.append("20" + trend[j]["date"][0:8]) month.append("20" + trend[j]["date"][0:5]) icon.append(trend[j]["icon"]) durations.append(trend[j]["durations"]) fenlei.append(trend[j]["fenlei"]) except: print(trend[j]["date"]) continue # Set the interval between daily hot search requests time.sleep(0.5) # Create data table tb_trend = pd.DataFrame( {"topic": topic, "hotNumber": hotNumber, "date": date, "month": month, "icon": icon, "durations": durations, "fenlei": fenlei}) # Delete duplicate lines tb_trend = tb_trend.drop_duplicates() # Summarize the heat search heat value by date sum_hot = tb_trend.groupby("date", as_index=False)["hotNumber"].sum().values.tolist() # Data visualization output calendar(sum_hot, "2021 Annual hot search calendar distribution map ", "2021 Annual hot search calendar distribution map ")
【 result 】
chart 1:2021 Annual hot search calendar heat distribution
【 analysis 】
Hot search calendar , The distribution of heat value of heat search from late July to early August is the most concentrated , It may be due to the summer vacation and the Tokyo Olympic Games ; January and the end of the year have the lowest popularity , But in 11 month 17 A small outbreak of low heat and hot search season suddenly appeared on the th .
2
The hottest day is hot
Search the heat calendar chart above , You can see ,2021 The highest heat value of the annual hot search is in July , It means that the hot search in July is the most intensive . among , The hottest day is 7 month 29 Japan .
We extract 7 month 29 The data of , Look at what everyone was talking about that day .
【 result 】
chart 2:2021 The annual hot search is the highest a few days ago 15 Big talk
【 analysis 】
After extracting the data of the hottest day , Summarize the heat value according to the topic of the day , And sort , You can get the hottest topic of the day .
The topic of seeing the hottest day basically revolves around the war situation of the Chinese team in the Tokyo Olympic Games . And the first topic is “ Lin Dan's most admired opponent is Li Zongwei ”, Very positive energy topic . This topic is really hot , Become the year Top1 topic of conversation . so , How valuable is the great friendship between Lin Dan and Li Zongwei who fell in love and killed each other on the badminton court , Li Zongwei's strength and hard work have brought great impact to Lin Dan .
3
Monthly top ten hot searches
Get all the hot search data last year , Summarize the heat value by month and topic , Through the form of pie chart , Top ten topics of visual output hot search month .
【 Code 】
# Summarize the heat of search by month sum_hot_mth_top = tb_trend.groupby(["topic", "month"], as_index=False)["hotNumber"].sum() sum_hot_mth_top = sum_hot_mth_top.sort_values("hotNumber", ascending=False) # Extract the top ten topics of monthly hot search by month for mth in month_list: sum_hot_mth_top_new = sum_hot_mth_top[sum_hot_mth_top["month"] == mth] name = sum_hot_mth_top_new["topic"].head(10).to_list() value = sum_hot_mth_top_new["hotNumber"].head(10).to_list() # Data visualization output pie(name, value, mth + " Before the hot moon 10", mth + " Before the hot moon 10")
【 result 】
chart 3:2021 Ten hot topics in December (1-12 Monthly rotation )
video :2021 Ten hot topics in December ( Duration 35 second )
【 analysis 】
2021 The top ten topics of the monthly hot search every month in can reflect the major hot events of the month , Now, Hao Hao will take you to review .
- 1 month : Weiya's new year goods hit the first shot of the new year ; Riding the wind and waves, the second season of my sister's broadcast attracted heated discussion
- 2 month : Around the news of the death of two heavyweights in the entertainment industry : headmaster 、 Zhao Yingjun ; Celebrate the new year of the ox
- 3 month : Discussion on new energy vehicle manufacturing forces ; Three TV dramas that have long dominated search have been broadcast ; Xinjiang cotton incident
- 4 month : The divorce of first-line artists is still the focus of public attention ; The creation camp starts broadcasting ; The Chinese women's football team qualified for the Olympic Games
- 5 month : The same day in China 、 At the same time , Lost two great scientists 、 academician : Yuan Longping 、 Wu Mengchao ; The three child policy is coming
- 6 month : College entrance examination month ; Guangzhou is suffering from the epidemic of covid-19 ; The Shenzhou 12 manned spacecraft was successfully launched
- 7 month : Two world badminton giants sympathize with each other ; Wu Yifan's entanglement with Du Meizhu ; Henan suffered a heavy rainstorm once in a thousand years ; The war situation of Tokyo Olympic Games
- 8 month : Wu Yifan and the Tokyo Olympic Games occupied a hot search all month ; Su Bingtian ran out “ The first flying man in Asia ” The title of
- 9 month : Meng Wanzhou was released to return home ; Commemoration of the September 18th Incident ; Local epidemic situation ;Netflix New phenomenal drama 《 Squid game 》
- 10 month : Li Yundi was arrested and aroused heated discussion about prostitution ; National Day
- 11 month :EDG Won the champion of E-sports global finals ; The third historical resolution of the Communist Party of China ; The head anchor was fined for tax evasion
- 12 month : Weiya was punished and banned for tax evasion ( It really echoes ); The connotation of high-quality development is hot ; This year, many stars chose to call the police after being rumored ; Huo Zun incident reversed
Of course , Some hot events that are still fresh in your memory did not appear in the monthly hot search , It may be because it spans two months , Cause its weight to drop .
4
Hot topics of the year
Get all the hot search data last year , Summarize the heat value by topic , Through the form of histogram , Visual output hot search before the year 15 Big talk .
【 Code 】
# Summarize the annual search popularity by topic sum_hot_year_top = tb_trend.groupby("topic", as_index=False)["hotNumber"].sum() sum_hot_year_top = sum_hot_year_top.sort_values("hotNumber", ascending=False) name_year_hot = sum_hot_year_top["topic"].head(15).to_list() value_year_hot = sum_hot_year_top["hotNumber"].head(15).to_list() # Data visualization output bars_non_slider2(name_year_hot, value_year_hot, "2021 The hottest topic of the annual hot search ", "2021 The hottest topic of the annual hot search ")
【 result 】
chart 4:2021 Before the annual hot search 15 Big talk
【 analysis 】
“ Lin Dan's most admired opponent is Li Zongwei ” The topic leads the annual hot search list with its popularity . Next, Wu Yifan was arrested for sexual assault and grandpa Yuan Longping died . These two feel very awkward together , And one of China's greatest scientists has less attention than a traffic star , It really makes people feel sad .
Most of the top 15 in the annual hot search are entertainers 、 Negative news from stars ( It's not too much to call this year the year of collective collapse of entertainment stars ) And the TV series 、 variety show ; There are other epidemics 、 Rainstorm and other social hot news ; Grandpa yuanlongping occupied two annual hot searches .
5
The longest hot search on the list
Get all the hot search data last year , Summarize the duration value on the list by topic , Through the form of histogram , Visual output is the longest time before the annual Top Search 15 Big talk .
【 Code 】
# Summarize the duration of hot search on the list by topic sum_duration = tb_trend.groupby("topic", as_index=False)["durations"].sum() sum_duration = sum_duration.sort_values("durations", ascending=False) name = sum_duration["topic"].head(15).to_list() value = sum_duration["durations"].head(15).to_list() # Data visualization output bars_non_slider(name, value, "2021 The annual hot search is ahead of the list 15", "2021 The annual hot search is ahead of the list 15")
【 result 】
chart 5:2021 The annual hot search list has a long history 15 Big talk
【 analysis 】
2021 The topics that have been popular on Weibo for the longest time are basically TV dramas and variety shows . It seems that TV dramas and variety shows are popular through purchase , Use the popularity of hot search for publicity , It has become a routine operation .
The fund is the only one who has been dominating the list for a long time 15 China is not the topic of TV variety , And ranked fifth , It seems that the fund market last year was really green ( Once the fund is hot, it must be bad ).
6
Annual hot search category
Get all the hot search data last year , Summarize the heat value by topic category , Through the form of histogram , Visual output hot search before the year 15 Big question category .
【 Code 】
# Summarize the popularity of search by category sum_fenlei = tb_trend.groupby("fenlei", as_index=False)["hotNumber"].sum() sum_fenlei = sum_fenlei.sort_values("hotNumber", ascending=False) name_fenlei_hot = sum_fenlei["fenlei"].head(15).to_list() value_fenlei_hot = sum_fenlei["hotNumber"].head(15).to_list() # Data visualization output bars_non_slider2(name_fenlei_hot, value_fenlei_hot, "2021 Before the annual hot search category 15", "2021 Before the annual hot search category 15")
【 result 】
chart 6:2021 Before the annual hot search 15 Major categories
【 analysis 】
Social events are undoubtedly the most popular topics of the year , This kind of topic is much more popular than other categories . Entertainment topics ( Including stars 、 variety 、 TV play 、 Movies, etc. ) It also accounts for a considerable proportion of hot search . The rest is sports 、 current affairs 、 Finance and economics, 、 Internet and other topics related to the national economy and the people's livelihood .
7
Search for annual keywords
Get all the hot search data last year , Participle all topics , And eliminate the stop words , Count the word frequency of word segmentation , Through the form of word cloud , Visual output hot search annual keywords .
【 Code 】
# Separate and merge the hot search topics with commas , Convert to string seg = tb_trend["topic"].to_list() seg = ",".join(seg) # Word segmentation of hot search topics after merger seg_list = list(jieba.cut(seg)) seg_list_new = [] for m in range(0, len(seg_list)): if len(seg_list[m]) > 1 and is_number(seg_list[m]) == False: seg_list_new.append(seg_list[m]) # Count the word frequency of word segmentation results , And convert to tuples result = Counter(seg_list_new).items() # Data visualization output word_cloud(result, "2021 Annual hot search keywords ", "2021 Annual hot search keywords ")
【 result 】
chart 7:2021 Annual hot search keywords
【 analysis 】
The top keywords of the hot search year are basically related to the new crown ( Diagnosis 、 newly added 、 The vaccine 、 epidemic situation 、 novel coronavirus 、 Native land 、 Case 、 nucleic acid 、 Vaccination, etc ), so 2021 year , We are still struggling with novel coronavirus, which has been circulating around the world for nearly two years . At the same time, there are Olympic related keywords ,2021 year , We witnessed the first time in history that the Olympic Games were held in a non Olympic year .
These happy or sad keywords accompany us through a difficult but singing year .
8
2022 Hot search at the beginning of the year
Get all the hot search data this year , Summarize the heat value by topic , Through the form of histogram , The top ten topics of visual output search so far this year .
【 result 】
chart 8:2022 Ten hot topics in the new year
【 analysis 】
2022 Years has just opened , The new coronavirus Omicron variant broke through China's defense , And there are also studies that have shown that suffering from the new crown will cause irreversible damage to male sexual function ( It's appalling , I don't know if it's a foreign political trick , Force its people to vaccinate ).
President Xi's New Year greetings 、 The positive energy events such as the victory of Jiang GE's mother v. Liu Xin are 2022 A good start in the new year . May everyone have a bright future in the year of the tiger 、 Fruitful results , Beauty always accompanies !
Cover image source :unsplash
Cover picture author :Jan Baborák
边栏推荐
- [Dalian University of technology] information sharing of postgraduate entrance examination and re examination
- [book club issue 13] coding format of video files
- 十六进制
- 进制乱炖
- Logstash~Logstash配置(logstash.yml)详解
- Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
- LNX efficient search engine, fastdeploy reasoning deployment toolbox, AI frontier paper | showmeai information daily # 07.04
- Find numbers
- Enter the width!
- [book club issue 13] packaging format and coding format of audio files
猜你喜欢
在芯片高度集成的今天,绝大多数都是CMOS器件
Scientific research cartoon | what else to do after connecting with the subjects?
MySQL learning notes - data type (numeric type)
每周招聘|高级DBA年薪49+,机会越多,成功越近!
Blood cases caused by Lombok use
Data Lake Governance: advantages, challenges and entry
The 17 year growth route of Zhang Liang, an open source person, can only be adhered to if he loves it
【大连理工大学】考研初试复试资料分享
Halcon knowledge: NCC_ Model template matching
Lombok使用引发的血案
随机推荐
unity update 协程_Unity 协程的原理
MP3是如何诞生的?
这几年爆火的智能物联网(AIoT),到底前景如何?
Blood cases caused by Lombok use
JS tile data lookup leaf node
Guitar Pro 8win10 latest guitar learning / score / creation
2022年九大CIO趋势和优先事项
Redis的4种缓存模式分享
PXE网络
Temperature control system based on max31865
Unity script lifecycle day02
LeetCode 35. Search the insertion position - vector traversal (O (logn) and O (n) - binary search)
小数,指数
Unity脚本常用API Day03
进制形式
左右对齐!
Lombok使用引发的血案
输入宽度!
Unity prefab day04
基于MAX31865的温度控制系统