title: Mapping a local CSV file to a remote server and reading latest data in CSV for populating graphs
body: <p>So currently I have a Raspberry Pi that gets the data from somewhere, processes it, and writes it to a local CSV file. The data comes at irregular intervals and I'm planning on displaying these numbers in CSV onto a webserver, perhaps in the form of graphs.</p>
  <p>I did look into fusion charts and they do seem to have a real-time graphing option, which I was able to use. Here are a few concerns: (apologies for dumb questions: not too equipped with web dev)</p>
  <ul>
  <li><p>Is merely running an HTML file on a web browser basically acts as a webserver? I tried out <a href="https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md" rel="nofollow noreferrer">Nginx</a> and all it did was created an HTML which I was able to run on a browser, which I was able to do with the source code from fusion charts that I stored in a separate HTML.</p>
  </li>
  <li><p>How would I go about constantly keeping track of the latest data being written to a CSV? In the source code of fusion charts, I see it calls a function to update the chart within <code>setInterval()</code> which also takes an argument to set the frequency. With this, I could maybe just use the last line of the CSV while keeping track of the index, so the next data is taken from <code>index+1</code> and so on...</p>
  </li>
  <li><p>How do I map a local file to a server without me having to manually upload it myself? Just to test, I uploaded the csv file to <a href="https://gist.githubusercontent.com/guest271314/c4eebf14b4a3cfd36f58/raw/37b82a07ec91e9f35396a23ee7aac26b8dd52c23/file.csv" rel="nofollow noreferrer">something like this on gist</a>. But ideally, I'd want the local CSV to be mapped to a remote server so the numbers are reflected in real-time based on the local file, and then the JS code will then simply read off the raw CSV file.</p>
  </li>
  </ul>