Blog info graphic

From Kyle's Wiki
Jump to: navigation, search

variables:

numberofnodes
scale 
dbhost
dbuser
dbpass
db
prefix
api_key = select wordpress_api_key from $prefix_options
blog_id = select stats_options from $prefix_options, look for "blog_id";i:5172051;

Get the stats

https://stats.wordpress.com/csv.php?api_key=&blog_id=&table=postviews&days=30&summarize

For each postid, get:

  • Permalink (select post_name from wp_posts where postid= bla), link is /%year%/%monthnum%/%day%/%postname%/
  • Total Comments (count rows in wp_comments where postid = bla)
  • Date Posted (select post_date from wp_posts where postid= bla)
  • First few words of the post (select post_content from wp_posts where postid=bla)

Total Them

for all the nodes:

  • Take the top 7?
  • Get the max and min views
  • Get the max and min comments

Generate Nodes

Date                Circle: Radius proportional to the Hits,
Title                       inner radius proportional to the comments
First dozen words
Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta