   fs.writeFileSync "data/parsed/files-blocks.json", JSON.stringify(fileBlocks)
 
   libcsv = "url,count\n"
+  libs = []
   Object.keys(libHash).forEach (lib) ->
-    libcsv += lib + "," + libHash[lib] + "\n"
+    libs.push( { lib: lib, count: libHash[lib] })
+  libs.sort (a,b) -> return b.count - a.count
+  libs.forEach (l) ->
+    libcsv += l.lib + "," + l.count + "\n"
   fs.writeFileSync("data/parsed/libs.csv", libcsv)
 
   modulescsv = "module,count\n"
-  Object.keys(moduleHash).forEach (module) ->
-    modulescsv += module + "," + moduleHash[module] + "\n"
+  modules = []
+  Object.keys(moduleHash).forEach (m) ->
+    modules.push( {module: m, count: moduleHash[m] })
+  modules.sort (a,b) -> return b.count - a.count
+  modules.forEach (m) ->
+    modulescsv += m.module + "," + m.count + "\n"
   fs.writeFileSync("data/parsed/modules.csv", modulescsv)
 
   console.log "err", err if err

  return 0


i = 0
gistParser = (gist, gistCb) ->
  #console.log "NOT RETURNING", gist.id, singleId
  i++

  scripts = parseScriptTags(code)
  scripts.forEach (script) ->
    #console.log script
    libHash[script] = 0 unless libHash[script]
    libHash[script]++
  return scripts.length

parseD3Version = (code) ->
  scripts = parseScriptTags(code)
