anvaka / pm

package managers visualization
https://anvaka.github.io/pm/
MIT License
1.57k stars 134 forks source link

CPAN graph? #11

Open wchristian opened 9 years ago

wchristian commented 9 years ago

I don't have the JS chops to build one myself, but i can tell you where to easily get the data.

There's the ElasticSearch-based metacpan API which is documented here and here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html https://github.com/CPAN-API/cpan-api/blob/master/docs/API-docs.md

To get all the distributions on CPAN, you can build on this query: http://api.metacpan.org/v0/distribution/_search

To get the dependencies for each distribution, you can build on this query: http://api.metacpan.org/v0/search/reverse_dependencies/MetaCPAN-API

Note also that these URLs can easily be tested on the metacpan explorer: https://explorer.metacpan.org/#/5706053

Total graph size should be around 32469 nodes.

anvaka commented 9 years ago

Thank you! I tried indexing CPAN as well long time ago: https://github.com/anvaka/allcpan But that indexer had a bug in it. If I remember correctly it was assigning each package 5,000 dependents or something like this.

I didn't have time to debug it in more details but I'll come back to it!