Figure: Redshift
The Doppler Shift is governed by the equation below:
The difference between the shifted (observed) value λshift and the rest (unshifted) value λrest can be used to calculate the radial velocity. This is the velocity along the line of sight between the source and observer - i.e. whether the object is moving toward us or away from us. The Doppler Shift only gives you information about this one component of velocity. Note that velocities away from us are considered positive and velocities toward us are negative.
The simulation presented here allows one to experiment with the speed and direction of a star's motion relative to the earth and see the effect on an absorption lines from the star's spectrum. Experiment with this simulator. Note that there are many ways to get a given shift since the Doppler Effect only tells you about the radial component of velocity and there are many combinations of speed and angle which will give a certain radial component. Astronomers typically observe the spectra of an object, make precise measurements of λshift for spectral lines for which they know accurate values of λrest, and then calculate the radial velocity using the Doppler Equation.
The doppler shift of an absorption line in a star's spectrum.
These shifts show up in all the lines of a spectrum. For example, the diagram below depicts hydrogen emission lines for three sources with different velocities. The top rows shows a source receding at 300 km/s and redshifted lines. The middle row has unshifted lines - like what would be produced by a hydrogen discharge tube in a laboratory. The bottom row shows a source approaching at 600 km/s and blueshifted spectral lines.
Credit: The Nebraska Astronomy Applet Project, http://astro.unl.edu/naap/splash/.
http://astro.unl.edu/naap/esp/dopplereffect.html