LoginSignup
13
5

More than 5 years have passed since last update.

Advent Calendarを立てた人自身は何日目にエントリーするのか調べてみた

Last updated at Posted at 2016-12-03

空いてたので Advent Calendar 紹介 Advent Calendar 2016 の4日目です。

ふと、「AdventCalendarを立てた人自身は何日目にエントリーするんだろう?」「AdventCalendarを立てて自分自身はエントリーしないパターンがどれくらいあるんだろう?」というのが気になったので調べてみました。

予想としては、最初の方と最後の方が多く、かつ執筆しやすい週末が多い、です。

調査対象は、12/3(木)22時頃の時点でQiitaに開かれていたAdventCalendar 499件です。AdventCalendarを立てた当人が複数(あるいは全部)エントリしている場合は、それらをすべて数えています。

AdventCalendarを立てた人自身は何日目にエントリーするか

こんな感じになりました。

1
256人
2
116人
3
95人
4
74人
5
63人
6
60人
7
52人
8
61人
9
49人
10
49人
11
52人
12
49人
13
42人
14
42人
15
49人
16
42人
17
44人
18
52人
19
38人
20
46人
21
37人
22
39人
23
45人
24
50人
25
91人

最初の3日が極端に多く、次いで最終日ですね。土日はやや多いくらいでしょうか。やっぱりと言うか、最終週の平日はいちばん人気がありません。

AdventCalendarを立てて自分自身はエントリーしないパターンがどれくらいあるか

54件でした。これは全体の約11%です。

せっかくAdventCalendar立てたなら、1件くらいエントリ書いてもいいんじゃない…?と思ったけど、埋まったから次のを立てたパターンぽいのもあり、一概に書いてないとも言い切れないのが難しいですね。

調査対象のAdventCalendarの一覧

調査に使ったソースコード

Qiita Advent Calendar 2016 で削除されたカレンダーを調べてみた
で紹介されてたので、「プログラミング関係の記事」として存在できるように上記の調査に使ったソースコードも置いておきます。
Groovyです。

Advent Calendar 一覧を取得するもの

@Grapes(
  @Grab(group='org.jsoup', module='jsoup', version='1.+')
)
import org.jsoup.*
import org.jsoup.nodes.*
import org.jsoup.select.*

def calendars = "http://qiita.com/advent-calendar/2016/calendars?page="

def urls = []
(1..25).each{
    Document doc = Jsoup.connect( calendars + it ).get()
    Elements links = doc.select('td.adventCalendarList_calendarTitle > a')
    links.each{ urls += it.attr("abs:href") }
}

def outfile = new File("/Application/advent-calendar.txt")
urls.each{
    outfile.append( it + "\n" )
}

立てた人自身のエントリーを調べるもの

@Grapes(
  @Grab(group='org.jsoup', module='jsoup', version='1.+')
)
import org.jsoup.*
import org.jsoup.nodes.*
import org.jsoup.select.*

def infile = new File("/Application/advent-calendar.txt")
def urls = []
infile.eachLine{ urls += it }

def owners = [:]
def rand = new Random()
urls.each{ String url ->
    println url
    sleep 1000+rand.nextInt(1000)

    Document doc = Jsoup.connect( url ).get()
    def owner = doc.select('p.adventCalendarJumbotron_owner > a').attr("href")
    def days = doc.select('td.adventCalendarCalendar_day')
    def authors = [:]
    days.each{
        def day = it.select('p.adventCalendarCalendar_date').text()
        def author = it.select('div.adventCalendarCalendar_author > a').attr("href")
        authors += ["$day":"$author"]
    }
    owners += ["$url": authors.findAll{ it.value == owner } ]
}

def outfile = new File("/Application/advent-calendar-authors.txt")
outfile.write(owners.toString())

def counts = []
26.times{ counts << 0 }
println counts
owners.each{
    if(!it.value){ counts[0]++ }
    it.value.each{ counts[it.key as Integer]++ }
}
println counts
13
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
5