<center> <sup>Image: [Timur Saglambilek](https://www.pexels.com/photo/analytics-text-185576/)</sup></center> Just used a similar variant for another purpose, maybe it's helpful for somebody else as well. This script uses [beem](https://github.com/holgern/beem) to access the blockchain. ``` from beem.blockchain import Blockchain from datetime import datetime, timedelta import sys start_time = datetime(2019, 5, 29) bc = Blockchain() start_block = bc.get_estimated_block_num(start_time) stop_block = bc.get_estimated_block_num(start_time + timedelta(days=1)) root_authors = set() comment_authors = set() voters = set() transactors = set() for op in bc.stream(start=start_block, stop=stop_block, max_batch_size=50): sys.stdout.write("%s\r" % (op['timestamp'])) if op['type'] == 'comment': if op['parent_author']: comment_authors |= set([op['author']]) else: root_authors |= set([op['author']]) if op['type'] == 'vote': voters |= set([op['voter']]) if op['type'] == 'transfer': transactors |= set([op['from']]) print("\nNumber of root authors : %d" % (len(root_authors))) print("Number of comment authors : %d" % (len(comment_authors))) print("Number of voters : %d" % (len(voters))) print("Number of transfer senders: %d" % (len(transactors))) ``` A few remarks: * `blockchain.get_estimated_block_num()` is a nice way to get a block number form a time stamp and is used to find the start and stop blocks. * The `set()`s are an elegant way to keep track of a list of unique entries, or'ing with `|=` adds new values only if they are not yet contained in the set * The `sys.stdout.write()` with line-return gives some status info on how far in time the script has the data processed and only little output clutter to the terminal #### Results for May 29th, 2019 | | | | --- | --- | | Number of root authors | 6247 | | Number of comment authors | 4129 | | Number of voters | 41559 | | Number of transfer senders | 2929 | --- Wow, the numbers aren't very promising :/ We had ~8k root posters and ~6k comment authors beginning of the year and more than 10k/8k (root/comment) around Sept. 2018. The number of voters per day also seems to be declining, coming from around 47k at the beginning of the year and >50k in Sept '18. <sup>[number references](https://steemit.com/utopian-io/@crokkon/how-much-of-the-total-steem-sp-is-not-voting-1543014210145)</sup>.
author | stmdev |
---|---|
permlink | finding-the-number-of-authors-voters-per-day-with-python |
category | python |
json_metadata | {"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["python","beem","statistics","tutorial","busy"],"users":["crokkon"],"links":["https://www.pexels.com/photo/analytics-text-185576/","https://github.com/holgern/beem","https://steemit.com/utopian-io/@crokkon/how-much-of-the-total-steem-sp-is-not-voting-1543014210145"],"image":["https://steemitimages.com/p/EEEoA8oLaAxtVnttk7BKQMhRXkrRt8FHqw3nZvGBTSbDiXEyysnzqBxDdLg9XNkgwRqT1aKC47fM48GVLzPFotTDyUX64frd7KDRtYKKiKsSGK5H6vGrtDhh36LqKBVfhr8KfXab3aszWzvEyAatw?format=match&mode=fit&width=640"]} |
created | 2019-05-30 19:36:33 |
last_update | 2019-05-30 19:38:06 |
depth | 0 |
children | 2 |
last_payout | 2019-06-06 19:36:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 3.312 HBD |
curator_payout_value | 1.040 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,729 |
author_reputation | 10,427,398,400,460 |
root_title | "Finding the number of authors/voters/... per day with Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 85,767,370 |
net_rshares | 8,417,886,775,023 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bitsignal | 0 | 83,010,303,947 | 100% | ||
kaylinart | 0 | 95,482,881,161 | 100% | ||
camerongray | 0 | 17,910,070,734 | 100% | ||
incomemonthly | 0 | 25,401,833,333 | 100% | ||
achim86 | 0 | 11,310,514,174 | 100% | ||
dolov | 0 | 18,401,280,930 | 100% | ||
cryptofarmer | 0 | 54,449,574,249 | 100% | ||
nil1511 | 0 | 203,765,496,584 | 100% | ||
sjennon | 0 | 157,287,843,960 | 100% | ||
kiks14 | 0 | 69,924,944 | 100% | ||
busy.org | 0 | 76,432,515 | 0.49% | ||
anthonyadavisii | 0 | 0 | 100% | ||
sadness | 0 | 8,138,940,159 | 100% | ||
detlef-s | 0 | 10,346,797,513 | 100% | ||
oluwoleolaide | 0 | 64,216,852,841 | 100% | ||
turtle-trader | 0 | 15,998,595,642 | 100% | ||
sarasate | 0 | 104,073,514,196 | 100% | ||
sacred-agent | 0 | 5,898,283,126 | 5% | ||
robi | 0 | 35,418,549,830 | 100% | ||
fmd | 0 | 44,727,966,800 | 100% | ||
hentikage | 0 | 20,558,272,790 | 100% | ||
shikika | 0 | 212,077,712,956 | 100% | ||
arrliinn | 0 | 22,777,471,132 | 100% | ||
alphacore | 0 | 17,505,239,286 | 100% | ||
rawpride | 0 | 87,865,836,672 | 100% | ||
monkeypattycake | 0 | 8,270,633,573 | 100% | ||
whd | 0 | 90,313,195,579 | 100% | ||
insteem | 0 | 17,896,127,806 | 100% | ||
truth-be-told | 0 | 72,315,287,284 | 100% | ||
jstajok | 0 | 19,242,066,448 | 100% | ||
lupo | 0 | 27,820,656,022 | 100% | ||
ehwan | 0 | 84,097,890,967 | 100% | ||
jefflombardo | 0 | 63,469,279,588 | 100% | ||
midgeteg | 0 | 30,006,102,872 | 100% | ||
lisamalletart | 0 | 15,224,356,246 | 100% | ||
changyoon | 0 | 15,167,277,310 | 100% | ||
aabb | 0 | 12,628,828,112 | 100% | ||
sakhone | 0 | 84,149,584,957 | 100% | ||
andrejcibik | 0 | 24,174,777,744 | 100% | ||
srsrahman | 0 | 27,462,376,255 | 100% | ||
francis.melville | 0 | 77,381,514,229 | 100% | ||
foruni73 | 0 | 107,896,328,584 | 100% | ||
nuthman | 0 | 563,378,325,828 | 100% | ||
steem-lagos | 0 | 16,446,342,987 | 100% | ||
wisekricket | 0 | 517,239,456 | 50% | ||
crokkon | 0 | 167,869,975,326 | 100% | ||
accelerator | 0 | 5,117,066,793 | 0.3% | ||
torico | 0 | 38,999,423,541 | 100% | ||
therealwolf | 0 | 358,700,727,700 | 17.7% | ||
raviraj | 0 | 22,851,496,571 | 100% | ||
sayee | 0 | 28,851,793,637 | 100% | ||
theprism | 0 | 13,651,655,480 | 100% | ||
sozdemir | 0 | 162,489,293,901 | 100% | ||
dizzyapple | 0 | 1,176,755,933 | 50% | ||
maverickinvictus | 0 | 36,506,253,106 | 100% | ||
gutzygwin | 0 | 23,267,844,839 | 100% | ||
asimshahzad | 0 | 26,720,844,793 | 100% | ||
shanishah | 0 | 14,067,059,631 | 100% | ||
freedomtowrite | 0 | 14,420,224,011 | 100% | ||
mytechtrail | 0 | 3,319,632,552 | 15% | ||
joshua-golbuu | 0 | 35,190,231,087 | 100% | ||
crescendoofpeace | 0 | 4,871,772,386 | 25% | ||
patchi02 | 0 | 231,406,831 | 50% | ||
zharadum | 0 | 16,787,226,446 | 100% | ||
spiritualmax | 0 | 100,314,905,972 | 100% | ||
bestone | 0 | 43,279,121,379 | 100% | ||
smartmarket | 0 | 373,783,299,546 | 3.22% | ||
bubbolo21 | 0 | 22,269,710,684 | 100% | ||
knight4sky | 0 | 19,117,387,849 | 100% | ||
soyrosa | 0 | 192,326,003,402 | 100% | ||
soufiani | 0 | 100,558,325,660 | 100% | ||
magnus19 | 0 | 76,714,110,215 | 100% | ||
holger80 | 0 | 895,919,874,151 | 80% | ||
dongentle2 | 0 | 26,673,897,203 | 100% | ||
nane | 0 | 20,277,191,678 | 100% | ||
recenzent | 0 | 49,253,228,708 | 100% | ||
dora.dora | 0 | 15,241,044,889 | 100% | ||
ozphil | 0 | 300,454,084,176 | 100% | ||
mrelliwood | 0 | 11,769,848,815 | 100% | ||
jbrrd | 0 | 166,328,333 | 20% | ||
layra | 0 | 11,479,362,655 | 100% | ||
caferoman | 0 | 16,735,409,034 | 100% | ||
ourdailyboard | 0 | 172,909,742,259 | 100% | ||
steemhelpinghand | 0 | 13,903,524,054 | 100% | ||
deandaniel | 0 | 81,824,594,305 | 100% | ||
smartivenabin | 0 | 12,059,674,556 | 100% | ||
steemql | 0 | 1,325,127,509 | 100% | ||
elizah | 0 | 300,767,206 | 50% | ||
cryptomurph | 0 | 24,907,273,059 | 100% | ||
foxon | 0 | 10,439,095,722 | 100% | ||
m2nnari | 0 | 8,902,403,678 | 100% | ||
namuninja | 0 | 18,556,483,406 | 100% | ||
problemkind | 0 | 49,190,526,582 | 100% | ||
basic-thinking | 0 | 250,142,437 | 50% | ||
sawyn | 0 | 10,517,715,276 | 100% | ||
madtv | 0 | 20,294,755,516 | 100% | ||
amrishraj | 0 | 44,608,685,810 | 100% | ||
mcnil | 0 | 232,175,204 | 50% | ||
spykakos | 0 | 61,397,249,103 | 100% | ||
melissakellie | 0 | 84,329,980,584 | 100% | ||
meher04 | 0 | 11,038,834,985 | 100% | ||
jonalynurcales | 0 | 241,580,566 | 50% | ||
steemitpowerupph | 0 | 44,829,868,989 | 100% | ||
stay4true | 0 | 54,806,054,939 | 100% | ||
uche-nna | 0 | 41,822,203,780 | 100% | ||
justinmullet | 0 | 27,146,208,472 | 100% | ||
bjgeese | 0 | 96,270,438,215 | 100% | ||
wildlocusthoney | 0 | 958,838,031 | 50% | ||
steemprotect | 0 | 4,228,111,744 | 4% | ||
nante | 0 | 4,665,996,812 | 100% | ||
risobap | 0 | 35,625,058,242 | 100% | ||
badnews | 0 | 30,255,298,985 | 100% | ||
xperiment | 0 | 2,070,291,323 | 100% | ||
altrosa | 0 | 38,237,866,049 | 100% | ||
gabbynhice | 0 | 117,340,452,356 | 100% | ||
ozkdawg | 0 | 0 | 50% | ||
ghscollective | 0 | 24,452,917,226 | 100% | ||
xperiment1 | 0 | 1,229,757,729 | 50% | ||
laissez-faire | 0 | 60,119,370 | 100% | ||
hadean | 0 | 110,322,494,763 | 100% | ||
steemscan | 0 | 1,240,231,154 | 25% | ||
sirbruce92 | 0 | 26,049,735,924 | 100% | ||
liuzhixiang | 0 | 596,541,040 | 16.67% | ||
liucixin | 0 | 594,760,675 | 8.89% | ||
cryptographix | 0 | 98,675,761,358 | 100% | ||
compo | 0 | 16,743,181,881 | 100% | ||
mprgraffix | 0 | 14,306,247,018 | 100% | ||
dftba | 0 | 280,490,935 | 50% | ||
devann | 0 | 399,108,369,516 | 100% | ||
steemexpress | 0 | 1,742,743,573 | 3.03% | ||
wiseman91 | 0 | 698,645,918 | 100% | ||
myeconomy | 0 | 29,042,655,527 | 100% | ||
nothus | 0 | 96,045,176,216 | 100% | ||
steemtank | 0 | 366,296,956,718 | 15.32% | ||
ascorphat | 0 | 49,937,803 | 2.5% | ||
satoshiranch | 0 | 21,896,501,517 | 100% | ||
steemcartel | 0 | 23,723,480,498 | 100% | ||
bookkeeping | 0 | 17,347,354,874 | 81.07% | ||
windenchanter | 0 | 0 | 100% | ||
templo.pay | 0 | 115,843,493,802 | 100% | ||
kevinmolina | 0 | 0 | 100% |
Congratulations @stmdev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@stmdev/voted.png?201905302147"></td><td>You received more than 2000 upvotes. Your next target is to reach 3000 upvotes.</td></tr> </table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@stmdev) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=stmdev)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
author | steemitboard |
---|---|
permlink | steemitboard-notify-stmdev-20190530t225941000z |
category | python |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2019-05-30 22:59:39 |
last_update | 2019-05-30 22:59:39 |
depth | 1 |
children | 0 |
last_payout | 2019-06-06 22:59:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 836 |
author_reputation | 38,975,615,169,260 |
root_title | "Finding the number of authors/voters/... per day with Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 85,775,895 |
net_rshares | 0 |
This is very useful. Thank you for sharing! Posted using [Partiko Android](https://partiko.app/referral/windenchanter)
author | windenchanter |
---|---|
permlink | windenchanter-re-stmdev-finding-the-number-of-authors-voters-per-day-with-python-20190708t033705154z |
category | python |
json_metadata | {"app":"partiko","client":"android"} |
created | 2019-07-08 03:37:06 |
last_update | 2019-07-08 03:37:06 |
depth | 1 |
children | 0 |
last_payout | 2019-07-15 03:37:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 119 |
author_reputation | 1,892,764,897,686 |
root_title | "Finding the number of authors/voters/... per day with Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 87,975,737 |
net_rshares | 0 |