Scraping from an interactive chart





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I would like to retrieve information from charts that shows you the information of a datapoint when you are with the arrow of your mouse on the Y coordinate The link to an image that shows my situation. The red X is where my mouse was pointing.



In my mind I wanted to create a scraper that simulates my mouse moving a pixel after another and each time save the data showed.



Can you help my please?
Thank you very much










share|improve this question























  • What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

    – Umair
    Nov 24 '18 at 13:35











  • Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

    – S. Mrtz
    Nov 24 '18 at 13:38


















0















I would like to retrieve information from charts that shows you the information of a datapoint when you are with the arrow of your mouse on the Y coordinate The link to an image that shows my situation. The red X is where my mouse was pointing.



In my mind I wanted to create a scraper that simulates my mouse moving a pixel after another and each time save the data showed.



Can you help my please?
Thank you very much










share|improve this question























  • What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

    – Umair
    Nov 24 '18 at 13:35











  • Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

    – S. Mrtz
    Nov 24 '18 at 13:38














0












0








0








I would like to retrieve information from charts that shows you the information of a datapoint when you are with the arrow of your mouse on the Y coordinate The link to an image that shows my situation. The red X is where my mouse was pointing.



In my mind I wanted to create a scraper that simulates my mouse moving a pixel after another and each time save the data showed.



Can you help my please?
Thank you very much










share|improve this question














I would like to retrieve information from charts that shows you the information of a datapoint when you are with the arrow of your mouse on the Y coordinate The link to an image that shows my situation. The red X is where my mouse was pointing.



In my mind I wanted to create a scraper that simulates my mouse moving a pixel after another and each time save the data showed.



Can you help my please?
Thank you very much







web-scraping scrapy screen-scraping scrapy-spider






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 24 '18 at 9:47









S. MrtzS. Mrtz

83




83













  • What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

    – Umair
    Nov 24 '18 at 13:35











  • Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

    – S. Mrtz
    Nov 24 '18 at 13:38



















  • What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

    – Umair
    Nov 24 '18 at 13:35











  • Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

    – S. Mrtz
    Nov 24 '18 at 13:38

















What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

– Umair
Nov 24 '18 at 13:35





What site is that? that site must be loading data in JSON format via an AJAX call or they have data already there in initial response, send me the site link

– Umair
Nov 24 '18 at 13:35













Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

– S. Mrtz
Nov 24 '18 at 13:38





Thank you very much. Here is the link bitcoinvisuals.com/ln-capacity

– S. Mrtz
Nov 24 '18 at 13:38












1 Answer
1






active

oldest

votes


















1














They are loading data from https://bitcoinvisuals.com/static/data/data_daily.csv URL as CSV and then passing to the graph



They are using this Javascript code to manipulate data



// Iterate through chunk data
for (i = 0; i < data_csv.length; i++) {
var day = ( data_csv[i].day == "" ? null : new Date(data_csv[i].day).getTime() );
var btc = ( data_csv[i].capacity_total == "" ? null : +data_csv[i].capacity_total );

// If btc exists, try to convert
if (btc) {
var usd = ( data_csv[i].price_btc == "" ? null : (btc * +data_csv[i].price_btc) );
}

// Push to series
if (day) {
// If either exists
if (btc || usd) {
series_btc.addPoint([day, btc], redraw = false)
series_usd.addPoint([day, usd], redraw = false)
}
}
}


Note that capacity_total is the column that exists in that CSV






share|improve this answer
























  • Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

    – S. Mrtz
    Nov 24 '18 at 15:08











  • @S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

    – Umair
    Nov 25 '18 at 10:20












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456970%2fscraping-from-an-interactive-chart%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














They are loading data from https://bitcoinvisuals.com/static/data/data_daily.csv URL as CSV and then passing to the graph



They are using this Javascript code to manipulate data



// Iterate through chunk data
for (i = 0; i < data_csv.length; i++) {
var day = ( data_csv[i].day == "" ? null : new Date(data_csv[i].day).getTime() );
var btc = ( data_csv[i].capacity_total == "" ? null : +data_csv[i].capacity_total );

// If btc exists, try to convert
if (btc) {
var usd = ( data_csv[i].price_btc == "" ? null : (btc * +data_csv[i].price_btc) );
}

// Push to series
if (day) {
// If either exists
if (btc || usd) {
series_btc.addPoint([day, btc], redraw = false)
series_usd.addPoint([day, usd], redraw = false)
}
}
}


