title: How to save text from a webpage systematically with JavaScript
body: <p>I'll explain my situation in it's entirety.</p>
  
  <p>I am a student researcher, and am studying the effect that an angled solar panel has on the battery life of an electric golf cart. I would like to be able to drive a more realistic route, but to estimate the energy used from a more complex route, I need the spatial coordinates so that I can calculate the work done between each point. </p>
  
  <p>I've been using GPS for some things, which is amazing for latitude and longitude data, but the altitude data is awful; it tends to jump by about 10-30 meters every ten or so seconds when it refreshes, and this is not ideal for local work calculations. I then started to look into using the Google Maps API, and figured out a way to use a browser so that I can input a URL with coordinates and it will display a webpage with a JSON object that contains the altitude data from google maps, which I hope to be more continuous than that which I can currently gain.</p>
  
  <p><strong>My problem, and thus question, is this:</strong> </p>
  
  <p>I have hundreds of data points for each run that I do in my golf cart, and don't want to go through them all plugging in latitude and longitude and then copy and pasting the data to a CSV file. </p>
  
  <p>I would like some way to automate this process, most likely with JavaScript, such that I can have the JavaScript go through a bunch of latitudes and longitudes, save the text from each webpage to some systematic set of files like "run1point1.json","run1point2.json", etc. I also think that I need the JSON files, not the HTML form of the webpage, since I'm not sure how I would parse the HTML for the data.</p>
  
  <p>I think that if I can minimally get all those .json files, then I'll be able to parse the data in R to get it into a CSV. When answering, don't assume that I know anything that I'm talking about; I acknowledge that I'm only a student, and since my major is mathematics and I have only taken introductory programming courses, I know that my skills and especially my conceptual understanding of things may be skewed :)</p>