0

I've done a fair bit of coding, but haven't really done anything with the browser. I have a python script that will be running on a chron job that will auto-generate .csv output files, somewhere on a network drive. I'd like to have an intranet browser display some sort of page where users on the network would be able to choose from drop-down menus to choose what .csv data will be displayed as a graph.I was thinking of using chart.js to handle the graphs.

So, to summarize:

  • I have many .csv files that will be auto-generated every couple of days on a network drive that many users have access to.
  • I'd like to create an internal browser-based display of the data.
    • I'm considering using php for this, but was unsure if there is a better choice.
  • My code for the php/HTML/javascript/whatever I use, needs to:
    • Read in the .csv files
    • Take user input via dropdown menus to see what data the user wants to see.
    • Display the data with something like chart.js, though I'm not sure what Javascript can play nicely with when it comes to these things.

My initial thought is to use a php page that embeds HTML and Javascript in it, but since I've never did any sort of browser-based coding, I'd be open to the opinion of anyone with more experience. Thanks!

3
  • 1
    This is a pretty broad question and keen to attract opinionated answers. You might want to pare down to specifics, or checkout softwarerecs.stackexchange.com Commented Jun 9, 2016 at 16:46
  • 1
    I'd suggest a html page & javascript for displaying the information, and make ajax requests from the included javascript that requests filtered data from a php page. Once you get the basics of that working then you can expand on it to use chart.js and "pretty it up" a bit Commented Jun 9, 2016 at 16:47
  • 1
    Since you seem to have experience with python I'd suggest you use a python web framework instead of PHP. On the front end you do not really have a choice. The only options are HTML, CSS and JavaScript. (There are languages that compile to HTML, CSS and JavaScript but if you do not have experience with these web technologies you might want to lean the basics first) Commented Jun 9, 2016 at 16:55

1 Answer 1

1

Option 1) Convert CSV to JSON in a php file (Convert CSV to JSON using PHP), use AJAX to transfer that data to your HTML page, then use chart js to display the data once you have it. Using html dropdown menus, the values selected on these menus can be used as parameters in your ajax calls, so your php code can use those parameters to determine what CSV to load.

Option 2) Keep the CSV format, and use that data directly in libraries like C3js (here are examples http://c3js.org/samples/data_load.html). You can then use JS and your HTML dropdown to determine what file to grab.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.