Note that capacity_total is the column that exists in that CSV






share|improve this answer
























  • Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

    – S. Mrtz
    Nov 24 '18 at 15:08











  • @S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

    – Umair
    Nov 25 '18 at 10:20
















1














They are loading data from https://bitcoinvisuals.com/static/data/data_daily.csv URL as CSV and then passing to the graph



They are using this Javascript code to manipulate data



// Iterate through chunk data
for (i = 0; i < data_csv.length; i++) {
var day = ( data_csv[i].day == "" ? null : new Date(data_csv[i].day).getTime() );
var btc = ( data_csv[i].capacity_total == "" ? null : +data_csv[i].capacity_total );

// If btc exists, try to convert
if (btc) {
var usd = ( data_csv[i].price_btc == "" ? null : (btc * +data_csv[i].price_btc) );
}

// Push to series
if (day) {
// If either exists
if (btc || usd) {
series_btc.addPoint([day, btc], redraw = false)
series_usd.addPoint([day, usd], redraw = false)
}
}
}


Note that capacity_total is the column that exists in that CSV






share|improve this answer
























  • Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

    – S. Mrtz
    Nov 24 '18 at 15:08











  • @S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

    – Umair
    Nov 25 '18 at 10:20














1












1








1







They are loading data from https://bitcoinvisuals.com/static/data/data_daily.csv URL as CSV and then passing to the graph



They are using this Javascript code to manipulate data



// Iterate through chunk data
for (i = 0; i < data_csv.length; i++) {
var day = ( data_csv[i].day == "" ? null : new Date(data_csv[i].day).getTime() );
var btc = ( data_csv[i].capacity_total == "" ? null : +data_csv[i].capacity_total );

// If btc exists, try to convert
if (btc) {
var usd = ( data_csv[i].price_btc == "" ? null : (btc * +data_csv[i].price_btc) );
}

// Push to series
if (day) {
// If either exists
if (btc || usd) {
series_btc.addPoint([day, btc], redraw = false)
series_usd.addPoint([day, usd], redraw = false)
}
}
}


Note that capacity_total is the column that exists in that CSV






share|improve this answer













They are loading data from https://bitcoinvisuals.com/static/data/data_daily.csv URL as CSV and then passing to the graph



They are using this Javascript code to manipulate data



// Iterate through chunk data
for (i = 0; i < data_csv.length; i++) {
var day = ( data_csv[i].day == "" ? null : new Date(data_csv[i].day).getTime() );
var btc = ( data_csv[i].capacity_total == "" ? null : +data_csv[i].capacity_total );

// If btc exists, try to convert
if (btc) {
var usd = ( data_csv[i].price_btc == "" ? null : (btc * +data_csv[i].price_btc) );
}

// Push to series
if (day) {
// If either exists
if (btc || usd) {
series_btc.addPoint([day, btc], redraw = false)
series_usd.addPoint([day, usd], redraw = false)
}
}
}


Note that capacity_total is the column that exists in that CSV







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 24 '18 at 13:55









UmairUmair

5,60093192




5,60093192













  • Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

    – S. Mrtz
    Nov 24 '18 at 15:08











  • @S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

    – Umair
    Nov 25 '18 at 10:20



















  • Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

    – S. Mrtz
    Nov 24 '18 at 15:08











  • @S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

    – Umair
    Nov 25 '18 at 10:20

















Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

– S. Mrtz
Nov 24 '18 at 15:08





Amazing, thank you very much. I am just a noob and I don't have yet much of experience. If I may abuse of your knowledge and kindness a little bit more I found this chart even more difficoult to scrap bitinfocharts.com/comparison/bitcoin-hashrate.html

– S. Mrtz
Nov 24 '18 at 15:08













@S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

– Umair
Nov 25 '18 at 10:20





@S.Mrtz dude that is in their source code, see view-source:bitinfocharts.com/comparison/bitcoin-hashrate.html ... you have to do that on your own, thats how you learn

– Umair
Nov 25 '18 at 10:20




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456970%2fscraping-from-an-interactive-chart%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini