1: Dataset. Http://earthquake.usgs.gov/earthquakes/eqarchives/epic/epic_global.php
PVDF 1973 01 12 115656 37.93-90.52 20 3.2 lgslm 4f ........ PVDF 1973 01 30 071636.60-17.56 167.85 3 3f ........ partial code 1973 02 04 091042.20-3.76 151.96 19 3f ........ PVDF 1973 02 15 230608.90 36.81-115.90 4 3f ........ PVDF 1973 02 15 231457.10 36.81-115.91 4 3f ........ partial code 1973 02 20 113848.80 45.01 36.41 17 4.2 mbgs 4f ........ PVDF 1973 02 21 144557.30 34.06-119.04 8 5.9 mlpas 7C ........ PVDF 1973 02 25 100944.80 34.73 19 132.34 mbgs 3f ........ PVDF 1973 02 28 082132.30 39.72-75.44 14 3.8 lgslm 6f ........ partial code 1973 03 09 190912.80-34.13 150.27 13 5.5 mbgs 6D ........ partial code 1973 03 10 095000.30-15.18-173.52 8 5.6 mbgs 2f ........ PVDF 1973 03 22 211309.60-5.47 151.27 18 4.9 mbgs 2f ........ PVDF 1973 03 24 003436.80 31.72 139.30 20 5.9 ukbrk 2f ........ partial code 1973 03 29 175152.40 36.10 141.55 15 3.9 mbgs 2f ........ partial code 1973 04 05 043208.10 11.94 122.50 6 5.4 mbgs 4f ........ partial code 1973 04 07 193006.90 41.49 19.98 16 4.7 mbgs 6f ........ partial code 1973 04 11 051218.10-64.61 15 160.05 mbgs 5f ........ PVDF 1973 04 11 120610 38.81 140.80 15 4.4 mbgs 2f ........ partial code 1973 04 13 144032.60 41.84 22.72 5 4f ........ partial code 1973 04 29 143753.90-34.64 19 4.07 mbgs 6f ........ partial code 1973 05 074058.10 40.89 140.31 17 5.1 mbgs 6f ........ partial code 1973 05 12 140502.80-3.94 152.06 14 5.6 mbgs 3f ........ PVDF 1973 05 12 162009.20-3.73 152.08 13 6.0 ukpas 5f ........
2:Code:
Package COM. mojia. mr. demo; public class parser {private string line; Public Parser (string line) {This. line = line;} Public String getyear () {int Index = line. indexof ("PVDF"); string year = line. substring (index + 7, index + 11); return year;} public Boolean isbig () {string [] STRs = line. split (""); string temp = ""; for (string STR: STRs) {If (Str. contains ("F. ") | Str. contains ("D. ") | Str. contains ("M. ") | Str. contains ("cm") | Str. contains ("FM") | Str. contains (". M ") {temp = STR ;}} if (temp. equals ("") {system. out. println ("temp =" + temp); string leverstr = ""; if (temp. endswith ("F. ") {leverstr = temp. replace ("F. "," ");} else if (temp. endswith ("F") {leverstr = temp. replace ("F", "") ;}int lever =-1; try {lever = integer. parseint (leverstr);} catch (exception e) {system. out. println ("format error");} If (lever >=4) {return true ;}} return false ;}}
3: Chart Display
See the following figure. X axis indicates the time 1980--2009