What happens if you graph the video of the "Full power avoidance flag-chan!" Channel? [Python] [Graph]

Introduction

I love YouTube and wanted to know more about the channels I watch a lot on a daily basis, so I decided to collect data like this one myself and graph it to make it easier to see the situation. What made me want to do this is the motivation for creating this article.

This time, we collected information on the number of views, the release date of the video, the characters that appeared and how to end the story from the video published on a YouTube channel operated by Plott Inc. called "Zenryoku Evasion Flag-chan!" I made it possible to see the whole picture by making a graph. If you would like to know more about the operating company, channels and characters, please refer to the related links at the end of this article.

There is nothing more than that. Unlike other Plott-like channels, Flag-chan felt that the main characters that appeared depending on the content of the story were different *, so I thought that it might have something to do with the number of views, so I just made a graph. ..

Notes

What we are doing in this article is just plotting the information obtained from the video. Also, since it was recorded as of December 28, 2020, it may differ from the current information. The information may be incorrect because it was recorded visually. Please note.

Data set used

This time, we checked the contents of the videos from the video list of the channel in chronological order, and created a data set that summarizes the following information. It is carried out visually and manually. Actually, after acquiring the information that can be acquired by API or Web scraping, etc. I wanted to automate it further, but it would take time and there were some parts that could not be recorded without watching the video, so I decided to make it while watching it. * The file format is a CSV file that summarizes the following information. * I'm a fan of Flag-chan, so I didn't feel any pain in recording the data while reviewing all the videos. It is not recommended to imitate, but ...

--Oldest to ascending numbers --Video release date --Video title --Number of views (rounded down to less than 10,000, recorded at 12/28 23:00) --With or without Dead End --Presence or absence of death flag --Presence or absence of survival flag -Presence or absence of love flag

Of the above, what was actually used was the video release date, the number of views, and the presence or absence of each. I think that other information will be used in future analysis. As of December 28, 2020, 219 videos have been released, and the above tabulation results are as follows.

Number of videos Dead End number Death flag appearance count Survival flag appearance count Number of romance flag appearances Death flag recovery rate
219 12 210 39 17 About 5.7 %

Dead End is for those that have Dead End written at the end of the video (including katakana). In addition to that, there were many depictions in which the flags were clearly recovered, but since there is a risk that the data will be corrupted if judged too subjectively, this definition was made this time.

The number of appearances of Death Flag is the same, but depending on the story, there are also appearances only in the delusion of the mob man, and that is also counted. The appearances of Survival Flag and Love Flag also count the appearance of only voice, which was a recent 6-channel collaboration.

The formula for calculating the death flag recovery rate is

\begin{align}
[Death flag recovery rate] = [\mathrm{Dead \ End} \number] \ / \ [Death flag appearance count]
\end{align}

Is defined as.

In addition, the average value and median value of the number of playbacks are as follows. Only the average value is calculated using the total number of playbacks obtained from the "Summary".

Average number of video views[Ten thousand] Median number of video views[Ten thousand]
75 61

program

This is a program that plots a graph from the dataset created this time. I had a hard time creating it, but there is nothing particularly difficult. Is Qiita a blogging service for programmers? It seems that I posted the code for the time being, but you can skip it if you like.

Graphing program


%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import datetime
import matplotlib.dates as mdates
import matplotlib.patches as mpatches
from matplotlib.path import Path
from pandas.plotting import register_matplotlib_converters

#CSV file for dataset
file = "flag_video_data_date.csv"
#Date,Views
num_play = pd.read_csv(file, header=0, encoding='UTF8', usecols=[1, 3], parse_dates=[0])
num_play = num_play.dropna(how='all')
#Date, Dead End
num_dead = pd.read_csv(file, header=0, encoding='UTF8', usecols=[1, 4], parse_dates=[0])
num_dead = num_dead.dropna(how='all')
#Date,death flag
num_shibou = pd.read_csv(file, header=0, encoding='UTF8', usecols=[1, 5], parse_dates=[0])
num_shibou = num_shibou.dropna(how='all')
#Date,Survival flag
num_seizon = pd.read_csv(file, header=0, encoding='UTF8', usecols=[1, 6], parse_dates=[0])
num_seizon = num_seizon.dropna(how='all')
#Date,Love flag
num_renai = pd.read_csv(file, header=0, encoding='UTF8', usecols=[1, 7], parse_dates=[0])
num_renai = num_renai.dropna(how='all')

# debug
#print(num_play)
#num_play.to_csv('exam_num_play.csv')

#Graph to plot
#Date
x = num_play[num_play.columns[0]]
#print(type(x[0]))

#x = pd.date_range(x[0], x[218], freq='D')
#Views
y1 = num_play[num_play.columns[1]]
#Dead End
y2 = num_dead[num_dead.columns[1]]
#death flag
y3 = num_shibou[num_shibou.columns[1]]
#Survival flag
y4 = num_seizon[num_seizon.columns[1]]
#Love flag
y5 = num_renai[num_renai.columns[1]]

#Graph size
plt.figure(figsize=(20.0, 10.0), dpi=300)
#Font settings
plt.rcParams['font.family'] = 'Times New Roman'


#Graph plot
##Plot the number of views in a bar graph
play = plt.bar(x, y1, width=1.0, bottom=None, color="lightblue")

