Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to embed any of the graphs from Github in HTML?

Tags:

html

github

Is there any way to embed any of the graphs from Github (any of the 4 found at https://github.com/Vizzuality/CartoDB-SQL-API/graphs)? For example, this one showing the changes in the lines of code.

Since the structure of the page is consistent, I'm pretty sure I can scrape it, but that's a bit cheeky at best. Note that I want the image itself - not the whole page - that is contained in the div:

<div class="graphs wheader">

This question is the nearest thing I've found for this, but obviously doesn't apply for Github. Would rather not reinvent the wheel!

PS: that's not the project I'm interested in embedding, it's just that that one has enough data on it to show.

like image 759
frackham Avatar asked Dec 08 '12 16:12

frackham


1 Answers

Those graphs are built dynamically via javascript (d3.js) and SVG. This makes them fairly difficult to extract. However, you might be able to recreate them; inspect the javascript resources on the given page which are used to build the graphs.

like image 141
marcus erronius Avatar answered Nov 15 '22 00:11

marcus erronius