I want to build using accelerometer that measures the distance you ran and the time it took to run. and ultimately calculate the average velocity.
I thinking of attaching accelerometer to the feet or foot? how would I go about doing this?
I want to be able to compute it as a graph on the computer
You would be much better attaching it to something that moves in a steady manor rather than the legs. I would put it round the waist. In theory you need to integrate the acceleration readings to get a distance reading but in practice drift in the sensor limits the accuracy.
In theory you need to integrate the acceleration readings
Or you could try to isolate the shocks caused by footfall, count them and multiply by stride length.