Space climate and space weather over the past 400 years: 2. Proxy indicators of geomagnetic storm and substorm occurrence