##Plot counts in dots
for i in range(len(x)):
    if y3[i] == 1:
        shibou, = plt.plot(x[i], y1[i], marker='s', markersize=5, color='#ff7f00', linestyle='None')

    if y2[i] == 1:
        dead, = plt.plot(x[i], y1[i], marker='*', markersize=8, color='r', linestyle='None')
    
    if y4[i] == 1:
        seizon, = plt.plot(x[i], y1[i], marker='o', markersize=4, color='c', linestyle='None')

    if y5[i] == 1:
        renai, = plt.plot(x[i], y1[i], marker='$\heartsuit$', markersize=3, color='#f781bf', linestyle='None')

##Plot the mean and median with horizontal lines
avg = plt.hlines(num_play.mean(axis=0), x[0], x[len(x) - 1], 'b', linestyles='dashed')
med = plt.hlines(num_play.median(axis=0), x[0], x[len(x) - 1], 'r', linestyles='dashed')
print(num_play.mean(axis=0))
print(num_play.median(axis=0))
        
#Axis range
plt.xlim('2019-11-01', x[len(x) - 1])
plt.ylim([0, 350])

#Graph title
plt.title("Full power avoidance flag!Video aggregate data", fontname="MS Gothic", fontsize=20)

#Axis memory
plt.tick_params(axis='x', labelsize=20, labelrotation=45)
plt.tick_params(axis='y', labelsize=20)

#Label name
plt.xlabel("Video release date", fontsize=20, fontname="MS Gothic")
plt.ylabel("Views[Ten thousand]", fontname="MS Gothic", fontsize=20)

#Usage Guide
play_title = "Views"
dead_title = "Dead End"
shibou_title = "death flag"
seizon_title = "Survival flag"
renai_title = "Love flag"
avg_title = "Average value"
med_title = "Median"

plt.legend([play, dead, shibou, seizon, renai, avg, med], [play_title, dead_title, shibou_title, seizon_title, renai_title, avg_title, med_title], bbox_to_anchor=(1.0, 1.0), prop={"family":"MS Gothic", 'size':20}, markerscale=3)

#Save image
plt.savefig("flag_video_stas_graph.png ", bbox_inches="tight", pad_inches=0.0)

Graphed result

The graph below is the result of this article. The number of views is represented by a bar graph. The dead end is represented by a red star, the death Bragu-chan's appearance is represented by an orange square, the survival flag's appearance is represented by a blue circle, and the love flag's appearance is represented by a pink heart. The place to be plotted is just at the top of the bar graph. The average number of video views is plotted with a blue dashed line, and the median is plotted with a red dashed line.

flag_video_stas_graph_20201228.png

A brief consideration?

Now that I have made a graph, I would like to give a brief consideration or impression. First of all, most of the videos that have been played more than 1.5 million times, which is twice the average value where the number of views is large, are the death flag alone, and even if there is, the survival flag appears. There is only one episode located around this area in the many Dead End times. Considering that, I come to the conclusion that if you put out a character for the time being, it will be different if you can get a big impact that exceeds 1 million views. In other words, the number of views does not depend on the appearance of the character, but the quality of the content.

Next, regarding the average and median values, the average and median values ​​are higher than those values, even though the current number of subscribers is about 420,000. In other words, do you mean that there are many people who are not subscribed to the channel but are interested in the content, or core viewers who play it repeatedly? (I can't say anything because I'm not familiar with how to count YouTube views) If it is the former, the video is delivered to the undeveloped group, so it seems that the number of registrants can be expected to increase in the future, and if it is the latter, it has the appeal of attracting viewers and not talking. I think. I think there are both, but ...

Finally, pay attention to the horizontal axis. Regarding the frequency of posting videos, I haven't been able to post every other day as declared, but I posted every day immediately after that, and in total, more videos were posted than I posted every other day. After all YouTuber is amazing ... To put it the other way around, despite posting with this quality and frequency, I think that there are 400,000 people in a year.

Simple conclusion

It will be an impression that I got after trying it, but I will summarize the conclusion.

――The number of views seems to be more relevant to the quality of the content than the characters that appear ――It is an attractive channel that can be expected in the future as it has an average value and a median value higher than the number of registered users. --You can do more than post every other day

Future plans

I wish I could do the following.

--Calculate and predict the appearance probability of each flag from the title --Predict the rough number of views from the title --Creating a bot that refers to the title from the entered characters and determines whether the flag is set

I'm still interested in image recognition if I can do it. Also, if I can get the transition information of the number of subscribers, I would like to plot it on this graph.

in conclusion

I don't think anyone has read this far, but if you have any questions, please follow the Full Avoidance Flag-chan! channel and Flag-chan's Twitter from the link below. It's more important than reading this article. It's important, so please subscribe and follow us on Twitter again.

Related Links

--Full power avoidance flag-chan! Https://www.youtube.com/channel/UCo_nZN5yB0rmfoPBVjYRMmw/videos --Plott Inc. / Plott Inc. https://plott.tokyo/#top --Flag-chan's Twitter https://twitter.com/flag__chan

Recommended Posts

What happens if you graph the video of the "Full power avoidance flag-chan!" Channel? [Python] [Graph]
What happens if you graph the number of views and ratings/comments of the video of "Flag-chan!" [Python] [Graph]
I checked the distribution of the number of video views of "Flag-chan!" [Python] [Graph]
The Power of Pandas: Python
If you want a singleton in python, think of the module as a singleton
What happens if you do "import A, B as C" in Python?
What you want to memorize with the basic "string manipulation" grammar of python
What to do if the progress bar is not displayed in tqdm of python
What to do if you can't hit the arrow keys in the Python interactive console
How much do you know the basics of Python?
Not surprisingly known! ?? What about the arguments of built-in functions? What school are you from? [Python]
What to do if you get `locale.Error: unsupported locale setting` when getting the day of the week from a date in Python