Session 5, #6: Additional Challenges: Shading by Magnitude


Where an earthquake occurs is one piece of information collected. Another is the magnitude, the size based on the quantity of energy released (measured on the Richter Scale). For the USGS data files, magnitude is stored in the fourth column.

Let's use color to indicate the magnitude of the quake. We will set the red to be the magnitude times 40 (since magnitudes usually range from near 0 to about 6, but colors range from 0 to 255). For example,

The Python code is:

			teddy.color(mag*40, 0, 0)
		

Remember colors can be specified by (Red, Green, Blue) values.


Challenges:
• Change teddy to be circular or turtle shaped to make the earthquakes more visible on the map.
• Change the coloring from shades of red to shades of purples.