diff --git a/README b/README new file mode 100644 index 0000000..b553354 --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +This is a visualization of the Linked Open Data cloud using the ProtoVis +JavaScript library. The underlying data is generated by talking to the +Comprehensive Knowledge Archive Network (CKAN) API. + +To generate the lod.js data file you should be able to run ckan.py: + + ./ckan.py > lod.js + +It can take a few minutes to run, so go make yourself a cup of tea while +it's running. After that you should be able to load index.html in +your browser. + +Ed Summers +ehs@pobox.com + diff --git a/ckan.py b/ckan.py new file mode 100755 index 0000000..9b70d9e --- /dev/null +++ b/ckan.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python + +""" +This is a little script that will pull down all the package information +for packages in the lodcloud group on CKAN, and write out JSON dataset +for ProtoVis. +""" + +import sys +import json +import urllib +import logging + + +LOG_FILE = "ckan.log" +LOG_LEVEL = logging.INFO + + +def main(argv): + logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL) + packages = lod_packages() + protovis = protovis_json(packages) + print "var lod = " + json.dumps(protovis, indent=2) + + +def lod_packages(): + log = logging.getLogger() + packages = [] + count = 0 + for package in ckan('group/lodcloud')['packages']: + package_info = ckan('package/%s' % package) + package_info['internal_id'] = count + packages.append(package_info) + log.info("got info for %s" % package_info['name']) + count += 1 + return packages + + +def protovis_json(packages): + protovis = {'nodes': get_nodes(packages), + 'links': get_links(packages)} + return protovis + + +def get_nodes(packages): + nodes = [] + for package in packages: + if package['ratings_average'] == None: + rating = 0 + else: + rating = int(round(float(package['ratings_average']))) + nodes.append({ + 'rating': rating, + 'nodeName': package['title']}) + return nodes + + +def get_links(packages): + log = logging.getLogger() + + # first get a dictionary lookup for all the packages by name + package_map = {} + for package in packages: + package_map[package['name']] = package + + # now generate links based on the numeric id of the package + links = [] + for from_package in packages: + for key in from_package['extras']: + if key.startswith('links:'): + to_package_name = key.split(':')[1] + if not package_map.has_key(to_package_name): + log.error("%s has link to %s which doesn't exist" % \ + (from_package['name'], to_package_name)) + continue + links.append({ + 'source': from_package['internal_id'], + 'target': package_map[to_package_name]['internal_id']}) + return links + + +def ckan(path): + j = urllib.urlopen('http://ckan.net/api/rest/' + path).read() + return json.loads(j) + + +def configure_logging(): + logging.basicConfig() + logger = logging.getLogger() + logger.setLevel(logging.INFO) + handler = logging.FileHandler(log_file) + formatter = logging.Formatter("""[%(asctime)s %(levelname)s %(name)s] %(message)s""") + handler.setFormatter(formatter) + logger.addHandler(handler) + + +if __name__ == "__main__": + main(sys.argv) diff --git a/index.html b/index.html new file mode 100644 index 0000000..3f132fe --- /dev/null +++ b/index.html @@ -0,0 +1,67 @@ + + + + Linked Open Data Touchgraph + + + + +

Linked Open Data Touchgraph

+
+
+

+ This is a touchgraph version of the + Linked Open Data Cloud. + It is based on the same underlying data using the + Comprehensive Knowledge Archive Network (CKAN) + API + to pull all the packages in the the + lodcloud group. + If your screen goes crazy cross your fingers and try to + reload the page a couple times. The colors reflect the + CKAN rating: (0, + 1, + 2, + 3, + 4, + 5) + More about how this graph was + generated can be found on + Github. + Comments/questions welcome at + ehs@pobox.com. +

+
+
+ +
+
+
+
+
+ + diff --git a/lod.html b/lod.html new file mode 100644 index 0000000..b5cd214 --- /dev/null +++ b/lod.html @@ -0,0 +1,64 @@ + + + Force-Directed Layout + + + + + + + + diff --git a/lod.js b/lod.js new file mode 100644 index 0000000..f5149f0 --- /dev/null +++ b/lod.js @@ -0,0 +1,4590 @@ +var lod = { + "nodes": [ + { + "rating": 4, + "nodeName": "2000 U.S. Census" + }, + { + "rating": 0, + "nodeName": "BBC Music" + }, + { + "rating": 0, + "nodeName": "BBC Programmes" + }, + { + "rating": 2, + "nodeName": "BBC Wildlife Finder" + }, + { + "rating": 5, + "nodeName": "BibBase" + }, + { + "rating": 0, + "nodeName": "Affymetrix" + }, + { + "rating": 0, + "nodeName": "CAS" + }, + { + "rating": 0, + "nodeName": "ChEBI" + }, + { + "rating": 0, + "nodeName": "GenBank" + }, + { + "rating": 0, + "nodeName": "GeneID" + }, + { + "rating": 0, + "nodeName": "Gene Ontology" + }, + { + "rating": 0, + "nodeName": "HGNC" + }, + { + "rating": 0, + "nodeName": "HomoloGene" + }, + { + "rating": 0, + "nodeName": "InterPro" + }, + { + "rating": 0, + "nodeName": "KEGG Compound" + }, + { + "rating": 0, + "nodeName": "KEGG Drug" + }, + { + "rating": 0, + "nodeName": "KEGG Enzyme" + }, + { + "rating": 0, + "nodeName": "KEGG Glycan" + }, + { + "rating": 0, + "nodeName": "KEGG Pathway" + }, + { + "rating": 0, + "nodeName": "KEGG Reaction" + }, + { + "rating": 0, + "nodeName": "Mouse Genome Database (MGD) from Mouse Genome Informatics (MGI)" + }, + { + "rating": 0, + "nodeName": "OBO" + }, + { + "rating": 0, + "nodeName": "OMIM" + }, + { + "rating": 0, + "nodeName": "PDB" + }, + { + "rating": 0, + "nodeName": "Pfam" + }, + { + "rating": 0, + "nodeName": "ProDom" + }, + { + "rating": 0, + "nodeName": "PROSITE" + }, + { + "rating": 0, + "nodeName": "PubChem" + }, + { + "rating": 0, + "nodeName": "PubMed" + }, + { + "rating": 0, + "nodeName": "Reactome" + }, + { + "rating": 0, + "nodeName": "Saccharomyces Genome Database" + }, + { + "rating": 0, + "nodeName": "UniProtKB" + }, + { + "rating": 0, + "nodeName": "UniProtKB Taxonomy" + }, + { + "rating": 0, + "nodeName": "UniParc" + }, + { + "rating": 0, + "nodeName": "UniProt UniPathway" + }, + { + "rating": 0, + "nodeName": "UniProt UniRef" + }, + { + "rating": 0, + "nodeName": "UniSTS" + }, + { + "rating": 0, + "nodeName": "business.data.gov.uk" + }, + { + "rating": 5, + "nodeName": "Chem2Bio2RDF" + }, + { + "rating": 0, + "nodeName": "Chronicling America API" + }, + { + "rating": 0, + "nodeName": "Cornetto" + }, + { + "rating": 0, + "nodeName": "Data.gov" + }, + { + "rating": 0, + "nodeName": "Linked Data for Intervals" + }, + { + "rating": 0, + "nodeName": "Climb Dataincubator" + }, + { + "rating": 0, + "nodeName": "Discogs in RDF" + }, + { + "rating": 0, + "nodeName": "Moseley Folk Festival Data" + }, + { + "rating": 1, + "nodeName": "Data Incubator: MusicBrainz" + }, + { + "rating": 4, + "nodeName": "NASA Space Flight & Astronaut data in RDF" + }, + { + "rating": 5, + "nodeName": "Airport data from Our Airports published as RDF" + }, + { + "rating": 0, + "nodeName": "Pokedex data in RDF" + }, + { + "rating": 2, + "nodeName": "DBpedia" + }, + { + "rating": 1, + "nodeName": "dbpedia lite" + }, + { + "rating": 0, + "nodeName": "DBTropes" + }, + { + "rating": 2, + "nodeName": "DBTune Artists: Last.fm" + }, + { + "rating": 0, + "nodeName": "DBTune.org AudioScrobbler RDF Service" + }, + { + "rating": 1, + "nodeName": "DBTune.org/classical" + }, + { + "rating": 3, + "nodeName": "DBTune.org John Peel sessions RDF server" + }, + { + "rating": 5, + "nodeName": "DBTune.org Magnatune RDF server" + }, + { + "rating": 3, + "nodeName": "DBTune.org Musicbrainz D2R Server" + }, + { + "rating": 0, + "nodeName": "DBTune.org MySpace RDF Service" + }, + { + "rating": 0, + "nodeName": "data.dcs" + }, + { + "rating": 0, + "nodeName": "Gemeinsame Normdatei (GND)" + }, + { + "rating": 0, + "nodeName": "School of Electronics and Computer Science, University of Southampton" + }, + { + "rating": 0, + "nodeName": "education.data.gov.uk" + }, + { + "rating": 0, + "nodeName": "EnAKTing CO2 Emission Dataset" + }, + { + "rating": 0, + "nodeName": "EnAKTing Energy Dataset" + }, + { + "rating": 0, + "nodeName": "EnAKTing Mortality Dataset" + }, + { + "rating": 0, + "nodeName": "EnAKTing NHS Dataset" + }, + { + "rating": 0, + "nodeName": "EnAKTing Population Dataset" + }, + { + "rating": 0, + "nodeName": "ESD Standards: Controlled lists for the UK public sector" + }, + { + "rating": 5, + "nodeName": "European Nature Information System" + }, + { + "rating": 0, + "nodeName": "Eurostat RDF datasets" + }, + { + "rating": 0, + "nodeName": "Edinburgh University Theatre Company Productions" + }, + { + "rating": 0, + "nodeName": "Events and Media descriptions" + }, + { + "rating": 0, + "nodeName": "FanHubz" + }, + { + "rating": 0, + "nodeName": "ChEMBL" + }, + { + "rating": 0, + "nodeName": "Fishes of Texas" + }, + { + "rating": 5, + "nodeName": "flickr\u2122 wrappr" + }, + { + "rating": 3, + "nodeName": "Freebase" + }, + { + "rating": 0, + "nodeName": "DailyMed" + }, + { + "rating": 4, + "nodeName": "DBLP Bibliography Database in RDF (FU Berlin)" + }, + { + "rating": 0, + "nodeName": "Diseasome" + }, + { + "rating": 0, + "nodeName": "DrugBank" + }, + { + "rating": 0, + "nodeName": "Eurostat in RDF (FU Berlin)" + }, + { + "rating": 0, + "nodeName": "MediCare" + }, + { + "rating": 0, + "nodeName": "Project Gutenberg in RDF (FU Berlin)" + }, + { + "rating": 0, + "nodeName": "SIDER: Side Effect Resource" + }, + { + "rating": 0, + "nodeName": "STITCH: Chemical-Protein Interactions" + }, + { + "rating": 5, + "nodeName": "Gemeenschappelijke Thesaurus Audiovisuele Archieven \u2013 Common Thesaurus Audiovisual Archives" + }, + { + "rating": 0, + "nodeName": "GeoLinkedData (.es)" + }, + { + "rating": 0, + "nodeName": "GeoNames Semantic Web " + }, + { + "rating": 3, + "nodeName": "GeoSpecies Knowledge Base" + }, + { + "rating": 5, + "nodeName": "TheSoz Thesaurus for the Social Sciences (GESIS)" + }, + { + "rating": 4, + "nodeName": "GovTrack.us U.S Congress Legislative Data" + }, + { + "rating": 3, + "nodeName": "Hungarian National Library (NSZL) catalog" + }, + { + "rating": 0, + "nodeName": "iServe: Linked Services Registry" + }, + { + "rating": 3, + "nodeName": "DBTune.org Jamendo RDF Server" + }, + { + "rating": 0, + "nodeName": "John Goodwin's Family Tree" + }, + { + "rating": 0, + "nodeName": "Linked Sensor Data (Kno.e.sis)" + }, + { + "rating": 0, + "nodeName": "DBLP in RDF (L3S)" + }, + { + "rating": 3, + "nodeName": "Library of Congress Subject Headings" + }, + { + "rating": 4, + "nodeName": "Lexvo" + }, + { + "rating": 0, + "nodeName": "LIBRIS" + }, + { + "rating": 3, + "nodeName": "Languages of the World (Multilingual RDF Descriptions)" + }, + { + "rating": 4, + "nodeName": "LinkedCT" + }, + { + "rating": 0, + "nodeName": "LinkedGeoData" + }, + { + "rating": 0, + "nodeName": "LinkedLCCN" + }, + { + "rating": 3, + "nodeName": "Linked Movie DataBase" + }, + { + "rating": 1, + "nodeName": "Linked Open Numbers" + }, + { + "rating": 4, + "nodeName": "lobid. Index of libraries and related organisations" + }, + { + "rating": 3, + "nodeName": "lobid. Bibliographic Resources" + }, + { + "rating": 0, + "nodeName": "Linking Italian University Statistics Project" + }, + { + "rating": 4, + "nodeName": "The London Gazette - Gazettes Data" + }, + { + "rating": 0, + "nodeName": "Lotico" + }, + { + "rating": 0, + "nodeName": "Manchester University Reading Lists" + }, + { + "rating": 0, + "nodeName": "MARC Codes List" + }, + { + "rating": 0, + "nodeName": "National Diet Library of Japan subject headings" + }, + { + "rating": 0, + "nodeName": "Nottingham Trent University Resource Lists" + }, + { + "rating": 4, + "nodeName": "New York Times - Linked Open Data" + }, + { + "rating": 0, + "nodeName": "OntologyCentral Eurostat Mirror" + }, + { + "rating": 0, + "nodeName": "OpenCalais" + }, + { + "rating": 5, + "nodeName": "OpenCyc" + }, + { + "rating": 0, + "nodeName": "OpenEI.org" + }, + { + "rating": 4, + "nodeName": "The Open Library" + }, + { + "rating": 4, + "nodeName": "Openly Local :: Making Local Government More Transparent" + }, + { + "rating": 5, + "nodeName": "Ordnance Survey Linked Data" + }, + { + "rating": 0, + "nodeName": "patents.data.gov.uk" + }, + { + "rating": 0, + "nodeName": "Pok\u00e9p\u00e9dia" + }, + { + "rating": 0, + "nodeName": "English Language Books listed in Printed Book Auction Catalogues from 17th Century Holland" + }, + { + "rating": 1, + "nodeName": "ProductDB" + }, + { + "rating": 0, + "nodeName": "Polythematic Structured Subject Heading System" + }, + { + "rating": 3, + "nodeName": "RDF Book Mashup" + }, + { + "rating": 0, + "nodeName": "Last.FM RDFization of Events, Artists, and Users" + }, + { + "rating": 0, + "nodeName": "RDFohloh" + }, + { + "rating": 0, + "nodeName": "Rechtspraak.nl" + }, + { + "rating": 0, + "nodeName": "reference.data.gov.uk" + }, + { + "rating": 0, + "nodeName": "research.data.gov.uk" + }, + { + "rating": 0, + "nodeName": "Revyu.com - Review Anything" + }, + { + "rating": 4, + "nodeName": "RDFizing and Interlinking the EuroStat Data Set Effort" + }, + { + "rating": 0, + "nodeName": "Association for Computing Machinery (ACM) (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Budapest University of Technology and Economics (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "CiteSeer (Research Index) (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Community R&D Information Service (CORDIS) (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Resilient Computing Courseware (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "ReSIST MSc in Resilient Computing Curriculum (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Technische Universit\u00e4t Darmstadt (RKBExplorer)" + }, + { + "rating": 4, + "nodeName": "DBLP Computer Science Bibliography (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Deep Blue (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "DEPLOY (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "dotAC (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "ePrints3 Institutional Archive Collection (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "ERA - Australian Research Council publication ratings (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Institut Eur\u00e9com (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "France Telecom Recherche et D\u00e9veloppement (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "IBM Research GmbH (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "IEEE Papers (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Universit\u00e9 Paul Sabatier - Toulouse 3 (RKB Explorer)" + }, + { + "rating": 0, + "nodeName": "UK JISC (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Korean Institute of Science Technology and Information (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "LAAS-CNRS (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "University of Newcastle upon Tyne (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "National Science Foundation (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Open Archive Initiative Harvest over OAI-PMH (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Ordnance Survey (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Universit\u00e0 di Pisa (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Research Assessment Exercise 2001 (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "ReSIST Resilience Mechanisms (RKBExplorer.com)" + }, + { + "rating": 0, + "nodeName": "RISKS Digest (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Universit\u00e0 degli studi di Roma \"La Sapienza\" (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "School of Electronics and Computer Science, University of Southampton (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "Universit\u00e4t Ulm (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "UN/LOCODE (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "ReSIST Project Wiki (RKBExplorer)" + }, + { + "rating": 0, + "nodeName": "WordNet (RKBExplorer)" + }, + { + "rating": 4, + "nodeName": "U.S. Securities and Exchange Commission Corporate Ownership RDF Data" + }, + { + "rating": 5, + "nodeName": "Semantic Web Dog Food Corpus" + }, + { + "rating": 0, + "nodeName": "semanticweb.org" + }, + { + "rating": 1, + "nodeName": "Semantic XBRL Financial Data" + }, + { + "rating": 0, + "nodeName": "Semantic CrunchBase" + }, + { + "rating": 0, + "nodeName": "Slideshare2RDF Server" + }, + { + "rating": 0, + "nodeName": "ECS Southampton EPrints" + }, + { + "rating": 0, + "nodeName": "St. Andrews University Resource Lists" + }, + { + "rating": 0, + "nodeName": "statistics.data.gov.uk" + }, + { + "rating": 3, + "nodeName": "RAMEAU subject headings (STITCH)" + }, + { + "rating": 3, + "nodeName": "STW Thesaurus for Economics" + }, + { + "rating": 0, + "nodeName": "Surge Radio" + }, + { + "rating": 3, + "nodeName": "SwetoDblp" + }, + { + "rating": 3, + "nodeName": "Thesaurus for Graphic Materials (t4gm.info)" + }, + { + "rating": 4, + "nodeName": "Open Library data mirror in the Talis Platform" + }, + { + "rating": 2, + "nodeName": "TaxonConcept Knowledge Base" + }, + { + "rating": 2, + "nodeName": "TCMGeneDIT Dataset" + }, + { + "rating": 3, + "nodeName": "Telegraphis Linked Data" + }, + { + "rating": 5, + "nodeName": "Temple ov thee Lemur" + }, + { + "rating": 0, + "nodeName": "The View From" + }, + { + "rating": 0, + "nodeName": "transport.data.gov.uk" + }, + { + "rating": 0, + "nodeName": "Twarql" + }, + { + "rating": 0, + "nodeName": "TWC: Linking Open Government Data" + }, + { + "rating": 0, + "nodeName": "Uberblic.org" + }, + { + "rating": 0, + "nodeName": "Linked Data Service der Universit\u00e4tsbibliothek Mannheim" + }, + { + "rating": 5, + "nodeName": "UK Legislation" + }, + { + "rating": 3, + "nodeName": "UK Postcodes" + }, + { + "rating": 5, + "nodeName": "UMBEL (Upper Mapping and Binding Exchange Layer)" + }, + { + "rating": 0, + "nodeName": "University of Plymouth Reading Lists" + }, + { + "rating": 0, + "nodeName": "University of Sussex Reading Lists" + }, + { + "rating": 0, + "nodeName": "URIBurner" + }, + { + "rating": 5, + "nodeName": "VIAF: The Virtual International Authority File" + }, + { + "rating": 0, + "nodeName": "VIVO Cornell" + }, + { + "rating": 5, + "nodeName": "VIVO Indiana" + }, + { + "rating": 0, + "nodeName": "VIVO University of Florida" + }, + { + "rating": 0, + "nodeName": "WordNet 3.0 (VU Amsterdam)" + }, + { + "rating": 0, + "nodeName": "WordNet 2.0 (W3C)" + }, + { + "rating": 0, + "nodeName": "World Factbook (FU Berlin)" + }, + { + "rating": 4, + "nodeName": "YAGO" + }, + { + "rating": 0, + "nodeName": "20th Century Press Archives" + }, + { + "rating": 0, + "nodeName": "MusicBrainz (zitgist.com)" + } + ], + "links": [ + { + "source": 1, + "target": 50 + }, + { + "source": 2, + "target": 50 + }, + { + "source": 2, + "target": 1 + }, + { + "source": 3, + "target": 50 + }, + { + "source": 3, + "target": 2 + }, + { + "source": 4, + "target": 175 + }, + { + "source": 4, + "target": 99 + }, + { + "source": 4, + "target": 80 + }, + { + "source": 4, + "target": 50 + }, + { + "source": 4, + "target": 155 + }, + { + "source": 5, + "target": 13 + }, + { + "source": 5, + "target": 32 + }, + { + "source": 5, + "target": 10 + }, + { + "source": 5, + "target": 30 + }, + { + "source": 5, + "target": 9 + }, + { + "source": 5, + "target": 22 + }, + { + "source": 5, + "target": 20 + }, + { + "source": 5, + "target": 8 + }, + { + "source": 5, + "target": 31 + }, + { + "source": 7, + "target": 15 + }, + { + "source": 7, + "target": 31 + }, + { + "source": 7, + "target": 14 + }, + { + "source": 7, + "target": 29 + }, + { + "source": 10, + "target": 24 + }, + { + "source": 10, + "target": 30 + }, + { + "source": 10, + "target": 31 + }, + { + "source": 10, + "target": 11 + }, + { + "source": 10, + "target": 13 + }, + { + "source": 10, + "target": 7 + }, + { + "source": 10, + "target": 20 + }, + { + "source": 10, + "target": 29 + }, + { + "source": 11, + "target": 28 + }, + { + "source": 11, + "target": 22 + }, + { + "source": 11, + "target": 16 + }, + { + "source": 11, + "target": 9 + }, + { + "source": 11, + "target": 20 + }, + { + "source": 11, + "target": 31 + }, + { + "source": 12, + "target": 9 + }, + { + "source": 14, + "target": 27 + }, + { + "source": 14, + "target": 7 + }, + { + "source": 15, + "target": 27 + }, + { + "source": 15, + "target": 7 + }, + { + "source": 16, + "target": 17 + }, + { + "source": 16, + "target": 14 + }, + { + "source": 17, + "target": 28 + }, + { + "source": 18, + "target": 15 + }, + { + "source": 18, + "target": 19 + }, + { + "source": 18, + "target": 17 + }, + { + "source": 18, + "target": 14 + }, + { + "source": 19, + "target": 16 + }, + { + "source": 19, + "target": 18 + }, + { + "source": 19, + "target": 17 + }, + { + "source": 19, + "target": 14 + }, + { + "source": 20, + "target": 10 + }, + { + "source": 20, + "target": 9 + }, + { + "source": 20, + "target": 13 + }, + { + "source": 20, + "target": 11 + }, + { + "source": 20, + "target": 31 + }, + { + "source": 21, + "target": 7 + }, + { + "source": 22, + "target": 28 + }, + { + "source": 24, + "target": 23 + }, + { + "source": 24, + "target": 26 + }, + { + "source": 25, + "target": 24 + }, + { + "source": 25, + "target": 13 + }, + { + "source": 25, + "target": 10 + }, + { + "source": 25, + "target": 26 + }, + { + "source": 26, + "target": 23 + }, + { + "source": 26, + "target": 31 + }, + { + "source": 28, + "target": 30 + }, + { + "source": 31, + "target": 25 + }, + { + "source": 31, + "target": 28 + }, + { + "source": 31, + "target": 24 + }, + { + "source": 31, + "target": 32 + }, + { + "source": 31, + "target": 10 + }, + { + "source": 31, + "target": 30 + }, + { + "source": 31, + "target": 9 + }, + { + "source": 31, + "target": 11 + }, + { + "source": 31, + "target": 29 + }, + { + "source": 31, + "target": 34 + }, + { + "source": 31, + "target": 20 + }, + { + "source": 31, + "target": 13 + }, + { + "source": 31, + "target": 26 + }, + { + "source": 33, + "target": 32 + }, + { + "source": 33, + "target": 31 + }, + { + "source": 35, + "target": 33 + }, + { + "source": 35, + "target": 31 + }, + { + "source": 35, + "target": 32 + }, + { + "source": 36, + "target": 32 + }, + { + "source": 37, + "target": 136 + }, + { + "source": 38, + "target": 28 + }, + { + "source": 38, + "target": 9 + }, + { + "source": 38, + "target": 22 + }, + { + "source": 38, + "target": 6 + }, + { + "source": 39, + "target": 103 + }, + { + "source": 39, + "target": 50 + }, + { + "source": 39, + "target": 90 + }, + { + "source": 40, + "target": 209 + }, + { + "source": 40, + "target": 210 + }, + { + "source": 43, + "target": 50 + }, + { + "source": 44, + "target": 50 + }, + { + "source": 44, + "target": 59 + }, + { + "source": 44, + "target": 1 + }, + { + "source": 45, + "target": 50 + }, + { + "source": 45, + "target": 44 + }, + { + "source": 45, + "target": 1 + }, + { + "source": 46, + "target": 50 + }, + { + "source": 46, + "target": 44 + }, + { + "source": 46, + "target": 1 + }, + { + "source": 47, + "target": 2 + }, + { + "source": 48, + "target": 50 + }, + { + "source": 49, + "target": 78 + }, + { + "source": 49, + "target": 50 + }, + { + "source": 50, + "target": 210 + }, + { + "source": 50, + "target": 211 + }, + { + "source": 50, + "target": 121 + }, + { + "source": 50, + "target": 79 + }, + { + "source": 50, + "target": 90 + }, + { + "source": 50, + "target": 0 + }, + { + "source": 50, + "target": 194 + }, + { + "source": 50, + "target": 199 + }, + { + "source": 50, + "target": 86 + }, + { + "source": 50, + "target": 80 + }, + { + "source": 50, + "target": 77 + }, + { + "source": 50, + "target": 105 + }, + { + "source": 50, + "target": 85 + }, + { + "source": 50, + "target": 58 + }, + { + "source": 50, + "target": 118 + }, + { + "source": 50, + "target": 81 + }, + { + "source": 50, + "target": 83 + }, + { + "source": 50, + "target": 212 + }, + { + "source": 50, + "target": 78 + }, + { + "source": 50, + "target": 135 + }, + { + "source": 50, + "target": 137 + }, + { + "source": 50, + "target": 190 + }, + { + "source": 50, + "target": 63 + }, + { + "source": 50, + "target": 82 + }, + { + "source": 50, + "target": 131 + }, + { + "source": 51, + "target": 78 + }, + { + "source": 51, + "target": 50 + }, + { + "source": 52, + "target": 50 + }, + { + "source": 53, + "target": 58 + }, + { + "source": 53, + "target": 1 + }, + { + "source": 54, + "target": 214 + }, + { + "source": 55, + "target": 50 + }, + { + "source": 55, + "target": 58 + }, + { + "source": 55, + "target": 1 + }, + { + "source": 56, + "target": 50 + }, + { + "source": 57, + "target": 50 + }, + { + "source": 58, + "target": 103 + }, + { + "source": 58, + "target": 50 + }, + { + "source": 58, + "target": 59 + }, + { + "source": 59, + "target": 90 + }, + { + "source": 60, + "target": 80 + }, + { + "source": 61, + "target": 205 + }, + { + "source": 61, + "target": 183 + }, + { + "source": 61, + "target": 100 + }, + { + "source": 61, + "target": 50 + }, + { + "source": 63, + "target": 50 + }, + { + "source": 63, + "target": 136 + }, + { + "source": 63, + "target": 182 + }, + { + "source": 64, + "target": 125 + }, + { + "source": 65, + "target": 125 + }, + { + "source": 66, + "target": 125 + }, + { + "source": 66, + "target": 50 + }, + { + "source": 67, + "target": 125 + }, + { + "source": 68, + "target": 125 + }, + { + "source": 69, + "target": 199 + }, + { + "source": 69, + "target": 50 + }, + { + "source": 70, + "target": 50 + }, + { + "source": 70, + "target": 91 + }, + { + "source": 71, + "target": 191 + }, + { + "source": 71, + "target": 90 + }, + { + "source": 71, + "target": 83 + }, + { + "source": 72, + "target": 50 + }, + { + "source": 72, + "target": 2 + }, + { + "source": 73, + "target": 50 + }, + { + "source": 73, + "target": 90 + }, + { + "source": 73, + "target": 77 + }, + { + "source": 74, + "target": 2 + }, + { + "source": 76, + "target": 189 + }, + { + "source": 76, + "target": 50 + }, + { + "source": 77, + "target": 50 + }, + { + "source": 78, + "target": 118 + }, + { + "source": 78, + "target": 1 + }, + { + "source": 78, + "target": 174 + }, + { + "source": 78, + "target": 91 + }, + { + "source": 78, + "target": 50 + }, + { + "source": 79, + "target": 190 + }, + { + "source": 79, + "target": 81 + }, + { + "source": 79, + "target": 86 + }, + { + "source": 79, + "target": 82 + }, + { + "source": 79, + "target": 50 + }, + { + "source": 79, + "target": 104 + }, + { + "source": 80, + "target": 50 + }, + { + "source": 80, + "target": 99 + }, + { + "source": 81, + "target": 190 + }, + { + "source": 81, + "target": 22 + }, + { + "source": 81, + "target": 79 + }, + { + "source": 81, + "target": 86 + }, + { + "source": 81, + "target": 9 + }, + { + "source": 81, + "target": 82 + }, + { + "source": 81, + "target": 11 + }, + { + "source": 81, + "target": 50 + }, + { + "source": 81, + "target": 104 + }, + { + "source": 82, + "target": 190 + }, + { + "source": 82, + "target": 28 + }, + { + "source": 82, + "target": 24 + }, + { + "source": 82, + "target": 14 + }, + { + "source": 82, + "target": 79 + }, + { + "source": 82, + "target": 31 + }, + { + "source": 82, + "target": 23 + }, + { + "source": 82, + "target": 6 + }, + { + "source": 82, + "target": 11 + }, + { + "source": 82, + "target": 50 + }, + { + "source": 82, + "target": 7 + }, + { + "source": 82, + "target": 104 + }, + { + "source": 83, + "target": 119 + }, + { + "source": 83, + "target": 50 + }, + { + "source": 83, + "target": 71 + }, + { + "source": 84, + "target": 79 + }, + { + "source": 84, + "target": 82 + }, + { + "source": 86, + "target": 50 + }, + { + "source": 86, + "target": 190 + }, + { + "source": 86, + "target": 81 + }, + { + "source": 86, + "target": 79 + }, + { + "source": 86, + "target": 82 + }, + { + "source": 86, + "target": 87 + }, + { + "source": 87, + "target": 27 + }, + { + "source": 87, + "target": 50 + }, + { + "source": 87, + "target": 7 + }, + { + "source": 88, + "target": 50 + }, + { + "source": 89, + "target": 50 + }, + { + "source": 89, + "target": 90 + }, + { + "source": 91, + "target": 32 + }, + { + "source": 91, + "target": 201 + }, + { + "source": 91, + "target": 121 + }, + { + "source": 91, + "target": 78 + }, + { + "source": 91, + "target": 90 + }, + { + "source": 91, + "target": 50 + }, + { + "source": 91, + "target": 31 + }, + { + "source": 92, + "target": 184 + }, + { + "source": 93, + "target": 50 + }, + { + "source": 94, + "target": 50 + }, + { + "source": 95, + "target": 137 + }, + { + "source": 96, + "target": 214 + }, + { + "source": 96, + "target": 90 + }, + { + "source": 97, + "target": 50 + }, + { + "source": 98, + "target": 90 + }, + { + "source": 100, + "target": 183 + }, + { + "source": 101, + "target": 103 + }, + { + "source": 101, + "target": 50 + }, + { + "source": 101, + "target": 212 + }, + { + "source": 102, + "target": 50 + }, + { + "source": 102, + "target": 100 + }, + { + "source": 103, + "target": 101 + }, + { + "source": 103, + "target": 50 + }, + { + "source": 103, + "target": 201 + }, + { + "source": 103, + "target": 58 + }, + { + "source": 104, + "target": 190 + }, + { + "source": 104, + "target": 81 + }, + { + "source": 104, + "target": 28 + }, + { + "source": 104, + "target": 79 + }, + { + "source": 104, + "target": 90 + }, + { + "source": 104, + "target": 82 + }, + { + "source": 104, + "target": 50 + }, + { + "source": 105, + "target": 50 + }, + { + "source": 106, + "target": 107 + }, + { + "source": 106, + "target": 115 + }, + { + "source": 106, + "target": 205 + }, + { + "source": 106, + "target": 123 + }, + { + "source": 106, + "target": 50 + }, + { + "source": 106, + "target": 58 + }, + { + "source": 107, + "target": 212 + }, + { + "source": 107, + "target": 103 + }, + { + "source": 107, + "target": 90 + }, + { + "source": 107, + "target": 77 + }, + { + "source": 107, + "target": 131 + }, + { + "source": 107, + "target": 50 + }, + { + "source": 107, + "target": 58 + }, + { + "source": 108, + "target": 50 + }, + { + "source": 110, + "target": 109 + }, + { + "source": 110, + "target": 61 + }, + { + "source": 111, + "target": 90 + }, + { + "source": 113, + "target": 50 + }, + { + "source": 114, + "target": 123 + }, + { + "source": 115, + "target": 103 + }, + { + "source": 115, + "target": 90 + }, + { + "source": 115, + "target": 100 + }, + { + "source": 115, + "target": 50 + }, + { + "source": 116, + "target": 100 + }, + { + "source": 117, + "target": 123 + }, + { + "source": 118, + "target": 78 + }, + { + "source": 118, + "target": 50 + }, + { + "source": 118, + "target": 90 + }, + { + "source": 119, + "target": 50 + }, + { + "source": 120, + "target": 78 + }, + { + "source": 120, + "target": 107 + }, + { + "source": 120, + "target": 50 + }, + { + "source": 120, + "target": 90 + }, + { + "source": 122, + "target": 50 + }, + { + "source": 122, + "target": 90 + }, + { + "source": 124, + "target": 50 + }, + { + "source": 124, + "target": 125 + }, + { + "source": 124, + "target": 182 + }, + { + "source": 126, + "target": 136 + }, + { + "source": 127, + "target": 50 + }, + { + "source": 127, + "target": 49 + }, + { + "source": 128, + "target": 50 + }, + { + "source": 129, + "target": 50 + }, + { + "source": 130, + "target": 50 + }, + { + "source": 130, + "target": 100 + }, + { + "source": 131, + "target": 137 + }, + { + "source": 131, + "target": 80 + }, + { + "source": 132, + "target": 50 + }, + { + "source": 132, + "target": 53 + }, + { + "source": 132, + "target": 1 + }, + { + "source": 133, + "target": 50 + }, + { + "source": 134, + "target": 50 + }, + { + "source": 134, + "target": 90 + }, + { + "source": 135, + "target": 50 + }, + { + "source": 135, + "target": 42 + }, + { + "source": 135, + "target": 112 + }, + { + "source": 136, + "target": 50 + }, + { + "source": 136, + "target": 37 + }, + { + "source": 136, + "target": 182 + }, + { + "source": 136, + "target": 63 + }, + { + "source": 137, + "target": 50 + }, + { + "source": 138, + "target": 90 + }, + { + "source": 139, + "target": 162 + }, + { + "source": 139, + "target": 141 + }, + { + "source": 139, + "target": 140 + }, + { + "source": 139, + "target": 169 + }, + { + "source": 139, + "target": 165 + }, + { + "source": 139, + "target": 156 + }, + { + "source": 139, + "target": 152 + }, + { + "source": 139, + "target": 175 + }, + { + "source": 139, + "target": 167 + }, + { + "source": 139, + "target": 160 + }, + { + "source": 139, + "target": 50 + }, + { + "source": 139, + "target": 161 + }, + { + "source": 139, + "target": 144 + }, + { + "source": 139, + "target": 146 + }, + { + "source": 139, + "target": 172 + }, + { + "source": 139, + "target": 143 + }, + { + "source": 139, + "target": 158 + }, + { + "source": 139, + "target": 154 + }, + { + "source": 139, + "target": 170 + }, + { + "source": 139, + "target": 149 + }, + { + "source": 139, + "target": 147 + }, + { + "source": 139, + "target": 168 + }, + { + "source": 139, + "target": 164 + }, + { + "source": 139, + "target": 166 + }, + { + "source": 139, + "target": 150 + }, + { + "source": 139, + "target": 153 + }, + { + "source": 139, + "target": 159 + }, + { + "source": 139, + "target": 142 + }, + { + "source": 139, + "target": 155 + }, + { + "source": 140, + "target": 162 + }, + { + "source": 140, + "target": 141 + }, + { + "source": 140, + "target": 169 + }, + { + "source": 140, + "target": 165 + }, + { + "source": 140, + "target": 156 + }, + { + "source": 140, + "target": 139 + }, + { + "source": 140, + "target": 152 + }, + { + "source": 140, + "target": 160 + }, + { + "source": 140, + "target": 146 + }, + { + "source": 140, + "target": 150 + }, + { + "source": 140, + "target": 172 + }, + { + "source": 140, + "target": 143 + }, + { + "source": 140, + "target": 158 + }, + { + "source": 140, + "target": 168 + }, + { + "source": 140, + "target": 164 + }, + { + "source": 140, + "target": 148 + }, + { + "source": 140, + "target": 166 + }, + { + "source": 140, + "target": 142 + }, + { + "source": 140, + "target": 153 + }, + { + "source": 141, + "target": 162 + }, + { + "source": 141, + "target": 140 + }, + { + "source": 141, + "target": 169 + }, + { + "source": 141, + "target": 165 + }, + { + "source": 141, + "target": 156 + }, + { + "source": 141, + "target": 139 + }, + { + "source": 141, + "target": 152 + }, + { + "source": 141, + "target": 167 + }, + { + "source": 141, + "target": 160 + }, + { + "source": 141, + "target": 50 + }, + { + "source": 141, + "target": 161 + }, + { + "source": 141, + "target": 144 + }, + { + "source": 141, + "target": 146 + }, + { + "source": 141, + "target": 150 + }, + { + "source": 141, + "target": 172 + }, + { + "source": 141, + "target": 143 + }, + { + "source": 141, + "target": 158 + }, + { + "source": 141, + "target": 154 + }, + { + "source": 141, + "target": 170 + }, + { + "source": 141, + "target": 149 + }, + { + "source": 141, + "target": 168 + }, + { + "source": 141, + "target": 164 + }, + { + "source": 141, + "target": 148 + }, + { + "source": 141, + "target": 166 + }, + { + "source": 141, + "target": 159 + }, + { + "source": 141, + "target": 155 + }, + { + "source": 142, + "target": 141 + }, + { + "source": 142, + "target": 140 + }, + { + "source": 142, + "target": 169 + }, + { + "source": 142, + "target": 165 + }, + { + "source": 142, + "target": 156 + }, + { + "source": 142, + "target": 139 + }, + { + "source": 142, + "target": 175 + }, + { + "source": 142, + "target": 157 + }, + { + "source": 142, + "target": 160 + }, + { + "source": 142, + "target": 50 + }, + { + "source": 142, + "target": 161 + }, + { + "source": 142, + "target": 144 + }, + { + "source": 142, + "target": 150 + }, + { + "source": 142, + "target": 146 + }, + { + "source": 142, + "target": 172 + }, + { + "source": 142, + "target": 143 + }, + { + "source": 142, + "target": 158 + }, + { + "source": 142, + "target": 147 + }, + { + "source": 142, + "target": 159 + }, + { + "source": 143, + "target": 162 + }, + { + "source": 143, + "target": 141 + }, + { + "source": 143, + "target": 159 + }, + { + "source": 143, + "target": 140 + }, + { + "source": 143, + "target": 149 + }, + { + "source": 143, + "target": 169 + }, + { + "source": 143, + "target": 150 + }, + { + "source": 143, + "target": 146 + }, + { + "source": 143, + "target": 165 + }, + { + "source": 143, + "target": 156 + }, + { + "source": 143, + "target": 173 + }, + { + "source": 143, + "target": 160 + }, + { + "source": 143, + "target": 139 + }, + { + "source": 143, + "target": 50 + }, + { + "source": 143, + "target": 142 + }, + { + "source": 143, + "target": 144 + }, + { + "source": 144, + "target": 162 + }, + { + "source": 144, + "target": 141 + }, + { + "source": 144, + "target": 139 + }, + { + "source": 144, + "target": 149 + }, + { + "source": 144, + "target": 169 + }, + { + "source": 144, + "target": 150 + }, + { + "source": 144, + "target": 146 + }, + { + "source": 144, + "target": 172 + }, + { + "source": 144, + "target": 165 + }, + { + "source": 144, + "target": 156 + }, + { + "source": 144, + "target": 160 + }, + { + "source": 144, + "target": 143 + }, + { + "source": 144, + "target": 159 + }, + { + "source": 144, + "target": 161 + }, + { + "source": 144, + "target": 158 + }, + { + "source": 144, + "target": 155 + }, + { + "source": 144, + "target": 142 + }, + { + "source": 145, + "target": 172 + }, + { + "source": 146, + "target": 162 + }, + { + "source": 146, + "target": 141 + }, + { + "source": 146, + "target": 140 + }, + { + "source": 146, + "target": 169 + }, + { + "source": 146, + "target": 165 + }, + { + "source": 146, + "target": 156 + }, + { + "source": 146, + "target": 139 + }, + { + "source": 146, + "target": 152 + }, + { + "source": 146, + "target": 175 + }, + { + "source": 146, + "target": 167 + }, + { + "source": 146, + "target": 160 + }, + { + "source": 146, + "target": 50 + }, + { + "source": 146, + "target": 161 + }, + { + "source": 146, + "target": 144 + }, + { + "source": 146, + "target": 150 + }, + { + "source": 146, + "target": 172 + }, + { + "source": 146, + "target": 143 + }, + { + "source": 146, + "target": 158 + }, + { + "source": 146, + "target": 154 + }, + { + "source": 146, + "target": 170 + }, + { + "source": 146, + "target": 149 + }, + { + "source": 146, + "target": 147 + }, + { + "source": 146, + "target": 168 + }, + { + "source": 146, + "target": 164 + }, + { + "source": 146, + "target": 148 + }, + { + "source": 146, + "target": 166 + }, + { + "source": 146, + "target": 99 + }, + { + "source": 146, + "target": 153 + }, + { + "source": 146, + "target": 159 + }, + { + "source": 146, + "target": 142 + }, + { + "source": 146, + "target": 155 + }, + { + "source": 147, + "target": 139 + }, + { + "source": 147, + "target": 146 + }, + { + "source": 147, + "target": 150 + }, + { + "source": 147, + "target": 172 + }, + { + "source": 147, + "target": 165 + }, + { + "source": 147, + "target": 142 + }, + { + "source": 148, + "target": 162 + }, + { + "source": 148, + "target": 141 + }, + { + "source": 148, + "target": 140 + }, + { + "source": 148, + "target": 149 + }, + { + "source": 148, + "target": 169 + }, + { + "source": 148, + "target": 150 + }, + { + "source": 148, + "target": 146 + }, + { + "source": 148, + "target": 172 + }, + { + "source": 148, + "target": 165 + }, + { + "source": 148, + "target": 160 + }, + { + "source": 148, + "target": 139 + }, + { + "source": 150, + "target": 162 + }, + { + "source": 150, + "target": 141 + }, + { + "source": 150, + "target": 140 + }, + { + "source": 150, + "target": 169 + }, + { + "source": 150, + "target": 165 + }, + { + "source": 150, + "target": 156 + }, + { + "source": 150, + "target": 139 + }, + { + "source": 150, + "target": 152 + }, + { + "source": 150, + "target": 157 + }, + { + "source": 150, + "target": 167 + }, + { + "source": 150, + "target": 160 + }, + { + "source": 150, + "target": 161 + }, + { + "source": 150, + "target": 144 + }, + { + "source": 150, + "target": 146 + }, + { + "source": 150, + "target": 172 + }, + { + "source": 150, + "target": 143 + }, + { + "source": 150, + "target": 158 + }, + { + "source": 150, + "target": 154 + }, + { + "source": 150, + "target": 170 + }, + { + "source": 150, + "target": 149 + }, + { + "source": 150, + "target": 147 + }, + { + "source": 150, + "target": 168 + }, + { + "source": 150, + "target": 164 + }, + { + "source": 150, + "target": 148 + }, + { + "source": 150, + "target": 166 + }, + { + "source": 150, + "target": 153 + }, + { + "source": 150, + "target": 159 + }, + { + "source": 150, + "target": 142 + }, + { + "source": 150, + "target": 155 + }, + { + "source": 151, + "target": 50 + }, + { + "source": 152, + "target": 162 + }, + { + "source": 152, + "target": 141 + }, + { + "source": 152, + "target": 140 + }, + { + "source": 152, + "target": 149 + }, + { + "source": 152, + "target": 150 + }, + { + "source": 152, + "target": 146 + }, + { + "source": 152, + "target": 168 + }, + { + "source": 152, + "target": 172 + }, + { + "source": 152, + "target": 139 + }, + { + "source": 152, + "target": 159 + }, + { + "source": 152, + "target": 158 + }, + { + "source": 152, + "target": 153 + }, + { + "source": 153, + "target": 152 + }, + { + "source": 153, + "target": 146 + }, + { + "source": 153, + "target": 150 + }, + { + "source": 153, + "target": 168 + }, + { + "source": 153, + "target": 140 + }, + { + "source": 153, + "target": 172 + }, + { + "source": 153, + "target": 156 + }, + { + "source": 153, + "target": 139 + }, + { + "source": 153, + "target": 158 + }, + { + "source": 154, + "target": 162 + }, + { + "source": 154, + "target": 141 + }, + { + "source": 154, + "target": 139 + }, + { + "source": 154, + "target": 149 + }, + { + "source": 154, + "target": 169 + }, + { + "source": 154, + "target": 150 + }, + { + "source": 154, + "target": 146 + }, + { + "source": 154, + "target": 166 + }, + { + "source": 154, + "target": 164 + }, + { + "source": 154, + "target": 172 + }, + { + "source": 154, + "target": 156 + }, + { + "source": 154, + "target": 165 + }, + { + "source": 154, + "target": 160 + }, + { + "source": 154, + "target": 159 + }, + { + "source": 154, + "target": 158 + }, + { + "source": 154, + "target": 155 + }, + { + "source": 155, + "target": 162 + }, + { + "source": 155, + "target": 141 + }, + { + "source": 155, + "target": 169 + }, + { + "source": 155, + "target": 165 + }, + { + "source": 155, + "target": 139 + }, + { + "source": 155, + "target": 167 + }, + { + "source": 155, + "target": 160 + }, + { + "source": 155, + "target": 161 + }, + { + "source": 155, + "target": 144 + }, + { + "source": 155, + "target": 146 + }, + { + "source": 155, + "target": 150 + }, + { + "source": 155, + "target": 172 + }, + { + "source": 155, + "target": 158 + }, + { + "source": 155, + "target": 154 + }, + { + "source": 155, + "target": 170 + }, + { + "source": 155, + "target": 149 + }, + { + "source": 155, + "target": 168 + }, + { + "source": 155, + "target": 164 + }, + { + "source": 155, + "target": 166 + }, + { + "source": 155, + "target": 159 + }, + { + "source": 156, + "target": 162 + }, + { + "source": 156, + "target": 141 + }, + { + "source": 156, + "target": 140 + }, + { + "source": 156, + "target": 169 + }, + { + "source": 156, + "target": 165 + }, + { + "source": 156, + "target": 139 + }, + { + "source": 156, + "target": 175 + }, + { + "source": 156, + "target": 160 + }, + { + "source": 156, + "target": 161 + }, + { + "source": 156, + "target": 144 + }, + { + "source": 156, + "target": 146 + }, + { + "source": 156, + "target": 150 + }, + { + "source": 156, + "target": 172 + }, + { + "source": 156, + "target": 143 + }, + { + "source": 156, + "target": 158 + }, + { + "source": 156, + "target": 154 + }, + { + "source": 156, + "target": 149 + }, + { + "source": 156, + "target": 168 + }, + { + "source": 156, + "target": 159 + }, + { + "source": 156, + "target": 142 + }, + { + "source": 156, + "target": 153 + }, + { + "source": 157, + "target": 149 + }, + { + "source": 157, + "target": 169 + }, + { + "source": 157, + "target": 150 + }, + { + "source": 157, + "target": 167 + }, + { + "source": 157, + "target": 142 + }, + { + "source": 157, + "target": 158 + }, + { + "source": 158, + "target": 162 + }, + { + "source": 158, + "target": 141 + }, + { + "source": 158, + "target": 140 + }, + { + "source": 158, + "target": 169 + }, + { + "source": 158, + "target": 165 + }, + { + "source": 158, + "target": 156 + }, + { + "source": 158, + "target": 139 + }, + { + "source": 158, + "target": 152 + }, + { + "source": 158, + "target": 175 + }, + { + "source": 158, + "target": 157 + }, + { + "source": 158, + "target": 160 + }, + { + "source": 158, + "target": 144 + }, + { + "source": 158, + "target": 146 + }, + { + "source": 158, + "target": 150 + }, + { + "source": 158, + "target": 172 + }, + { + "source": 158, + "target": 154 + }, + { + "source": 158, + "target": 170 + }, + { + "source": 158, + "target": 149 + }, + { + "source": 158, + "target": 168 + }, + { + "source": 158, + "target": 164 + }, + { + "source": 158, + "target": 166 + }, + { + "source": 158, + "target": 153 + }, + { + "source": 158, + "target": 159 + }, + { + "source": 158, + "target": 142 + }, + { + "source": 158, + "target": 155 + }, + { + "source": 159, + "target": 162 + }, + { + "source": 159, + "target": 141 + }, + { + "source": 159, + "target": 140 + }, + { + "source": 159, + "target": 169 + }, + { + "source": 159, + "target": 165 + }, + { + "source": 159, + "target": 156 + }, + { + "source": 159, + "target": 139 + }, + { + "source": 159, + "target": 152 + }, + { + "source": 159, + "target": 160 + }, + { + "source": 159, + "target": 144 + }, + { + "source": 159, + "target": 146 + }, + { + "source": 159, + "target": 150 + }, + { + "source": 159, + "target": 172 + }, + { + "source": 159, + "target": 143 + }, + { + "source": 159, + "target": 158 + }, + { + "source": 159, + "target": 154 + }, + { + "source": 159, + "target": 170 + }, + { + "source": 159, + "target": 149 + }, + { + "source": 159, + "target": 168 + }, + { + "source": 159, + "target": 164 + }, + { + "source": 159, + "target": 166 + }, + { + "source": 159, + "target": 142 + }, + { + "source": 159, + "target": 155 + }, + { + "source": 160, + "target": 162 + }, + { + "source": 160, + "target": 141 + }, + { + "source": 160, + "target": 140 + }, + { + "source": 160, + "target": 169 + }, + { + "source": 160, + "target": 165 + }, + { + "source": 160, + "target": 156 + }, + { + "source": 160, + "target": 139 + }, + { + "source": 160, + "target": 161 + }, + { + "source": 160, + "target": 144 + }, + { + "source": 160, + "target": 146 + }, + { + "source": 160, + "target": 172 + }, + { + "source": 160, + "target": 143 + }, + { + "source": 160, + "target": 158 + }, + { + "source": 160, + "target": 154 + }, + { + "source": 160, + "target": 170 + }, + { + "source": 160, + "target": 149 + }, + { + "source": 160, + "target": 168 + }, + { + "source": 160, + "target": 164 + }, + { + "source": 160, + "target": 148 + }, + { + "source": 160, + "target": 166 + }, + { + "source": 160, + "target": 150 + }, + { + "source": 160, + "target": 159 + }, + { + "source": 160, + "target": 142 + }, + { + "source": 160, + "target": 155 + }, + { + "source": 161, + "target": 141 + }, + { + "source": 161, + "target": 169 + }, + { + "source": 161, + "target": 150 + }, + { + "source": 161, + "target": 146 + }, + { + "source": 161, + "target": 172 + }, + { + "source": 161, + "target": 165 + }, + { + "source": 161, + "target": 139 + }, + { + "source": 161, + "target": 156 + }, + { + "source": 161, + "target": 160 + }, + { + "source": 161, + "target": 50 + }, + { + "source": 161, + "target": 142 + }, + { + "source": 161, + "target": 144 + }, + { + "source": 163, + "target": 50 + }, + { + "source": 163, + "target": 171 + }, + { + "source": 164, + "target": 162 + }, + { + "source": 164, + "target": 170 + }, + { + "source": 164, + "target": 141 + }, + { + "source": 164, + "target": 140 + }, + { + "source": 164, + "target": 169 + }, + { + "source": 164, + "target": 146 + }, + { + "source": 164, + "target": 150 + }, + { + "source": 164, + "target": 172 + }, + { + "source": 164, + "target": 166 + }, + { + "source": 164, + "target": 165 + }, + { + "source": 164, + "target": 160 + }, + { + "source": 164, + "target": 139 + }, + { + "source": 164, + "target": 159 + }, + { + "source": 164, + "target": 158 + }, + { + "source": 164, + "target": 155 + }, + { + "source": 164, + "target": 154 + }, + { + "source": 165, + "target": 162 + }, + { + "source": 165, + "target": 141 + }, + { + "source": 165, + "target": 140 + }, + { + "source": 165, + "target": 169 + }, + { + "source": 165, + "target": 156 + }, + { + "source": 165, + "target": 139 + }, + { + "source": 165, + "target": 167 + }, + { + "source": 165, + "target": 160 + }, + { + "source": 165, + "target": 50 + }, + { + "source": 165, + "target": 161 + }, + { + "source": 165, + "target": 144 + }, + { + "source": 165, + "target": 150 + }, + { + "source": 165, + "target": 146 + }, + { + "source": 165, + "target": 143 + }, + { + "source": 165, + "target": 158 + }, + { + "source": 165, + "target": 154 + }, + { + "source": 165, + "target": 170 + }, + { + "source": 165, + "target": 149 + }, + { + "source": 165, + "target": 147 + }, + { + "source": 165, + "target": 168 + }, + { + "source": 165, + "target": 164 + }, + { + "source": 165, + "target": 148 + }, + { + "source": 165, + "target": 166 + }, + { + "source": 165, + "target": 159 + }, + { + "source": 165, + "target": 142 + }, + { + "source": 165, + "target": 155 + }, + { + "source": 166, + "target": 162 + }, + { + "source": 166, + "target": 141 + }, + { + "source": 166, + "target": 159 + }, + { + "source": 166, + "target": 140 + }, + { + "source": 166, + "target": 149 + }, + { + "source": 166, + "target": 150 + }, + { + "source": 166, + "target": 146 + }, + { + "source": 166, + "target": 164 + }, + { + "source": 166, + "target": 165 + }, + { + "source": 166, + "target": 160 + }, + { + "source": 166, + "target": 139 + }, + { + "source": 166, + "target": 50 + }, + { + "source": 166, + "target": 158 + }, + { + "source": 166, + "target": 155 + }, + { + "source": 166, + "target": 154 + }, + { + "source": 167, + "target": 162 + }, + { + "source": 167, + "target": 141 + }, + { + "source": 167, + "target": 139 + }, + { + "source": 167, + "target": 149 + }, + { + "source": 167, + "target": 169 + }, + { + "source": 167, + "target": 150 + }, + { + "source": 167, + "target": 157 + }, + { + "source": 167, + "target": 146 + }, + { + "source": 167, + "target": 172 + }, + { + "source": 167, + "target": 165 + }, + { + "source": 167, + "target": 155 + }, + { + "source": 168, + "target": 162 + }, + { + "source": 168, + "target": 141 + }, + { + "source": 168, + "target": 152 + }, + { + "source": 168, + "target": 165 + }, + { + "source": 168, + "target": 169 + }, + { + "source": 168, + "target": 150 + }, + { + "source": 168, + "target": 175 + }, + { + "source": 168, + "target": 146 + }, + { + "source": 168, + "target": 172 + }, + { + "source": 168, + "target": 139 + }, + { + "source": 168, + "target": 156 + }, + { + "source": 168, + "target": 153 + }, + { + "source": 168, + "target": 160 + }, + { + "source": 168, + "target": 140 + }, + { + "source": 168, + "target": 159 + }, + { + "source": 168, + "target": 158 + }, + { + "source": 168, + "target": 155 + }, + { + "source": 169, + "target": 162 + }, + { + "source": 169, + "target": 141 + }, + { + "source": 169, + "target": 140 + }, + { + "source": 169, + "target": 165 + }, + { + "source": 169, + "target": 156 + }, + { + "source": 169, + "target": 139 + }, + { + "source": 169, + "target": 175 + }, + { + "source": 169, + "target": 157 + }, + { + "source": 169, + "target": 167 + }, + { + "source": 169, + "target": 160 + }, + { + "source": 169, + "target": 50 + }, + { + "source": 169, + "target": 161 + }, + { + "source": 169, + "target": 144 + }, + { + "source": 169, + "target": 146 + }, + { + "source": 169, + "target": 172 + }, + { + "source": 169, + "target": 143 + }, + { + "source": 169, + "target": 158 + }, + { + "source": 169, + "target": 154 + }, + { + "source": 169, + "target": 170 + }, + { + "source": 169, + "target": 149 + }, + { + "source": 169, + "target": 168 + }, + { + "source": 169, + "target": 164 + }, + { + "source": 169, + "target": 148 + }, + { + "source": 169, + "target": 150 + }, + { + "source": 169, + "target": 159 + }, + { + "source": 169, + "target": 142 + }, + { + "source": 169, + "target": 155 + }, + { + "source": 169, + "target": 62 + }, + { + "source": 170, + "target": 162 + }, + { + "source": 170, + "target": 141 + }, + { + "source": 170, + "target": 139 + }, + { + "source": 170, + "target": 149 + }, + { + "source": 170, + "target": 169 + }, + { + "source": 170, + "target": 150 + }, + { + "source": 170, + "target": 146 + }, + { + "source": 170, + "target": 164 + }, + { + "source": 170, + "target": 172 + }, + { + "source": 170, + "target": 165 + }, + { + "source": 170, + "target": 160 + }, + { + "source": 170, + "target": 159 + }, + { + "source": 170, + "target": 158 + }, + { + "source": 170, + "target": 155 + }, + { + "source": 171, + "target": 50 + }, + { + "source": 172, + "target": 162 + }, + { + "source": 172, + "target": 141 + }, + { + "source": 172, + "target": 140 + }, + { + "source": 172, + "target": 169 + }, + { + "source": 172, + "target": 145 + }, + { + "source": 172, + "target": 156 + }, + { + "source": 172, + "target": 139 + }, + { + "source": 172, + "target": 152 + }, + { + "source": 172, + "target": 148 + }, + { + "source": 172, + "target": 167 + }, + { + "source": 172, + "target": 160 + }, + { + "source": 172, + "target": 50 + }, + { + "source": 172, + "target": 161 + }, + { + "source": 172, + "target": 144 + }, + { + "source": 172, + "target": 150 + }, + { + "source": 172, + "target": 146 + }, + { + "source": 172, + "target": 158 + }, + { + "source": 172, + "target": 154 + }, + { + "source": 172, + "target": 170 + }, + { + "source": 172, + "target": 149 + }, + { + "source": 172, + "target": 147 + }, + { + "source": 172, + "target": 168 + }, + { + "source": 172, + "target": 164 + }, + { + "source": 172, + "target": 153 + }, + { + "source": 172, + "target": 159 + }, + { + "source": 172, + "target": 142 + }, + { + "source": 172, + "target": 155 + }, + { + "source": 173, + "target": 50 + }, + { + "source": 173, + "target": 143 + }, + { + "source": 174, + "target": 50 + }, + { + "source": 175, + "target": 137 + }, + { + "source": 175, + "target": 176 + }, + { + "source": 176, + "target": 137 + }, + { + "source": 177, + "target": 174 + }, + { + "source": 177, + "target": 50 + }, + { + "source": 178, + "target": 50 + }, + { + "source": 180, + "target": 62 + }, + { + "source": 181, + "target": 123 + }, + { + "source": 182, + "target": 125 + }, + { + "source": 183, + "target": 61 + }, + { + "source": 183, + "target": 100 + }, + { + "source": 184, + "target": 50 + }, + { + "source": 185, + "target": 50 + }, + { + "source": 185, + "target": 1 + }, + { + "source": 187, + "target": 100 + }, + { + "source": 188, + "target": 115 + }, + { + "source": 188, + "target": 123 + }, + { + "source": 188, + "target": 106 + }, + { + "source": 188, + "target": 50 + }, + { + "source": 189, + "target": 201 + }, + { + "source": 189, + "target": 121 + }, + { + "source": 189, + "target": 78 + }, + { + "source": 189, + "target": 70 + }, + { + "source": 189, + "target": 3 + }, + { + "source": 189, + "target": 91 + }, + { + "source": 189, + "target": 50 + }, + { + "source": 190, + "target": 81 + }, + { + "source": 190, + "target": 79 + }, + { + "source": 190, + "target": 86 + }, + { + "source": 190, + "target": 82 + }, + { + "source": 190, + "target": 50 + }, + { + "source": 190, + "target": 104 + }, + { + "source": 191, + "target": 50 + }, + { + "source": 191, + "target": 90 + }, + { + "source": 191, + "target": 211 + }, + { + "source": 192, + "target": 50 + }, + { + "source": 193, + "target": 50 + }, + { + "source": 194, + "target": 50 + }, + { + "source": 194, + "target": 42 + }, + { + "source": 194, + "target": 182 + }, + { + "source": 195, + "target": 50 + }, + { + "source": 196, + "target": 93 + }, + { + "source": 196, + "target": 50 + }, + { + "source": 196, + "target": 90 + }, + { + "source": 197, + "target": 78 + }, + { + "source": 197, + "target": 50 + }, + { + "source": 197, + "target": 90 + }, + { + "source": 198, + "target": 61 + }, + { + "source": 198, + "target": 131 + }, + { + "source": 199, + "target": 125 + }, + { + "source": 199, + "target": 50 + }, + { + "source": 200, + "target": 125 + }, + { + "source": 200, + "target": 182 + }, + { + "source": 201, + "target": 121 + }, + { + "source": 202, + "target": 123 + }, + { + "source": 203, + "target": 123 + }, + { + "source": 204, + "target": 118 + }, + { + "source": 204, + "target": 39 + }, + { + "source": 204, + "target": 50 + }, + { + "source": 204, + "target": 1 + }, + { + "source": 205, + "target": 50 + }, + { + "source": 206, + "target": 50 + }, + { + "source": 207, + "target": 50 + }, + { + "source": 208, + "target": 50 + }, + { + "source": 209, + "target": 101 + }, + { + "source": 209, + "target": 210 + }, + { + "source": 209, + "target": 40 + }, + { + "source": 213, + "target": 39 + }, + { + "source": 213, + "target": 61 + }, + { + "source": 213, + "target": 50 + } + ] +} diff --git a/protovis-r3.2.js b/protovis-r3.2.js new file mode 100644 index 0000000..95bb3be --- /dev/null +++ b/protovis-r3.2.js @@ -0,0 +1,277 @@ +// fba9dc2 +var a;if(!Array.prototype.map)Array.prototype.map=function(b,c){for(var d=this.length,f=new Array(d),g=0;g>>0,f=0;f=d)throw new Error("reduce: no values, no initial value");}for(;f=0&&d=69&&m<100?1900:0)});return"([0-9]+)";case "%Y":q.push(function(m){g=m});return"([0-9]+)";case "%%":q.push(function(){}); +return"%"}return n});(f=f.match(o))&&f.forEach(function(n,m){q[m](n)});return new Date(g,h,i,j,l,k)};return c}; +pv.Format.time=function(b){function c(f){f=Number(f);switch(b){case "short":if(f>=31536E6)return(f/31536E6).toFixed(1)+" years";else if(f>=6048E5)return(f/6048E5).toFixed(1)+" weeks";else if(f>=864E5)return(f/864E5).toFixed(1)+" days";else if(f>=36E5)return(f/36E5).toFixed(1)+" hours";else if(f>=6E4)return(f/6E4).toFixed(1)+" minutes";return(f/1E3).toFixed(1)+" seconds";case "long":var g=[],h=f%36E5/6E4>>0;g.push(d("0",2,f%6E4/1E3>>0));if(f>=36E5){var i=f%864E5/36E5>>0;g.push(d("0",2,h));if(f>=864E5){g.push(d("0", +2,i));g.push(Math.floor(f/864E5).toFixed())}else g.push(i.toFixed())}else g.push(h.toFixed());return g.reverse().join(":")}}var d=pv.Format.pad;c.format=c;c.parse=function(f){switch(b){case "short":for(var g=/([0-9,.]+)\s*([a-z]+)/g,h,i=0;h=g.exec(f);){var j=parseFloat(h[0].replace(",","")),l=0;switch(h[2].toLowerCase()){case "year":case "years":l=31536E6;break;case "week":case "weeks":l=6048E5;break;case "day":case "days":l=864E5;break;case "hour":case "hours":l=36E5;break;case "minute":case "minutes":l= +6E4;break;case "second":case "seconds":l=1E3;break}i+=j*l}return i;case "long":h=f.replace(",","").split(":").reverse();i=0;if(h.length)i+=parseFloat(h[0])*1E3;if(h.length>1)i+=parseFloat(h[1])*6E4;if(h.length>2)i+=parseFloat(h[2])*36E5;if(h.length>3)i+=parseFloat(h[3])*864E5;return i}};return c}; +pv.Format.number=function(){function b(n){if(Infinity>h)n=Math.round(n*i)/i;var m=String(Math.abs(n)).split("."),r=m[0];n=n<0?"-":"";if(r.length>d)r=r.substring(r.length-d);if(k&&r.length3)r=r.replace(/\B(?=(?:\d{3})+(?!\d))/g,o);if(!k&&r.lengthd)m=m.substring(m.length-d);n=n[1]?Number("0."+n[1]):0;if(Infinity>h)n=Math.round(n*i)/i;return Math.round(m)+n};b.integerDigits=function(n,m){if(arguments.length){c=Number(n);d=arguments.length>1?Number(m):c;f=c+Math.floor(c/3)*o.length;return this}return[c,d]};b.fractionDigits=function(n,m){if(arguments.length){g= +Number(n);h=arguments.length>1?Number(m):g;i=Math.pow(10,h);return this}return[g,h]};b.integerPad=function(n){if(arguments.length){j=String(n);k=/\d/.test(j);return this}return j};b.fractionPad=function(n){if(arguments.length){l=String(n);return this}return l};b.decimal=function(n){if(arguments.length){q=String(n);return this}return q};b.group=function(n){if(arguments.length){o=n?String(n):"";f=c+Math.floor(c/3)*o.length;return this}return o};return b}; +pv.map=function(b,c){var d={};return c?b.map(function(f,g){d.index=g;return c.call(d,f)}):b.slice()};pv.repeat=function(b,c){if(arguments.length==1)c=2;return pv.blend(pv.range(c).map(function(){return b}))};pv.cross=function(b,c){for(var d=[],f=0,g=b.length,h=c.length;fc){b.length=d;for(var f=c;fc?1:0}; +pv.reverseOrder=function(b,c){return cb?1:0};pv.search=function(b,c,d){if(!d)d=pv.identity;for(var f=0,g=b.length-1;f<=g;){var h=f+g>>1,i=d(b[h]);if(ic)g=h-1;else return h}return-f-1};pv.search.index=function(b,c,d){b=pv.search(b,c,d);return b<0?-b-1:b}; +pv.range=function(b,c,d){if(arguments.length==1){c=b;b=0}if(d==undefined)d=1;if((c-b)/d==Infinity)throw new Error("range must be finite");var f=[],g=0,h;if(d<0)for(;(h=b+d*g++)>c;)f.push(h);else for(;(h=b+d*g++)f){f=i;d=h}}return d}; +pv.min=function(b,c){if(c==pv.index)return 0;return Math.min.apply(null,c?pv.map(b,c):b)};pv.min.index=function(b,c){if(!b.length)return-1;if(c==pv.index)return 0;if(!c)c=pv.identity;for(var d=0,f=Infinity,g={},h=0;h0?Math.pow(c,Math.floor(pv.log(b,c))):-Math.pow(c,-Math.floor(-pv.log(-b,c)))};pv.logCeil=function(b,c){return b>0?Math.pow(c,Math.ceil(pv.log(b,c))):-Math.pow(c,-Math.ceil(-pv.log(-b,c)))}; +(function(){var b=Math.PI/180,c=180/Math.PI;pv.radians=function(d){return b*d};pv.degrees=function(d){return c*d}})();pv.keys=function(b){var c=[];for(var d in b)c.push(d);return c};pv.entries=function(b){var c=[];for(var d in b)c.push({key:d,value:b[d]});return c};pv.values=function(b){var c=[];for(var d in b)c.push(b[d]);return c};pv.dict=function(b,c){for(var d={},f={},g=0;g=94608E6){n=31536E6;t="%Y";p=function(w){w.setFullYear(w.getFullYear()+v)}}else if(u>=7776E6){n=2592E6;t="%m/%Y";p=function(w){w.setMonth(w.getMonth()+v)}}else if(u>=18144E5){n=6048E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+7*v)}}else if(u>=2592E5){n=864E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+v)}}else if(u>=108E5){n=36E5;t="%I:%M %p";p=function(w){w.setHours(w.getHours()+ +v)}}else if(u>=18E4){n=6E4;t="%I:%M %p";p=function(w){w.setMinutes(w.getMinutes()+v)}}else if(u>=3E3){n=1E3;t="%I:%M:%S";p=function(w){w.setSeconds(w.getSeconds()+v)}}else{n=1;t="%S.%Qs";p=function(w){w.setTime(w.getTime()+v)}}q=pv.Format.date(t);s=new Date(s);t=[];x(s,n);u=u/n;if(u>10)switch(n){case 36E5:v=u>20?6:3;s.setHours(Math.floor(s.getHours()/v)*v);break;case 2592E6:v=3;s.setMonth(Math.floor(s.getMonth()/v)*v);break;case 6E4:v=u>30?15:u>15?10:5;s.setMinutes(Math.floor(s.getMinutes()/v)*v); +break;case 1E3:v=u>90?15:u>60?10:5;s.setSeconds(Math.floor(s.getSeconds()/v)*v);break;case 1:v=u>1E3?250:u>200?100:u>100?50:u>50?25:5;s.setMilliseconds(Math.floor(s.getMilliseconds()/v)*v);break;default:v=pv.logCeil(u/15,10);if(u/v<2)v/=5;else if(u/v<5)v/=2;s.setFullYear(Math.floor(s.getFullYear()/v)*v);break}for(;;){p(s);if(s>m)break;t.push(new Date(s))}return r?t.reverse():t}arguments.length||(o=10);v=pv.logFloor(u/o,10);n=o/(u/v);if(n<=0.15)v*=10;else if(n<=0.35)v*=5;else if(n<=0.75)v*=2;n=Math.ceil(s/ +v)*v;m=Math.floor(m/v)*v;q=pv.Format.number().fractionDigits(Math.max(0,-Math.floor(pv.log(v,10)+0.01)));m=pv.range(n,m+v,v);return r?m.reverse():m};c.tickFormat=function(o){return q(o)};c.nice=function(){if(d.length!=2)return this;var o=d[0],n=d[d.length-1],m=n0;i--)k.push(-g(-j)*i);else{for(;jh[1];l--);return k.slice(j,l)};b.tickFormat=function(h){return h.toPrecision(1)}; +b.nice=function(){var h=b.domain();return b.domain(pv.logFloor(h[0],c),pv.logCeil(h[1],c))};b.base=function(h){if(arguments.length){c=Number(h);d=Math.log(c);b.transform(f,g);return this}return c};b.domain.apply(b,arguments);return b.base(10)};pv.Scale.root=function(){var b=pv.Scale.quantitative();b.power=function(c){if(arguments.length){var d=Number(c),f=1/d;b.transform(function(g){return Math.pow(g,f)},function(g){return Math.pow(g,d)});return this}return d};b.domain.apply(b,arguments);return b.power(2)}; +pv.Scale.ordinal=function(){function b(g){g in d||(d[g]=c.push(g)-1);return f[d[g]%f.length]}var c=[],d={},f=[];b.domain=function(g,h){if(arguments.length){g=g instanceof Array?arguments.length>1?pv.map(g,h):g:Array.prototype.slice.call(arguments);c=[];for(var i={},j=0;j1?pv.map(g,h):g:Array.prototype.slice.call(arguments); +if(typeof f[0]=="string")f=f.map(pv.color);return this}return f};b.split=function(g,h){var i=(h-g)/this.domain().length;f=pv.range(g+i/2,h,i);return this};b.splitFlush=function(g,h){var i=this.domain().length,j=(h-g)/(i-1);f=i==1?[(g+h)/2]:pv.range(g,h+j/2,j);return this};b.splitBanded=function(g,h,i){if(arguments.length<3)i=1;if(i<0){var j=this.domain().length;j=(h-g- -i*j)/(j+1);f=pv.range(g+j,h,j-i);f.band=-i}else{j=(h-g)/(this.domain().length+(1-i));f=pv.range(g+j*(1-i),h,j);f.band=j*i}return this}; +b.by=function(g){function h(){return b(g.apply(this,arguments))}for(var i in b)h[i]=b[i];return h};b.domain.apply(b,arguments);return b}; +pv.Scale.quantile=function(){function b(i){return h(Math.max(0,Math.min(d,pv.search.index(f,i)-1))/d)}var c=-1,d=-1,f=[],g=[],h=pv.Scale.linear();b.quantiles=function(i){if(arguments.length){c=Number(i);if(c<0){f=[g[0]].concat(g);d=g.length-1}else{f=[];f[0]=g[0];for(var j=1;j<=c;j++)f[j]=g[~~(j*(g.length-1)/c)];d=c-1}return this}return f};b.domain=function(i,j){if(arguments.length){g=i instanceof Array?pv.map(i,j):Array.prototype.slice.call(arguments);g.sort(pv.naturalOrder);b.quantiles(c);return this}return g}; +b.range=function(){if(arguments.length){h.range.apply(h,arguments);return this}return h.range()};b.by=function(i){function j(){return b(i.apply(this,arguments))}for(var l in b)j[l]=b[l];return j};b.domain.apply(b,arguments);return b}; +pv.histogram=function(b,c){var d=true;return{bins:function(f){var g=pv.map(b,c),h=[];arguments.length||(f=pv.Scale.linear(g).ticks());for(var i=0;i360)j-=360;else if(j<0)j+=360;if(j<60)return i+(h-i)*j/60;if(j<180)return h;if(j<240)return i+(h-i)*(240-j)/60;return i}function c(j){return Math.round(b(j)*255)}var d=this.h,f=this.s,g=this.l;d%=360;if(d<0)d+=360;f=Math.max(0,Math.min(f,1));g=Math.max(0,Math.min(g,1));var h=g<=0.5?g*(1+f):g+f-g*f,i=2*g-h;return pv.rgb(c(d+120),c(d),c(d-120),this.a)}; +pv.Color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", +darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", +ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", +lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", +moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", +seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:pv.Color.transparent=pv.rgb(0,0,0,0)};(function(){var b=pv.Color.names;for(var c in b)b[c]=pv.color(b[c])})(); +pv.colors=function(){var b=pv.Scale.ordinal();b.range.apply(b,arguments);return b};pv.Colors={};pv.Colors.category10=function(){var b=pv.colors("#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf");b.domain.apply(b,arguments);return b}; +pv.Colors.category20=function(){var b=pv.colors("#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5");b.domain.apply(b,arguments);return b}; +pv.Colors.category19=function(){var b=pv.colors("#9c9ede","#7375b5","#4a5584","#cedb9c","#b5cf6b","#8ca252","#637939","#e7cb94","#e7ba52","#bd9e39","#8c6d31","#e7969c","#d6616b","#ad494a","#843c39","#de9ed6","#ce6dbd","#a55194","#7b4173");b.domain.apply(b,arguments);return b};pv.ramp=function(){var b=pv.Scale.linear();b.range.apply(b,arguments);return b}; +pv.Scene=pv.SvgScene={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",scale:1,events:["DOMMouseScroll","mousewheel","mousedown","mouseup","mouseover","mouseout","mousemove","click","dblclick"],implicit:{svg:{"shape-rendering":"auto","pointer-events":"painted",x:0,y:0,dy:0,"text-anchor":"start",transform:"translate(0,0)",fill:"none","fill-opacity":1,stroke:"none","stroke-opacity":1,"stroke-width":1.5,"stroke-linejoin":"miter"}, +css:{font:"10px sans-serif"}}};pv.SvgScene.updateAll=function(b){if(b.length&&b[0].reverse&&b.type!="line"&&b.type!="area"){for(var c=pv.extend(b),d=0,f=b.length-1;f>=0;d++,f--)c[d]=b[f];b=c}this.removeSiblings(this[b.type](b))};pv.SvgScene.create=function(b){return document.createElementNS(this.svg,b)}; +pv.SvgScene.expect=function(b,c,d,f){if(b){if(b.tagName=="a")b=b.firstChild;if(b.tagName!=c){c=this.create(c);b.parentNode.replaceChild(c,b);b=c}}else b=this.create(c);for(var g in d){c=d[g];if(c==this.implicit.svg[g])c=null;c==null?b.removeAttribute(g):b.setAttribute(g,c)}for(g in f){c=f[g];if(c==this.implicit.css[g])c=null;if(c==null)b.style.removeProperty(g);else b.style[g]=c}return b}; +pv.SvgScene.append=function(b,c,d){b.$scene={scenes:c,index:d};b=this.title(b,c[d]);b.parentNode||c.$g.appendChild(b);return b.nextSibling};pv.SvgScene.title=function(b,c){var d=b.parentNode;if(d&&d.tagName!="a")d=null;if(c.title){if(!d){d=this.create("a");b.parentNode&&b.parentNode.replaceChild(d,b);d.appendChild(b)}d.setAttributeNS(this.xlink,"title",c.title);return d}d&&d.parentNode.replaceChild(b,d);return b}; +pv.SvgScene.dispatch=pv.listener(function(b){var c=b.target.$scene;if(c){var d=b.type;switch(d){case "DOMMouseScroll":d="mousewheel";b.wheel=-480*b.detail;break;case "mousewheel":b.wheel=(window.opera?12:1)*b.wheelDelta;break}pv.Mark.dispatch(d,c.scenes,c.index)&&b.preventDefault()}});pv.SvgScene.removeSiblings=function(b){for(;b;){var c=b.nextSibling;b.parentNode.removeChild(b);b=c}};pv.SvgScene.undefined=function(){}; +pv.SvgScene.pathBasis=function(){function b(f,g,h,i,j){return{x:f[0]*g.left+f[1]*h.left+f[2]*i.left+f[3]*j.left,y:f[0]*g.top+f[1]*h.top+f[2]*i.top+f[3]*j.top}}var c=[[1/6,2/3,1/6,0],[0,2/3,1/3,0],[0,1/3,2/3,0],[0,1/6,2/3,1/6]],d=function(f,g,h,i){var j=b(c[1],f,g,h,i),l=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"C"+j.x+","+j.y+","+l.x+","+l.y+","+f.x+","+f.y};d.segment=function(f,g,h,i){var j=b(c[0],f,g,h,i),l=b(c[1],f,g,h,i),k=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"M"+j.x+","+j.y+"C"+l.x+","+l.y+ +","+k.x+","+k.y+","+f.x+","+f.y};return d}();pv.SvgScene.curveBasis=function(b){if(b.length<=2)return"";var c="",d=b[0],f=d,g=d,h=b[1];c+=this.pathBasis(d,f,g,h);for(var i=2;i1){j=c[1];h=b[l];l++;f+="C"+(g.left+i.x)+","+(g.top+i.y)+","+(h.left-j.x)+","+(h.top-j.y)+","+h.left+","+h.top;for(g=2;g9){l=3/Math.sqrt(l);f[h]= +l*i*d[h];f[h+1]=l*j*d[h]}}for(h=0;h2&&(g.interpolate=="basis"||g.interpolate=="cardinal"||g.interpolate=="monotone")?d:c)(k,q-1));k=q-1}}if(!j.length)return f;f=this.expect(f,"path",{"shape-rendering":g.antialias?null:"crispEdges","pointer-events":g.events,cursor:g.cursor,d:"M"+j.join("ZM")+"Z",fill:h.color,"fill-opacity":h.opacity|| +null,stroke:i.color,"stroke-opacity":i.opacity||null,"stroke-width":i.opacity?g.lineWidth/this.scale:null});return this.append(f,b,0)}; +pv.SvgScene.areaSegment=function(b){var c=b.$g.firstChild,d=b[0],f,g;if(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"){f=[];g=[];for(var h=0,i=b.length;h2&&(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"))switch(d.interpolate){case "basis":h+=this.curveBasis(b);break;case "cardinal":h+=this.curveCardinal(b,d.tension);break;case "monotone":h+=this.curveMonotone(b); +break}else for(var i=1;i1)break;return"A"+f+","+f+" 0 0,"+d+" "+c.left+","+c.top;case "step-before":return"V"+c.top+"H"+c.left;case "step-after":return"H"+c.left+"V"+c.top}return"L"+c.left+","+c.top};pv.SvgScene.lineIntersect=function(b,c,d,f){return b.plus(c.times(d.minus(b).dot(f.perp())/c.dot(f.perp())))}; +pv.SvgScene.pathJoin=function(b,c,d,f){var g=pv.vector(c.left,c.top);d=pv.vector(d.left,d.top);var h=d.minus(g),i=h.perp().norm(),j=i.times(c.lineWidth/(2*this.scale));c=g.plus(j);var l=d.plus(j),k=d.minus(j);j=g.minus(j);if(b&&b.visible){b=g.minus(b.left,b.top).perp().norm().plus(i);j=this.lineIntersect(g,b,j,h);c=this.lineIntersect(g,b,c,h)}if(f&&f.visible){f=pv.vector(f.left,f.top).minus(d).perp().norm().plus(i);k=this.lineIntersect(d,f,k,h);l=this.lineIntersect(d,f,l,h)}return"M"+c.x+","+c.y+ +"L"+l.x+","+l.y+" "+k.x+","+k.y+" "+j.x+","+j.y}; +pv.SvgScene.panel=function(b){for(var c=b.$g,d=c&&c.firstChild,f=0;f=2*Math.PI)i=i?"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"Z";else{var k=Math.min(f.startAngle,f.endAngle),q=Math.max(f.startAngle,f.endAngle), +o=Math.cos(k),n=Math.cos(q);k=Math.sin(k);q=Math.sin(q);i=i?"M"+j*o+","+j*k+"A"+j+","+j+" 0 "+(l1?c:null)}; +a.anchor=function(b){function c(g){for(var h=d,i=[];!(f=h.scene);){g=g.parent;i.push({index:g.index,childIndex:h.childIndex});h=h.parent}for(;i.length;){g=i.pop();f=f[g.index].children[g.childIndex]}if(d.hasOwnProperty("index")){i=pv.extend(f[d.index]);i.right=i.top=i.left=i.bottom=0;return[i]}return f}var d=this,f;b||(b="center");return(new pv.Anchor(this)).name(b).def("$mark.anchor",function(){f=this.scene.target=c(this)}).data(function(){return f.map(function(g){return g.data})}).visible(function(){return f[this.index].visible}).left(function(){var g= +f[this.index],h=g.width||0;switch(this.name()){case "bottom":case "top":case "center":return g.left+h/2;case "left":return null}return g.left+h}).top(function(){var g=f[this.index],h=g.height||0;switch(this.name()){case "left":case "right":case "center":return g.top+h/2;case "top":return null}return g.top+h}).right(function(){var g=f[this.index];return this.name()=="left"?g.right+(g.width||0):null}).bottom(function(){var g=f[this.index];return this.name()=="top"?g.bottom+(g.height||0):null}).textAlign(function(){switch(this.name()){case "bottom":case "top":case "center":return"center"; +case "right":return"right"}return"left"}).textBaseline(function(){switch(this.name()){case "right":case "left":case "center":return"middle";case "top":return"top"}return"bottom"})};a.anchorTarget=function(){return this.proto.anchorTarget()};a.margin=function(b){return this.left(b).right(b).top(b).bottom(b)};a.instance=function(b){var c=this.scene||this.parent.instance(-1).children[this.childIndex],d=!arguments.length||this.hasOwnProperty("index")?this.index:b;return c[d<0?c.length-1:d]};a.first=function(){return this.scene[0]}; +a.last=function(){return this.scene[this.scene.length-1]};a.sibling=function(){return this.index==0?null:this.scene[this.index-1]};a.cousin=function(){var b=this.parent;return(b=b&&b.sibling())&&b.children?b.children[this.childIndex][this.index]:null}; +a.render=function(){function b(i,j,l){i.scale=l;if(j=0;k--){var q=l[k];if(!(q.name in c)){c[q.name]=q;switch(q.name){case "data":f=q;break;case "visible":g=q;break;default:d[q.type].push(q);break}}}while(j=j.proto)}var c={},d=[[],[],[],[]],f,g;b(this);b(this.defaults);d[1].reverse();d[3].reverse();var h=this;do for(var i in h.properties)i in c||d[2].push(c[i]={name:i,type:2,value:null});while(h=h.proto);h=d[0].concat(d[1]);for(i=0;ih.id)d[g.name]={id:0,value:g.type&1?g.value.apply(this,c):g.value}}}d=this.binds.data;d=d.type&1?d.value.apply(this,c):d.value;c.unshift(null); +b.length=d.length;for(f=0;f0;k--){n=m[k];n.scale=q;q*=n.scene[n.index].transform.k}if(o.children){k=0;for(m=o.children.length;k=3*Math.PI/2};pv.Wedge.prototype.buildImplied=function(b){if(b.angle==null)b.angle=b.endAngle-b.startAngle;else if(b.endAngle==null)b.endAngle=b.startAngle+b.angle;pv.Mark.prototype.buildImplied.call(this,b)};pv.simulation=function(b){return new pv.Simulation(b)};pv.Simulation=function(b){for(var c=0;c=s,t=q.y>=u;k.leaf=false;switch((t<<1)+x){case 0:k=k.c1||(k.c1=new pv.Quadtree.Node);break;case 1:k=k.c2||(k.c2=new pv.Quadtree.Node);break;case 2:k=k.c3||(k.c3=new pv.Quadtree.Node);break;case 3:k=k.c4||(k.c4=new pv.Quadtree.Node); +break}if(x)o=s;else m=s;if(t)n=u;else r=u;c(k,q,o,n,m,r)}var f,g=Number.POSITIVE_INFINITY,h=g,i=Number.NEGATIVE_INFINITY,j=i;for(f=b;f;f=f.next){if(f.xi)i=f.x;if(f.y>j)j=f.y}f=i-g;var l=j-h;if(f>l)j=h+f;else i=g+l;this.xMin=g;this.yMin=h;this.xMax=i;this.yMax=j;this.root=new pv.Quadtree.Node;for(f=b;f;f=f.next)c(this.root,f,g,h,i,j)};pv.Quadtree.Node=function(){this.leaf=true;this.p=this.c4=this.c3=this.c2=this.c1=null};pv.Force={}; +pv.Force.charge=function(b){function c(k){function q(m){c(m);k.cn+=m.cn;o+=m.cn*m.cx;n+=m.cn*m.cy}var o=0,n=0;k.cn=0;if(!k.leaf){k.c1&&q(k.c1);k.c2&&q(k.c2);k.c3&&q(k.c3);k.c4&&q(k.c4)}if(k.p){k.cn+=b;o+=b*k.p.x;n+=b*k.p.y}k.cx=o/k.cn;k.cy=n/k.cn}function d(k,q,o,n,m,r){var s=k.cx-q.x,u=k.cy-q.y,x=1/Math.sqrt(s*s+u*u);if(k.leaf&&k.p!=q||(m-o)*xg)x=g;k=k.cn*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}else if(!k.leaf){var t=(o+m)*0.5,p=(n+r)*0.5;k.c1&&d(k.c1,q,o,n,t,p);k.c2&&d(k.c2,q,t,n, +m,p);k.c3&&d(k.c3,q,o,p,t,r);k.c4&&d(k.c4,q,t,p,m,r);if(!(xg)x=g;if(k.p&&k.p!=q){k=b*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}}}var f=2,g=1/f,h=500,i=1/h,j=0.9,l={};arguments.length||(b=-40);l.constant=function(k){if(arguments.length){b=Number(k);return l}return b};l.domain=function(k,q){if(arguments.length){f=Number(k);g=1/f;h=Number(q);i=1/h;return l}return[f,h]};l.theta=function(k){if(arguments.length){j=Number(k);return l}return j};l.apply=function(k,q){c(q.root);for(k=k;k;k=k.next)d(q.root, +k,q.xMin,q.yMin,q.xMax,q.yMax)};return l};pv.Force.drag=function(b){var c={};arguments.length||(b=0.1);c.constant=function(d){if(arguments.length){b=d;return c}return b};c.apply=function(d){if(b)for(d=d;d;d=d.next){d.fx-=b*d.vx;d.fy-=b*d.vy}};return c}; +pv.Force.spring=function(b){var c=0.1,d=20,f,g,h={};arguments.length||(b=0.1);h.links=function(i){if(arguments.length){f=i;g=i.map(function(j){return 1/Math.sqrt(Math.max(j.sourceNode.linkDegree,j.targetNode.linkDegree))});return h}return f};h.constant=function(i){if(arguments.length){b=Number(i);return h}return b};h.damping=function(i){if(arguments.length){c=Number(i);return h}return c};h.length=function(i){if(arguments.length){d=Number(i);return h}return d};h.apply=function(){for(var i=0;ig,p=sh){k.c1&&t&&c(k.c1,q,o,n,s,u);k.c2&&p&&c(k.c2,q,s,n,m,u)}if(x){k.c3&&t&&c(k.c3,q,o,u,s,r);k.c4&&p&&c(k.c4,q,s,u,m,r)}}if(k.p&&k.p!=q){o=q.x-k.p.x;n=q.y-k.p.y;m=Math.sqrt(o*o+n*n);r=f+b(k.p);if(mm)m=n}for(var r=0;rc.max?c.max:g.x;if(d)for(g=f;g;g=g.next)g.y=g.yd.max?d.max:g.y};return b};pv.Layout=function(){pv.Panel.call(this)};pv.Layout.prototype=pv.extend(pv.Panel); +pv.Layout.prototype.property=function(b,c){if(!this.hasOwnProperty("properties"))this.properties=pv.extend(this.properties);this.properties[b]=true;this.propertyMethod(b,false,pv.Mark.cast[b]=c);return this}; +pv.Layout.Network=function(){pv.Layout.call(this);var b=this;this.$id=pv.id();(this.node=(new pv.Mark).data(function(){return b.nodes()}).strokeStyle("#1f77b4").fillStyle("#fff").left(function(c){return c.x}).top(function(c){return c.y})).parent=this;this.link=(new pv.Mark).extend(this.node).data(function(c){return[c.sourceNode,c.targetNode]}).fillStyle(null).lineWidth(function(c,d){return d.linkValue*1.5}).strokeStyle("rgba(0,0,0,.2)");this.link.add=function(c){return b.add(pv.Panel).data(function(){return b.links()}).add(c).extend(this)}; +(this.label=(new pv.Mark).extend(this.node).textMargin(7).textBaseline("middle").text(function(c){return c.nodeName||c.nodeValue}).textAngle(function(c){c=c.midAngle;return pv.Wedge.upright(c)?c:c+Math.PI}).textAlign(function(c){return pv.Wedge.upright(c.midAngle)?"left":"right"})).parent=this}; +pv.Layout.Network.prototype=pv.extend(pv.Layout).property("nodes",function(b){return b.map(function(c,d){if(typeof c!="object")c={nodeValue:c};c.index=d;c.linkDegree=0;return c})}).property("links",function(b){return b.map(function(c){if(isNaN(c.linkValue))c.linkValue=isNaN(c.value)?1:c.value;return c})});pv.Layout.Network.prototype.reset=function(){this.$id=pv.id();return this}; +pv.Layout.Network.prototype.buildProperties=function(b,c){if((b.$id||0)=this.$id)return true;b.$id=this.$id;b.links.forEach(function(c){var d=c.linkValue;(c.sourceNode||(c.sourceNode=b.nodes[c.source])).linkDegree+=d;(c.targetNode||(c.targetNode=b.nodes[c.target])).linkDegree+=d})}; +pv.Layout.Hierarchy=function(){pv.Layout.Network.call(this);this.link.strokeStyle("#ccc")};pv.Layout.Hierarchy.prototype=pv.extend(pv.Layout.Network);pv.Layout.Hierarchy.prototype.buildImplied=function(b){if(!b.links)b.links=pv.Layout.Hierarchy.links.call(this);pv.Layout.Network.prototype.buildImplied.call(this,b)};pv.Layout.Hierarchy.links=function(){return this.nodes().filter(function(b){return b.parentNode}).map(function(b){return{sourceNode:b,targetNode:b.parentNode,linkValue:1}})}; +pv.Layout.Hierarchy.NodeLink={buildImplied:function(b){function c(m){return m.parentNode?m.depth*(o-q)+q:0}function d(m){return m.parentNode?(m.breadth-0.25)*2*Math.PI:0}function f(m){switch(i){case "left":return m.depth*l;case "right":return l-m.depth*l;case "top":return m.breadth*l;case "bottom":return l-m.breadth*l;case "radial":return l/2+c(m)*Math.cos(m.midAngle)}}function g(m){switch(i){case "left":return m.breadth*k;case "right":return k-m.breadth*k;case "top":return m.depth*k;case "bottom":return k- +m.depth*k;case "radial":return k/2+c(m)*Math.sin(m.midAngle)}}var h=b.nodes,i=b.orient,j=/^(top|bottom)$/.test(i),l=b.width,k=b.height;if(i=="radial"){var q=b.innerRadius,o=b.outerRadius;if(q==null)q=0;if(o==null)o=Math.min(l,k)/2}for(b=0;bb.dy?0:-Math.PI/2});(this.leaf=(new pv.Mark).extend(this.node).fillStyle(null).strokeStyle(null).visible(function(b){return!b.firstChild})).parent= +this;delete this.link};pv.Layout.Treemap.prototype=pv.extend(pv.Layout.Hierarchy).property("round",Boolean).property("paddingLeft",Number).property("paddingRight",Number).property("paddingTop",Number).property("paddingBottom",Number).property("mode",String).property("order",String);a=pv.Layout.Treemap.prototype;a.defaults=(new pv.Layout.Treemap).extend(pv.Layout.Hierarchy.prototype.defaults).mode("squarify").order("ascending");a.padding=function(b){return this.paddingLeft(b).paddingRight(b).paddingTop(b).paddingBottom(b)}; +a.$size=function(b){return Number(b.nodeValue)};a.size=function(b){this.$size=pv.functor(b);return this}; +a.buildImplied=function(b){function c(r,s,u,x,t,p,v){for(var w=0,y=0;wu)u=v;t+=v}t*=t;s*=s;return Math.max(s*u/t,t/(s*x))}function f(r,s){function u(A){var D=p==y,G=pv.sum(A,o),E=y?n(G/y):0;c(A,G,D,x,t,D?p:E,D?E:v);if(D){t+=E;v-=E}else{x+= +E;p-=E}y=Math.min(p,v);return D}var x=r.x+j,t=r.y+k,p=r.dx-j-l,v=r.dy-k-q;if(m!="squarify")c(r.childNodes,r.size,m=="slice"?true:m=="dice"?false:s&1,x,t,p,v);else{var w=[];s=Infinity;var y=Math.min(p,v),z=p*v/r.size;if(!(r.size<=0)){r.visitBefore(function(A){A.size*=z});for(r=r.childNodes.slice();r.length;){var C=r[r.length-1];if(C.size){w.push(C);z=d(w,y);if(z<=s){r.pop();s=z}else{w.pop();u(w);w.length=0;s=Infinity}}else r.pop()}if(u(w))for(s=0;s0){i(l(C,p,v),p,B);A+=B;D+=B}G+=C.mod;A+=y.mod;E+=w.mod;D+=z.mod;C=h(C);y=g(y)}if(C&&!h(z)){z.thread=C;z.mod+=G-D}if(y&&!g(w)){w.thread=y;w.mod+=A-E;v=p}}return v}function g(p){return p.firstChild||p.thread}function h(p){return p.lastChild||p.thread}function i(p,v,w){var y=v.number-p.number;v.change-=w/y;v.shift+=w;p.change+= +w/y;v.prelim+=w;v.mod+=w}function j(p){var v=0,w=0;for(p=p.lastChild;p;p=p.previousSibling){p.prelim+=v;p.mod+=v;w+=p.change;v+=p.shift+w}}function l(p,v,w){return p.ancestor.parentNode==v.parentNode?p.ancestor:w}function k(p,v){return(v?1:u+1)/(m=="radial"?p:1)}function q(p){return m=="radial"?p.breadth/r:0}function o(p){switch(m){case "left":return p.depth;case "right":return x-p.depth;case "top":case "bottom":return p.breadth+x/2;case "radial":return x/2+p.depth*Math.cos(q(p))}}function n(p){switch(m){case "left":case "right":return p.breadth+ +t/2;case "top":return p.depth;case "bottom":return t-p.depth;case "radial":return t/2+p.depth*Math.sin(q(p))}}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var m=b.orient,r=b.depth,s=b.breadth,u=b.group,x=b.width,t=b.height;b=b.nodes[0];b.visitAfter(function(p,v){p.ancestor=p;p.prelim=0;p.mod=0;p.change=0;p.shift=0;p.number=p.previousSibling?p.previousSibling.number+1:0;p.depth=v});c(b);d(b,-b.prelim,0);b.visitAfter(function(p){p.breadth*=s;p.depth*=r;p.midAngle=q(p);p.x=o(p);p.y=n(p); +if(p.firstChild)p.midAngle+=Math.PI;delete p.breadth;delete p.depth;delete p.ancestor;delete p.prelim;delete p.mod;delete p.change;delete p.shift;delete p.number;delete p.thread})}};pv.Layout.Indent=function(){pv.Layout.Hierarchy.call(this);this.link.interpolate("step-after")};pv.Layout.Indent.prototype=pv.extend(pv.Layout.Hierarchy).property("depth",Number).property("breadth",Number);pv.Layout.Indent.prototype.defaults=(new pv.Layout.Indent).extend(pv.Layout.Hierarchy.prototype.defaults).depth(15).breadth(15); +pv.Layout.Indent.prototype.buildImplied=function(b){function c(i,j,l){i.x=g+l++*f;i.y=h+j++*d;i.midAngle=0;for(i=i.firstChild;i;i=i.nextSibling)j=c(i,j,l);return j}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var d=b.breadth,f=b.depth,g=0,h=0;c(b.nodes[0],1,1)}};pv.Layout.Pack=function(){pv.Layout.Hierarchy.call(this);this.node.radius(function(b){return b.radius}).strokeStyle("rgb(31, 119, 180)").fillStyle("rgba(31, 119, 180, .25)");this.label.textAlign("center");delete this.link}; +pv.Layout.Pack.prototype=pv.extend(pv.Layout.Hierarchy).property("spacing",Number).property("order",String);pv.Layout.Pack.prototype.defaults=(new pv.Layout.Pack).extend(pv.Layout.Hierarchy.prototype.defaults).spacing(1).order("ascending");pv.Layout.Pack.prototype.$radius=function(){return 1};pv.Layout.Pack.prototype.size=function(b){this.$radius=typeof b=="function"?function(){return Math.sqrt(b.apply(this,arguments))}:(b=Math.sqrt(b),function(){return b});return this}; +pv.Layout.Pack.prototype.buildImplied=function(b){function c(o){var n=pv.Mark.stack;n.unshift(null);for(var m=0,r=o.length;m0.0010}var u=Infinity,x=-Infinity,t=Infinity,p=-Infinity,v,w,y,z,C;v=o[0];v.x=-v.radius;v.y=0;n(v);if(o.length>1){w=o[1];w.x=w.radius;w.y=0;n(w);if(o.length>2){y=o[2];g(v,w,y);n(y);m(v,y);v.p= +y;m(y,w);w=v.n;for(var A=3;A0){r(v,z);w=z;A--}else if(D<0){r(z,w);v=z;A--}}}}v=(u+x)/2;w=(t+p)/2;for(A=y=0;Ao.min){o.sim.step(); +q=true}q&&d.render()},42)}else for(l=0;lg)g=j;i.size=i.firstChild?pv.sum(i.childNodes,function(l){return l.size}):c.$size.apply(c,(f[0]=i,f))});f.shift();switch(b.order){case "ascending":d.sort(function(i,j){return i.size-j.size});break;case "descending":d.sort(function(i,j){return j.size-i.size});break}var h=1/g;d.minBreadth=0;d.breadth= +0.5;d.maxBreadth=1;d.visitBefore(function(i){for(var j=i.minBreadth,l=i.maxBreadth-j,k=i.firstChild;k;k=k.nextSibling){k.minBreadth=j;k.maxBreadth=j+=k.size/i.size*l;k.breadth=(j+k.minBreadth)/2}});d.visitAfter(function(i,j){i.minDepth=(j-1)*h;i.maxDepth=i.depth=j*h});pv.Layout.Hierarchy.NodeLink.buildImplied.call(this,b)}};pv.Layout.Partition.Fill=function(){pv.Layout.Partition.call(this);pv.Layout.Hierarchy.Fill.constructor.call(this)};pv.Layout.Partition.Fill.prototype=pv.extend(pv.Layout.Partition); +pv.Layout.Partition.Fill.prototype.buildImplied=function(b){pv.Layout.Partition.prototype.buildImplied.call(this,b)||pv.Layout.Hierarchy.Fill.buildImplied.call(this,b)};pv.Layout.Arc=function(){pv.Layout.Network.call(this);var b,c,d,f=this.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.directed;b=g.orient=="radial"?"linear":"polar";d=g.orient=="right"||g.orient=="top"};this.link.data(function(g){var h=g.sourceNode;g=g.targetNode;return d!=(c||h.breadth>1)*f:null}).bottom(function(l,k){return d=="mirror"?k&1?null:(k+1>>1)*-f:(k&1||-1)*(k+1>>1)*f}).fillStyle(function(l,k){return(k&1?h:i)((k>>1)+1)});this.band.add=function(l){return b.add(pv.Panel).extend(c).add(l).extend(this)}};pv.Layout.Horizon.prototype=pv.extend(pv.Layout).property("bands",Number).property("mode",String).property("backgroundStyle",pv.color).property("positiveStyle",pv.color).property("negativeStyle",pv.color); +pv.Layout.Horizon.prototype.defaults=(new pv.Layout.Horizon).extend(pv.Layout.prototype.defaults).bands(2).mode("offset").backgroundStyle("white").positiveStyle("#1f77b4").negativeStyle("#d62728"); +pv.Layout.Rollup=function(){pv.Layout.Network.call(this);var b=this,c,d,f=b.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.$rollup.nodes;d=g.$rollup.links};this.node.data(function(){return c}).size(function(g){return g.nodes.length*20});this.link.interpolate("polar").eccentricity(0.8);this.link.add=function(g){return b.add(pv.Panel).data(function(){return d}).add(g).extend(this)}};pv.Layout.Rollup.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean); +pv.Layout.Rollup.prototype.x=function(b){this.$x=pv.functor(b);return this};pv.Layout.Rollup.prototype.y=function(b){this.$y=pv.functor(b);return this}; +pv.Layout.Rollup.prototype.buildImplied=function(b){function c(r){return i[r]+","+j[r]}if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var d=b.nodes,f=b.links,g=b.directed,h=d.length,i=[],j=[],l=0,k={},q={},o=pv.Mark.stack,n={parent:this};o.unshift(null);for(var m=0;ml.index?l.index+","+d.index:d.index+","+l.index;(o=q[h])||(o=q[h]={sourceNode:d,targetNode:l,linkValue:0,links:[]});o.links.push(f[m]);o.linkValue+=f[m].linkValue}b.$rollup={nodes:pv.values(k),links:pv.values(q)}}}; +pv.Layout.Matrix=function(){pv.Layout.Network.call(this);var b,c,d,f,g,h=this.buildImplied;this.buildImplied=function(i){h.call(this,i);b=i.nodes.length;c=i.width/b;d=i.height/b;f=i.$matrix.labels;g=i.$matrix.pairs};this.link.data(function(){return g}).left(function(){return c*(this.index%b)}).top(function(){return d*Math.floor(this.index/b)}).width(function(){return c}).height(function(){return d}).lineWidth(1.5).strokeStyle("#fff").fillStyle(function(i){return i.linkValue?"#555":"#eee"}).parent= +this;delete this.link.add;this.label.data(function(){return f}).left(function(){return this.index&1?c*((this.index>>1)+0.5):null}).top(function(){return this.index&1?null:d*((this.index>>1)+0.5)}).textMargin(4).textAlign(function(){return this.index&1?"left":"right"}).textAngle(function(){return this.index&1?-Math.PI/2:0});delete this.node};pv.Layout.Matrix.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean);pv.Layout.Matrix.prototype.sort=function(b){this.$sort=b;return this}; +pv.Layout.Matrix.prototype.buildImplied=function(b){if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var c=b.nodes,d=b.links,f=this.$sort,g=c.length,h=pv.range(g),i=[],j=[],l={};b.$matrix={labels:i,pairs:j};f&&h.sort(function(m,r){return f(c[m],c[r])});for(var k=0;kl)k=null;if(g){if(k&&g.scene==k.scene&&g.index==k.index)return;pv.Mark.dispatch("unpoint",g.scene,g.index)}if(g=k){pv.Mark.dispatch("point",k.scene,k.index);pv.listen(this.root.canvas(),"mouseout",f)}}function f(k){if(g&&!pv.ancestor(this,k.relatedTarget)){pv.Mark.dispatch("unpoint",g.scene,g.index);g=null}}var g,h=null,i=1,j=1,l=arguments.length?b*b:900;d.collapse=function(k){if(arguments.length){h=String(k);switch(h){case "y":i= +1;j=0;break;case "x":i=0;j=1;break;default:j=i=1;break}return d}return h};return d}; +pv.Behavior.select=function(){function b(j){g=this.index;f=this.scene;i=this.mouse();h=j;h.x=i.x;h.y=i.y;h.dx=h.dy=0;pv.Mark.dispatch("selectstart",f,g)}function c(){if(f){f.mark.context(f,g,function(){var j=this.mouse();h.x=Math.max(0,Math.min(i.x,j.x));h.y=Math.max(0,Math.min(i.y,j.y));h.dx=Math.min(this.width(),Math.max(j.x,i.x))-h.x;h.dy=Math.min(this.height(),Math.max(j.y,i.y))-h.y;this.render()});pv.Mark.dispatch("select",f,g)}}function d(){if(f){pv.Mark.dispatch("selectend",f,g);f=null}}var f, +g,h,i;pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; +pv.Behavior.resize=function(b){function c(l){h=this.index;g=this.scene;j=this.mouse();i=l;switch(b){case "left":j.x=i.x+i.dx;break;case "right":j.x=i.x;break;case "top":j.y=i.y+i.dy;break;case "bottom":j.y=i.y;break}pv.Mark.dispatch("resizestart",g,h)}function d(){if(g){g.mark.context(g,h,function(){var l=this.mouse();i.x=Math.max(0,Math.min(j.x,l.x));i.y=Math.max(0,Math.min(j.y,l.y));i.dx=Math.min(this.parent.width(),Math.max(l.x,j.x))-i.x;i.dy=Math.min(this.parent.height(),Math.max(l.y,j.y))-i.y; +this.render()});pv.Mark.dispatch("resize",g,h)}}function f(){if(g){pv.Mark.dispatch("resizeend",g,h);g=null}}var g,h,i,j;pv.listen(window,"mousemove",d);pv.listen(window,"mouseup",f);return c}; +pv.Behavior.pan=function(){function b(){g=this.index;f=this.scene;i=pv.vector(pv.event.pageX,pv.event.pageY);h=this.transform();j=1/(h.k*this.scale);if(l)l={x:(1-h.k)*this.width(),y:(1-h.k)*this.height()}}function c(){if(f){f.mark.context(f,g,function(){var k=h.translate((pv.event.pageX-i.x)*j,(pv.event.pageY-i.y)*j);if(l){k.x=Math.max(l.x,Math.min(0,k.x));k.y=Math.max(l.y,Math.min(0,k.y))}this.transform(k).render()});pv.Mark.dispatch("pan",f,g)}}function d(){f=null}var f,g,h,i,j,l;b.bound=function(k){if(arguments.length){l= +Boolean(k);return this}return Boolean(l)};pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; +pv.Behavior.zoom=function(b){function c(){var f=this.mouse(),g=pv.event.wheel*b;f=this.transform().translate(f.x,f.y).scale(g<0?1E3/(1E3-g):(1E3+g)/1E3).translate(-f.x,-f.y);if(d){f.k=Math.max(1,f.k);f.x=Math.max((1-f.k)*this.width(),Math.min(0,f.x));f.y=Math.max((1-f.k)*this.height(),Math.min(0,f.y))}this.transform(f).render();pv.Mark.dispatch("zoom",this.scene,this.index)}var d;arguments.length||(b=1/48);c.bound=function(f){if(arguments.length){d=Boolean(f);return this}return Boolean(d)};return c}; +pv.Geo=function(){}; +pv.Geo.projections={mercator:{project:function(b){return{x:b.lng/180,y:b.lat>85?1:b.lat<-85?-1:Math.log(Math.tan(Math.PI/4+pv.radians(b.lat)/2))/Math.PI}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(2*Math.atan(Math.exp(b.y*Math.PI))-Math.PI/2)}}},"gall-peters":{project:function(b){return{x:b.lng/180,y:Math.sin(pv.radians(b.lat))}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(Math.asin(b.y))}}},sinusoidal:{project:function(b){return{x:pv.radians(b.lng)*Math.cos(pv.radians(b.lat))/Math.PI, +y:b.lat/90}},invert:function(b){return{lng:pv.degrees(b.x*Math.PI/Math.cos(b.y*Math.PI/2)),lat:b.y*90}}},aitoff:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat);var d=Math.acos(Math.cos(b)*Math.cos(c/2));return{x:2*(d?Math.cos(b)*Math.sin(c/2)*d/Math.sin(d):0)/Math.PI,y:2*(d?Math.sin(b)*d/Math.sin(d):0)/Math.PI}},invert:function(b){var c=b.y*Math.PI/2;return{lng:pv.degrees(b.x*Math.PI/2/Math.cos(c)),lat:pv.degrees(c)}}},hammer:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat); +var d=Math.sqrt(1+Math.cos(b)*Math.cos(c/2));return{x:2*Math.SQRT2*Math.cos(b)*Math.sin(c/2)/d/3,y:Math.SQRT2*Math.sin(b)/d/1.5}},invert:function(b){var c=b.x*3;b=b.y*1.5;var d=Math.sqrt(1-c*c/16-b*b/4);return{lng:pv.degrees(2*Math.atan2(d*c,2*(2*d*d-1))),lat:pv.degrees(Math.asin(d*b))}}},identity:{project:function(b){return{x:b.lng/180,y:b.lat/90}},invert:function(b){return{lng:b.x*180,lat:b.y*90}}}}; +pv.Geo.scale=function(b){function c(m){if(!o||m.lng!=o.lng||m.lat!=o.lat){o=m;m=d(m);n={x:l(m.x),y:k(m.y)}}return n}function d(m){return j.project({lng:m.lng-q.lng,lat:m.lat})}function f(m){m=j.invert(m);m.lng+=q.lng;return m}var g={x:0,y:0},h={x:1,y:1},i=[],j=pv.Geo.projections.identity,l=pv.Scale.linear(-1,1).range(0,1),k=pv.Scale.linear(-1,1).range(1,0),q={lng:0,lat:0},o,n;c.x=function(m){return c(m).x};c.y=function(m){return c(m).y};c.ticks={lng:function(m){var r;if(i.length>1){var s=pv.Scale.linear(); +if(m==undefined)m=10;r=s.domain(i,function(u){return u.lat}).ticks(m);m=s.domain(i,function(u){return u.lng}).ticks(m)}else{r=pv.range(-80,81,10);m=pv.range(-180,181,10)}return m.map(function(u){return r.map(function(x){return{lat:x,lng:u}})})},lat:function(m){return pv.transpose(c.ticks.lng(m))}};c.invert=function(m){return f({x:l.invert(m.x),y:k.invert(m.y)})};c.domain=function(m,r){if(arguments.length){i=m instanceof Array?arguments.length>1?pv.map(m,r):m:Array.prototype.slice.call(arguments); +if(i.length>1){var s=i.map(function(x){return x.lng}),u=i.map(function(x){return x.lat});q={lng:(pv.max(s)+pv.min(s))/2,lat:(pv.max(u)+pv.min(u))/2};s=i.map(d);l.domain(s,function(x){return x.x});k.domain(s,function(x){return x.y})}else{q={lng:0,lat:0};l.domain(-1,1);k.domain(-1,1)}o=null;return this}return i};c.range=function(m,r){if(arguments.length){if(typeof m=="object"){g={x:Number(m.x),y:Number(m.y)};h={x:Number(r.x),y:Number(r.y)}}else{g={x:0,y:0};h={x:Number(m),y:Number(r)}}l.range(g.x,h.x); +k.range(h.y,g.y);o=null;return this}return[g,h]};c.projection=function(m){if(arguments.length){j=typeof m=="string"?pv.Geo.projections[m]||pv.Geo.projections.identity:m;return this.domain(i)}return m};c.by=function(m){function r(){return c(m.apply(this,arguments))}for(var s in c)r[s]=c[s];return r};arguments.length&&c.projection(b);return c};