Skip to content

si619 lab4 notes

Yuan Li edited this page Jul 11, 2019 · 18 revisions

Running a Python Server

For security reasons, browsers don't allow loading external files such as our data.csv. There are a few different ways to fix this, one of which is to set up a local server.

  • On the mac, open terminal and navigate to the "inclass" folder. Then execute on of the above commands depending on your python version. InthePowerShellwindow,type:
python -m SimpleHTTPServer 8000

OR

python3 -m http.server
  • In Google Chrome, type: localhost:8000 in your browser address bar and hit enter.

scale functions: D3 offers several useful functions that do the calculations for us. These are broadly called scale functions.

scale types: D3 offers the following types of scale types:

  • Scales with continuous input and continuous outputs (e.g., scaleLinear, scaleTime)
  • Scales with continuous input and discrete outputs (e.g., scaleQuantile ) ** Scales with discrete input and discrete outputs (e.g., scaleOrdnial, scaleBand)

Clone this wiki locally