Excel and .csv lesson learned… Includes painful waste of time, unfortunately.

I found out that when you export data in .csv format from #Excel make sure you don’t have a trailing space after any column names. They are exported as “col_name ” with the space AND quotes. Beware when using them to index your array! They will fail. Simply delete any hidden spaces in your column names before exporting. Please. For your own sanity. #DataAnalytics #ERROR #painful lesson.

Peter Bakke DOH!

Getting python.exe to run from any directory on my PC so I could use D3’s external data file load function

The only way I could get python (python.exe) to run from any directory via from the command line was to set the SYSTEM variable PATH, *not* by changing the USER variable path. Arghhh. Took an hour of searching the Oracle (i.e., Google) to finally discover this.

Where I was headed was that I needed to steer to a local directory in the command line in order to start a local web server for using D3 …  http://localhost:8000/whatever.html. I started a local web server using  ‘python -m SimpleHTTPServer’.  Loading a local external file in D3, like:

d3.tsv("data.tsv", function(data) {

requires a web server to be running (due to AJAX calls).

Unlike other frameworks / apps, D3 does *not* use the local machine’s OS file system to load files, it needs a web server. Who knew? Arghhh (redux).

Frustration Peter Bakke