Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Objectives: The focus of this assignment is understanding File input and output

ID: 3774183 • Letter: O

Question

Objectives:

The focus of this assignment is understanding File input and output

Program Background:

Files are used for long term, persistent storage. Files can store things like a previous program state, user preferences, or data to be processed. Many useful programs utilize file I/O for some purpose, such as reading a data file for interpretation/calculations, storing results, or both. Being able to quickly process and analyze large amounts of data is necessary for many fields. In this program you will be analyzing real crime data by state as reported on the FBI’s website. Data for each state is stored in its own CSV (comma separated values) file. Some sample files will be provided to you.

Program Description:

The program will allow the user to enter the name of a State, and if the CSV file for that state exists in the directory, it will read from that file and provide some crime statistics about that state and store the information. If the given State has already been analyzed it will read the stored data instead of processing the CSV file again.

The following classes are required:

·         CityCrimeData

·         StateCrimeData

·         StateCrimeStats

·         CrimeDataDriver

UML DIAGRAM FOR AND DISCUSSION FOR CityCrimeData

CityCrimeData

+ cityName : String

+ population : int

+ violentCrimeCount : int

+ murderCount : int

+ robberyCount : int

+ assaultCount : int

+ propertyCount : int

+ burglaryCount : int

+ larcentyCount : int

+ vehicleTheftCount : int

+ arsonCount : int

<<constructor>> CityCrimeData(name : String, pop : int, vio : int, mur : int, rob : int, aslt : int, pro : int, bur : int, lar : int, veh : int, ars : int)

The crime data in each file is broken down by major city. This class will store the data for one city. This is a very simple class. Many times we will just want a data type that is a collection of data without any methods or restrictions, which is called a tuple. Notice unlike more robust classes, all of the data members are public and therefore can be accessed directly.

Methods:

CityCrimeData(name : String, pop : int, vio : int, mur : int, rob : int, aslt : int, pro : int, bur : int, lar : int, veh : int, ars : int) – Class constructor. Sets data members to passed values.

UML DIAGRAM FOR AND DISCUSSION FOR StateCrimeData

StateCrimeData

-       stateName : String

-       crimeByCity : ArrayList<CityCrimeData>

<<constructor>> StateCrimeData()

+ readCrimeData( crimeFile : String ) throws FileNotFoundException

+ processCrimeData( ) : StateCrimeStats

- calculateCrimeRate(propertyCount : int, population : int) : double

A state’s crime data is a collection of all of its cities crime data, in this case stored in an ArrayList. This class has the methods to read in a CSV file, as well as process the crime statistics we are interested in.

Methods:

StateCrimeData() – Class constructor. Creates an ArrayList of CityCrimeData. The constructor does not set the state name; that will be determined from the CSV file read.

readCrimeData( crimeFile : String ) – This method takes the name of a CSV file, reads the contents, and stores them within the class’ data members. The CSV files first have the name of the State listed, every line after that is a comma separated sequence of values in the following format:

CITY NAME,POPULATION,VIOLENT CRIMES,MURDER,ROBBERY,ASSAULT,PROPERTY CRIME,BURGLARY,LARCENTY, VEHICLE THEFT,ARSON

For example, the first few lines of the Nebraska file look like this:

NEBRASKA

Alliance,8510,20,0,1,11,136,57,76,3,1

Ashland,2502,2,0,0,2,17,2,15,0,0

Aurora,4397,1,0,0,0,31,17,12,2,0

You will open this as a text file and read it using a Scanner, State first, then each city line by line, until all is read in. When reading the city data, read the entire line into a single String, and you can once again use the StringTokenizer class to parse out the data. In the previous use of StringTokenizer you used white space as a delimiter, in this case you will need to set the comma as a delimiter. StringTokenizer has a constructor to do just that:

StringTokenizer(str : String, delim : String)

The constructor takes the String to parse as well as a String that is a collection of characters to tokenize upon.

The nextToken() method will work the same as before, but parse on commas. Remember, nextToken() returns a String, most of the data are integer values, use Integer’s parseInt() method appropriately.

For each city data that is read in, create an instance of CityCrimeData and add it to the ArrayList.

processCrimeData( ) – Method for processing the crime data. This will go through the CityCrimeData to provide some statistics:

Population – Total population of the state

Violent Crimes – Total number of violent crimes in the state

Non-Vehicle Theft Crimes – Total number of theft crimes in the state. Non-Vehicle theft crimes are burglary, robbery, and larceny

City with Highest Property Crime Rate – While processing the cities, determines which city has the highest property crime rate. This is not property crime count, but rate. A crime rate is found by taking the (crime count/population)*100,000. Use these values to create and return an instance of StateCrimeStats.

calculateCrimeRate(propertyCount : int, population : int) – Private method for calculating crime rate as described above.

UML DIAGRAM FOR AND DISCUSSION FOR StateCrimeStats

StateCrimeStats implements Serializable

-       stateName : String

-       population : int

-       violentCrimes : int

-       nonVehicletheftCrimes : int

-       highestPropertyCrimeCity : String

-       highestPropertyCrimeRate : double

<<constructor>> StateCrimeStats( sta : String, pop : int, vio : int, thef : int, propCity : String, propRate : double)

     +    toString() : String

A Serializable class that holds the crime statistics for a State

Methods:

StateCrimeStats( sta : String, pop : int, vio : int, thef : int, propCity : String, propRate : double) – Class constructor. Sets data members to the passed values.

toString( ) : String – Returns a String with the data formatted in the follow way (uppercase denotes data member values to be output):

State: STATENAME

Population: POPULATION

Violent Crimes: VIOLENTCRIMES

Non-Vehicle Theft Crimes: NONVEHICLETHEFTCRIMES

Highest Property Crime Rate: HIGHESTPROPERTYCRIMECITY - HIGHESTPROPERTYCRIMERATE

For example, Nebraska would look like this:

State: NEBRASKA

Population: 1171794

Violent Crimes: 4177

Non-Vehicle Theft Crimes: 37696

Highest Property Crime Rate: Scottsbluff - 4781.829050

DISCUSSION FOR CrimeDataDriver

See expected output below discussion, if your output is different in any way you are subject to losing points.

The user will be asked to enter the name of a State (with no spaces, New York would be entered as, “NewYork”). If a Serialized file of that name exists, read the StateCrimeStats object from the file and output it. If it does not exist then create a new StateCrimeData instance and read from the State’s CSV file, output the crime statistics and write the StateCrimeStats object to a Serialized file. If the CSV file does not exist, an error message will be output. See example runs for details.

Example Runs (User input underlined)

For these examples the following CSV files are in the same directory (and are provided to you for testing):

California.csv

Nebraska.csv

NewYork.csv

Example Run #1

Enter state name: Nebraska

Processing new data...

State: NEBRASKA

Population: 1171794

Violent Crimes: 4177

Non-Vehicle Theft Crimes: 37696

Highest Property Crime Rate: Scottsbluff - 4781.829050

Nebraska's stats saved.

Example Run #2

After the previous run, there is now the file Nebraska.ser, while the output is mostly the same, notice the message before the statistics are output. In this case, since the statistical data already existed, it was loaded instead of reprocessing.

Enter state name: Nebraska

Loading existing data...

State: NEBRASKA

Population: 1171794

Violent Crimes: 4177

Non-Vehicle Theft Crimes: 37696

Highest Property Crime Rate: Scottsbluff - 4781.829050

Example Run #3

Enter state name: California

Processing new data...

State: CALIFORNIA

Population: 31696400

Violent Crimes: 124598

Non-Vehicle Theft Crimes: 778255

Highest Property Crime Rate: Industry - 466816.143498

California's stats saved.

Example Run #4

Enter state name: NewYork

Processing new data...

State: NEW YORK

Population: 13933096

Violent Crimes: 70155

Non-Vehicle Theft Crimes: 288702

Highest Property Crime Rate: Seneca Falls Town - 12362.404742

NewYork's stats saved.

Example Run #5

Enter state name: Idaho

Processing new data...

Error reading crime data

CSV Files

California

CALIFORNIA
Adelanto,31165,198,2,52,129,886,381,372,133,17
Agoura Hills,20762,19,0,10,7,306,109,185,12,7
Alameda,76206,158,0,85,63,1902,287,1285,330,17
Albany,19104,29,0,24,4,557,94,388,75,7
Alhambra,84710,163,1,81,72,1774,344,1196,234,7
Aliso Viejo,50005,25,0,4,19,315,71,224,20,3
Alturas,2681,28,1,2,21,71,23,46,2,0
American Canyon,20068,54,0,31,19,510,91,387,32,2
Anaheim,345320,1130,11,437,600,9611,1412,6518,1681,35
Anderson,10098,63,0,9,46,721,147,454,120,5
Antioch,106447,946,12,352,557,4440,1351,1872,1217,57
Apple Valley,71159,185,3,58,112,1594,596,775,223,22
Arcadia,57855,77,0,37,39,1518,376,1080,62,3
Arcata,17805,67,3,15,42,841,147,634,60,14
Arroyo Grande,17634,31,0,4,22,455,137,288,30,0
Artesia,16734,63,2,28,33,323,91,177,55,1
Arvin,20390,153,2,16,134,744,323,308,113,15
Atascadero,28938,97,1,24,60,544,119,400,25,7
Atherton,7278,10,0,1,8,115,34,78,3,1
Atwater,28906,182,1,22,152,1323,361,804,158,5
Auburn,13779,49,0,13,34,302,86,190,26,7
Avalon,3777,4,0,2,2,88,13,57,18,1
Avenal,14712,62,0,6,52,147,63,67,17,2
Azusa,47754,246,2,36,204,1098,256,671,171,6
Bakersfield,361859,1857,24,708,1082,16814,4605,9272,2937,193
Baldwin Park,76745,220,5,74,135,1370,280,727,363,8
Banning,30503,129,2,26,92,808,355,323,130,0
Barstow,23144,229,3,45,168,785,329,354,102,11
Bear Valley,5328,12,0,0,11,111,10,101,0,0
Beaumont,40208,85,1,20,56,1298,180,1015,103,6
Bell,35928,208,0,81,117,535,124,334,77,0
Bellflower,77594,279,1,105,164,1882,427,968,487,13
Bell Gardens,42980,120,1,56,60,763,141,351,271,2
Belmont,26697,27,1,4,17,437,129,269,39,1
Belvedere,2120,0,0,0,0,26,5,20,1,0
Benicia,27558,30,0,8,18,383,134,199,50,8
Berkeley,116217,562,4,410,122,5377,1055,3658,664,16
Beverly Hills,34780,77,0,29,43,1179,239,899,41,4
Big Bear Lake,5144,56,0,5,46,215,77,126,12,1
Biggs,1711,16,0,0,16,34,11,18,5,0
Bishop,3861,28,0,4,24,108,24,80,4,0
Blythe,20629,65,1,20,40,693,223,435,35,25
Bradbury,1080,1,0,0,1,16,5,9,2,0
Brawley,25753,61,0,7,49,1211,301,854,56,36
Brea,40600,64,2,22,36,1210,205,939,66,3
Brentwood,54301,89,0,20,58,1214,253,848,113,5
Brisbane,4429,5,0,1,4,98,19,73,6,1
Broadmoor,4301,14,0,2,9,55,20,29,6,0
Buellton,4927,7,0,1,3,62,15,46,1,0
Buena Park,82632,221,2,80,126,2165,361,1435,369,2
Burbank,104727,171,0,51,107,2430,285,1926,219,6
Burlingame,29936,37,0,12,23,665,148,472,45,5
Calabasas,24114,20,0,6,11,313,84,222,7,7
Calexico,39527,92,0,27,65,1474,362,837,275,3
California City,13339,87,0,9,74,683,425,239,19,0
Calimesa,8118,14,0,5,9,165,44,106,15,0
Calistoga,5223,9,0,1,7,75,27,45,3,0
Camarillo,66173,73,0,25,42,1130,205,849,76,9
Campbell,40549,106,2,24,68,1563,341,1016,206,11
Canyon Lake,10944,3,0,0,3,157,34,109,14,0
Capitola,10038,38,1,4,30,600,41,532,27,2
Carlsbad,110505,221,1,44,153,2085,525,1436,124,10
Carmel,3833,9,0,2,5,105,32,70,3,0
Carpinteria,13287,21,0,4,14,261,50,191,20,0
Carson,93415,400,3,148,234,2251,514,1248,489,9
Cathedral City,53064,149,4,44,92,1118,399,417,302,1
Central Marin,34105,41,0,12,24,695,276,358,61,1
Ceres,45876,133,1,41,82,1720,355,1026,339,14
Cerritos,49816,82,0,42,36,1802,374,1210,218,6
Chico,88226,299,2,95,161,2572,622,1568,382,37
Chino,80704,258,4,47,200,2044,518,1249,277,4
Chino Hills,76943,63,0,11,47,1017,315,615,87,4
Chowchilla,17696,81,0,7,71,452,196,213,43,7
Chula Vista,255073,595,2,248,316,5284,971,3532,781,35
Citrus Heights,85337,320,7,76,218,2653,483,1825,345,14
City of Angels,3729,9,0,1,7,57,28,26,3,0
Claremont,35623,37,0,23,12,894,280,546,68,5
Clayton,11439,2,0,2,0,101,37,54,10,0
Clearlake,14951,125,2,21,89,690,309,292,89,13
Cloverdale,8718,5,0,0,5,158,44,102,12,1
Clovis,99483,181,0,47,111,3404,879,2220,305,12
Coachella,43330,118,2,56,58,1372,358,634,380,5
Coalinga,16398,131,0,6,118,485,169,282,34,12
Colma,1481,5,0,1,3,273,13,238,22,1
Colton,53403,161,2,69,84,1936,532,1018,386,1
Colusa,5957,10,0,2,4,138,47,71,20,0
Commerce,12995,83,1,39,41,893,101,515,277,6
Compton,97907,1242,36,360,820,2538,579,1160,799,39
Concord,125464,407,1,159,235,4357,825,2764,768,9
Corcoran,23290,71,0,10,59,364,103,215,46,2
Corning,7631,47,0,4,43,300,89,173,38,2
Corona,160159,162,9,65,74,3439,644,2305,490,9
Coronado,23183,11,0,4,5,555,57,470,28,4
Costa Mesa,112538,252,1,94,111,3556,512,2748,296,13
Cotati,7388,35,0,6,29,79,31,41,7,0
Covina,48524,138,0,52,77,1344,369,818,157,9
Crescent City,7333,94,0,13,74,202,61,125,16,0
Cudahy,24091,111,0,38,69,320,64,174,82,1
Culver City,39452,161,0,88,66,1616,174,1327,115,1
Cupertino,60440,41,0,23,15,812,179,584,49,15
Cypress,49067,50,0,17,29,934,148,689,97,6
Daly City,104536,223,0,90,118,1833,352,1190,291,26
Dana Point,34262,70,0,10,51,586,133,429,24,0
Danville,43411,17,0,2,12,413,94,291,28,2
Davis,66126,103,3,20,49,1777,723,967,87,10
Delano,52210,309,6,81,218,1949,713,793,443,51
Del Mar,4290,16,0,3,12,179,34,134,11,0
Del Rey Oaks,1673,5,0,3,2,39,10,29,0,0
Desert Hot Springs,27936,277,2,63,209,1103,487,475,141,3
Diamond Bar,56619,62,0,25,34,886,344,476,66,1
Dinuba,23440,214,0,20,188,871,333,446,92,5
Dixon,18743,35,0,1,30,411,103,263,45,1
Dorris,910,1,0,0,1,17,3,11,3,0
Dos Palos,5071,89,1,2,55,210,56,100,54,0
Downey,113222,326,7,171,136,3292,573,1873,846,9
Duarte,21759,41,1,19,20,366,97,214,55,0
Dublin,49789,70,0,15,54,739,168,494,77,5
Dunsmuir,1589,4,0,1,3,34,9,24,1,0
East Palo Alto,29086,347,8,80,248,597,236,231,130,0
Eastvale,54882,63,1,18,35,1005,203,667,135,1
El Cajon,102012,386,2,143,212,2730,493,1775,462,17
El Centro,43249,144,1,54,82,2039,416,1499,124,3
El Cerrito,24184,92,0,63,29,1120,280,717,123,1
Elk Grove,160925,469,0,99,364,2963,544,2229,190,11
El Monte,115591,340,3,155,168,2182,568,1038,576,11
El Segundo,16911,37,0,19,18,538,143,343,52,6
Emeryville,10415,132,0,70,60,1651,135,1362,154,2
Encinitas,61433,127,1,21,96,1081,258,752,71,1
Escalon,7304,10,0,0,9,191,58,114,19,2
Escondido,148650,596,6,201,350,3965,717,2476,772,12
Etna,721,1,0,0,1,3,0,3,0,1
Eureka,26881,192,2,73,100,2087,399,1506,182,25
Exeter,10506,20,1,4,12,249,72,158,19,2
Fairfax,7563,13,0,1,9,104,30,68,6,1
Fairfield,108425,498,3,165,317,3534,735,2170,629,20
Farmersville,10786,47,0,15,31,258,104,119,35,2
Ferndale,1364,4,0,0,4,26,10,15,1,0
Fillmore,15206,26,0,4,21,152,26,106,20,7
Firebaugh,8062,70,0,3,61,49,18,28,3,3
Folsom,73782,98,0,35,56,1336,240,1024,72,10
Fontana,203427,725,10,202,480,4088,872,2217,999,9
Fort Bragg,7245,53,0,2,50,391,94,282,15,4
Fort Jones,823,1,0,0,1,9,5,4,0,0
Fortuna,11803,41,0,4,35,429,85,321,23,2
Foster City,32652,15,0,3,10,305,69,216,20,4
Fountain Valley,56805,92,0,20,63,1170,262,835,73,5
Fowler,6038,37,0,2,32,166,29,96,41,2
Fremont,224475,273,1,136,111,4097,944,2484,669,21
Fresno,508876,2552,40,903,1556,22584,5223,13304,4057,184
Fullerton,139676,372,0,107,236,3859,627,2873,359,27
Galt,24553,63,2,15,39,517,190,263,64,4
Gardena,59703,245,0,144,85,1331,298,726,307,7
Garden Grove,175469,455,5,137,297,3397,637,2221,539,29
Gilroy,51240,180,3,51,111,1740,222,1283,235,10
Glendale,195366,181,1,75,97,3198,563,2384,251,5
Glendora,50893,65,2,30,26,1340,173,1096,71,6
Goleta,30401,43,0,9,27,451,137,301,13,1
Gonzales,8428,24,0,7,15,109,35,55,19,2
Grand Terrace,12364,38,0,16,21,279,77,143,59,2
Grass Valley,12792,115,0,10,103,751,131,551,69,5
Greenfield,16922,89,1,31,56,259,62,141,56,3
Gridley,6563,72,1,1,66,191,53,115,23,6
Grover Beach,13398,39,0,7,25,303,94,174,35,1
Guadalupe,7205,10,0,1,8,52,12,29,11,0
Gustine,5655,39,0,5,32,125,50,55,20,8
Hanford,54425,299,2,63,224,1939,345,1401,193,11
Hawaiian Gardens,14437,56,1,21,32,205,47,106,52,1
Hawthorne,86132,580,6,299,243,2242,523,1333,386,6
Hayward,150955,589,5,333,218,4844,1051,2122,1671,21
Healdsburg,11483,25,0,2,20,236,47,181,8,0
Hemet,81698,447,4,173,246,3963,1110,2294,559,1
Hercules,24831,22,0,6,14,274,83,143,48,0
Hermosa Beach,19858,27,0,6,17,549,119,395,35,0
Hesperia,92621,371,1,83,270,2330,869,1052,409,15
Hidden Hills,1905,2,0,2,0,7,6,1,0,0
Highland,54462,191,3,56,124,1362,480,527,355,9
Hillsborough,11245,0,0,0,0,57,32,23,2,0
Hollister,36414,195,4,26,151,570,185,312,73,7
Holtville,6022,12,0,1,9,102,26,67,9,0
Hughson,6898,7,0,1,6,147,50,77,20,1
Huntington Beach,195842,362,2,100,229,4934,793,3796,345,25
Huntington Park,58852,359,1,197,155,1812,220,1003,589,5
Huron,6812,71,1,16,52,271,96,134,41,2
Imperial,15943,7,0,1,6,86,18,53,15,0
Imperial Beach,26998,133,1,25,101,454,125,228,101,3
Indian Wells,5174,7,0,2,5,172,48,116,8,0
Indio,80243,468,1,120,313,2699,792,1335,572,9
Industry,223,51,0,18,29,1041,110,705,226,1
Inglewood,111672,739,14,326,370,2718,637,1441,640,23
Ione,7160,6,0,1,5,101,28,65,8,1
Irvine,235830,113,2,38,61,3285,583,2553,149,10
Irwindale,1440,20,0,4,15,229,40,145,44,3
Isleton,817,9,0,3,6,46,23,23,0,0
Jackson,4549,23,0,2,19,179,60,112,7,5
Jurupa Valley,98090,267,3,75,177,3065,570,1732,763,2
Kensington,5230,5,0,0,5,85,36,35,14,2
Kerman,14543,45,0,9,34,436,120,233,83,1
King City,13260,68,5,20,43,201,84,93,24,2
Kingsburg,11651,23,0,2,18,327,111,162,54,2
La Canada Flintridge,20572,12,0,3,9,303,96,196,11,1
Lafayette,24829,21,0,6,15,413,110,275,28,0
Laguna Beach,23313,41,0,5,33,469,87,356,26,5
Laguna Hills,31134,53,0,12,38,508,75,390,43,1
Laguna Niguel,64894,57,0,13,40,624,95,500,29,1
Laguna Woods,16584,5,0,1,2,132,22,100,10,2
La Habra,61740,88,0,33,47,1155,185,856,114,0
La Habra Heights,5437,3,0,0,2,55,33,20,2,0
Lake Elsinore,56232,103,3,32,66,1494,418,858,218,1
Lake Forest,79336,105,2,23,68,813,150,620,43,1
Lakeport,4674,14,0,1,11,272,60,192,20,0
Lake Shastina,2482,2,0,0,2,10,4,4,2,0
Lakewood,81086,225,2,110,102,2062,419,1356,287,9
La Mesa,58482,181,1,64,109,1968,354,1381,233,3
La Mirada,49150,72,1,14,48,841,207,520,114,3
Lancaster,159792,832,9,261,522,3495,1062,2030,403,49
La Palma,15950,10,0,8,2,326,80,221,25,3
La Puente,40415,143,3,48,80,493,149,219,125,5
La Quinta,39150,68,0,26,37,1494,402,1002,90,4
La Verne,31439,37,0,21,15,753,158,548,47,1
Lawndale,33234,162,1,51,101,419,151,172,96,4
Lemon Grove,26156,145,1,45,91,509,120,279,110,2
Lemoore,24802,111,0,28,77,608,112,408,88,5
Lincoln,44831,25,0,7,12,553,183,326,44,7
Lindsay,13208,40,0,12,27,310,99,161,50,2
Livermore,84350,270,0,44,214,1830,387,1275,168,15
Livingston,13683,33,2,2,28,196,39,127,30,1
Lodi,63639,287,1,89,186,2301,634,1302,365,15
Loma Linda,23701,61,0,10,50,721,166,402,153,3
Lomita,20622,66,0,17,47,414,114,231,69,1
Lompoc,43581,188,0,31,140,1051,311,660,80,17
Long Beach,469665,2346,34,1118,1091,12999,3776,6868,2355,97
Los Alamitos,11735,24,0,11,11,360,108,213,39,0
Los Altos,30225,23,0,13,5,358,79,262,17,4
Los Altos Hills,8300,2,0,0,1,83,47,35,1,3
Los Angeles,3878725,16524,251,7885,7624,85844,15728,55734,14382,1430
Los Banos,36965,109,1,31,74,1060,257,696,107,4
Los Gatos,30351,25,0,5,17,551,132,376,43,5
Lynwood,71077,436,2,189,231,1528,325,649,554,12
Madera,62973,568,7,107,426,1855,589,1010,256,0
Malibu,12891,28,0,11,14,350,81,246,23,1
Mammoth Lakes,8258,18,0,5,13,152,33,113,6,1
Manhattan Beach,35930,64,0,34,25,853,194,623,36,1
Manteca,72261,212,0,79,129,2699,489,1883,327,22
Marina,20426,50,0,13,33,560,234,298,28,4
Martinez,36910,53,0,17,33,824,202,441,181,0
Marysville,12168,87,0,17,60,539,135,269,135,6
Maywood,27744,112,4,32,72,320,52,132,136,2
McFarland,12288,65,1,18,44,274,88,58,128,12
Mendota,11472,38,1,15,21,294,75,176,43,18
Menifee,82634,99,3,21,69,1680,391,979,310,3
Menlo Park,33146,53,0,18,32,644,180,436,28,3
Merced,81329,556,5,133,399,2647,644,1608,395,104
Mill Valley,14239,11,0,2,9,229,78,143,8,0
Milpitas,69522,93,1,56,28,2067,291,1491,285,8
Mission Viejo,95895,62,0,22,36,998,156,802,40,4
Modesto,204252,1704,14,450,1168,9989,2251,6349,1389,62
Monrovia,37071,57,0,23,33,806,128,592,86,0
Montague,1411,2,0,0,2,16,5,11,0,1
Montclair,37785,187,2,79,95,1623,288,962,373,14
Montebello,63566,183,2,81,89,1756,711,549,496,47
Monterey,29338,120,1,38,71,1108,220,835,53,2
Monterey Park,61152,104,0,60,36,1162,316,637,209,0
Monte Sereno,3491,1,0,0,0,33,14,18,1,0
Moorpark,35264,37,0,7,27,409,68,315,26,3
Moraga,16664,11,0,0,7,150,37,92,21,1
Moreno Valley,201284,638,10,312,285,5872,1822,3224,826,4
Morgan Hill,39907,63,1,10,41,676,162,416,98,2
Morro Bay,10412,31,0,1,27,171,57,105,9,1
Mountain View,77399,157,0,32,112,1706,294,1277,135,4
Mount Shasta,3309,5,0,2,3,69,14,48,7,0
Murrieta,107768,70,1,21,38,1640,285,1149,206,8
Napa,78761,255,2,47,180,1409,304,975,130,16
National City,59637,314,1,137,165,1890,286,1189,415,7
Needles,4932,15,1,5,8,208,88,88,32,1
Nevada City,3039,26,0,1,22,129,36,78,15,0
Newark,43950,123,1,40,73,1062,231,658,173,2
Newman,10691,36,0,4,32,198,38,124,36,2
Newport Beach,87639,73,2,13,51,2158,454,1600,104,11
Norco,27497,42,1,7,32,594,149,367,78,3
Norwalk,106518,407,6,150,235,2246,420,1262,564,10
Novato,53735,107,0,30,72,836,215,496,125,20
Oakdale,21340,50,0,14,27,826,239,503,84,2
Oakland,403887,7984,90,4922,2792,25176,5058,13285,6833,140
Oakley,37824,70,0,19,47,497,137,266,94,3
Oceanside,172525,634,9,182,402,4494,677,3417,400,24
Ojai,7585,14,0,3,7,103,15,80,8,2
Ontario,168144,453,9,167,246,4507,830,2586,1091,28
Orange,140304,147,4,64,71,2418,473,1673,272,15
Orange Cove,9750,212,0,8,189,880,272,483,125,0
Orinda,18520,10,0,0,10,214,103,103,8,0
Orland,7420,27,0,5,19,175,52,107,16,3
Oroville,15581,78,2,26,40,1011,258,593,160,10
Oxnard,202594,651,15,328,298,5074,974,3436,664,36
Pacifica,38494,66,0,7,51,546,114,361,71,3
Pacific Grove,15518,22,0,7,13,308,84,207,17,5
Palmdale,156522,759,10,257,465,3344,1049,1928,367,28
Palm Desert,50456,110,2,30,71,2215,572,1511,132,4
Palm Springs,46282,255,0,99,137,2350,712,1342,296,9
Palo Alto,66964,54,0,29,21,1483,242,1174,67,10
Palos Verdes Estates,13658,6,0,0,5,147,54,89,4,2
Paradise,26222,68,1,7,49,530,214,242,74,0
Paramount,54868,222,3,122,89,1633,266,863,504,7
Parlier,14856,91,2,18,65,375,111,156,108,15
Pasadena,139003,434,3,162,244,3779,939,2553,287,27
Paso Robles,30795,103,2,6,87,848,211,595,42,4
Patterson,20733,41,1,26,12,631,206,327,98,3
Perris,72171,241,6,102,132,2038,489,1067,482,3
Petaluma,59224,179,0,31,131,1013,159,778,76,12
Pico Rivera,63710,207,3,65,132,1521,262,924,335,11
Piedmont,10963,20,0,13,7,292,116,126,50,2
Pinole,18848,69,2,30,28,685,128,475,82,2
Pismo Beach,7824,22,0,3,14,317,146,159,12,0
Pittsburg,66387,185,4,111,68,2022,567,826,629,5
Placentia,52002,66,2,16,42,784,173,531,80,1
Placerville,10339,63,0,7,53,294,92,172,30,0
Pleasant Hill,34044,55,0,40,14,1469,206,1110,153,3
Pleasanton,72975,60,0,29,28,1281,185,979,117,10
Pomona,151366,809,29,295,454,4394,847,2591,956,17
Porterville,55267,194,8,44,134,1506,472,801,233,5
Port Hueneme,21910,57,1,11,41,405,112,251,42,1
Poway,49444,90,0,16,66,575,170,360,45,2
Rancho Cordova,67634,352,5,101,235,2202,478,1499,225,2
Rancho Cucamonga,172262,331,1,128,188,3824,1374,1972,478,17
Rancho Mirage,17816,26,0,8,17,636,156,443,37,0
Rancho Palos Verdes,42542,30,0,7,22,580,175,369,36,0
Rancho Santa Margarita,49190,17,0,6,8,290,77,200,13,1
Red Bluff,14170,146,3,19,115,938,291,570,77,3
Redding,91035,585,2,146,388,3774,742,2483,549,5
Redlands,70282,215,2,84,114,3020,605,2047,368,21
Redondo Beach,67993,160,1,43,112,1588,309,1146,133,1
Redwood City,79707,190,1,66,97,1871,507,1138,226,13
Reedley,25018,157,0,25,125,529,173,244,112,1
Rialto,102520,434,4,192,219,2717,798,1148,771,20
Richmond,107341,1112,16,407,654,4826,1631,1685,1510,23
Ridgecrest,28537,154,4,24,117,570,212,313,45,11
Rio Dell,3368,11,0,0,11,46,21,22,3,0
Rio Vista,7622,32,0,4,25,245,113,117,15,2
Ripon,14802,15,0,5,9,342,66,253,23,1
Riverbank,23474,37,0,13,23,685,208,400,77,1
Riverside,316423,1330,10,495,747,10608,1978,6912,1718,75
Rocklin,59621,62,0,17,40,1011,273,678,60,6
Rohnert Park,41326,180,1,24,139,687,136,487,64,4
Rolling Hills,1894,0,0,0,0,11,5,6,0,0
Rolling Hills Estates,8229,3,0,1,2,118,29,82,7,0
Rosemead,54587,149,0,65,78,1067,288,615,164,3
Roseville,126236,261,1,64,183,3343,482,2623,238,17
Ross,2447,1,0,0,1,48,21,24,3,0
Sacramento,478182,3137,34,1158,1850,17980,3886,11233,2861,164
Salinas,155742,1001,24,451,490,5356,1148,2720,1488,36
San Bernardino,214322,1949,45,794,1036,9389,2673,4025,2691,87
San Bruno,42495,102,1,35,58,1002,131,780,91,1
San Clemente,65295,56,0,21,32,844,209,582,53,2
Sand City,344,3,0,0,3,99,14,81,4,0
San Diego,1349306,5303,39,1456,3492,31728,6355,19230,6143,178
San Dimas,33854,65,0,18,43,706,176,463,67,1
San Fernando,23955,85,0,28,55,399,69,258,72,2
San Francisco,833863,7064,48,4202,2653,48324,5931,36527,5866,227
San Gabriel,40287,103,1,31,66,724,175,493,56,1
Sanger,24649,146,2,25,104,726,179,433,114,1
San Jacinto,45714,124,5,64,49,1805,469,1092,244,0
San Jose,992143,3215,38,1095,1812,25510,5173,12411,7926,133
San Juan Capistrano,35585,57,0,13,44,439,115,302,22,2
San Leandro,87490,394,3,251,114,3960,761,2287,912,10
San Luis Obispo,46095,161,0,26,101,1775,328,1384,63,44
San Marcos,87712,214,0,62,133,1400,299,931,170,7
San Marino,13308,20,0,3,15,224,83,140,1,0
San Mateo,100440,239,0,85,125,2065,309,1601,155,12
San Pablo,29893,200,0,102,96,1170,305,512,353,4
San Rafael,58725,206,0,77,103,1812,366,1114,332,19
San Ramon,74434,27,0,14,13,760,171,485,104,10
Santa Ana,332848,1121,13,463,594,6425,803,4163,1459,33
Santa Barbara,90006,362,2,82,246,2670,459,2091,120,17
Santa Clara,120150,172,0,55,104,3023,461,2169,393,18
Santa Clarita,204951,276,2,97,158,2713,704,1760,249,17
Santa Cruz,62517,407,4,85,285,3163,552,2383,228,21
Santa Fe Springs,16936,75,0,28,44,1206,135,830,241,2
Santa Maria,102051,490,3,122,331,2934,647,1557,730,13
Santa Monica,92488,324,7,120,170,3544,573,2806,165,21
Santa Paula,30159,108,6,33,63,536,103,358,75,6
Santa Rosa,171564,541,3,105,391,3506,638,2559,309,25
Santee,55924,156,0,31,120,1165,170,888,107,3
Saratoga,30897,14,0,4,7,222,89,123,10,2
Sausalito,7066,10,0,2,6,309,71,226,12,1
Scotts Valley,11694,11,0,2,8,287,56,220,11,3
Seal Beach,24798,16,0,8,7,462,93,336,33,1
Seaside,34147,120,4,21,88,591,150,390,51,0
Sebastopol,7570,23,0,3,18,146,55,83,8,4
Selma,23935,191,0,35,146,1056,218,589,249,2
Shafter,17139,58,1,13,37,545,209,251,85,8
Sierra Madre,11048,13,0,1,11,129,58,65,6,0
Signal Hill,11240,32,0,14,16,554,95,379,80,2
Simi Valley,126215,132,3,31,89,1709,344,1233,132,16
Solana Beach,13239,27,0,5,21,294,93,180,21,0
Soledad,26637,73,0,15,52,252,105,100,47,0
Solvang,5373,7,0,0,4,70,21,45,4,0
Sonoma,10912,38,0,11,24,212,63,139,10,1
Sonora,4774,13,0,6,5,304,74,213,17,11
South El Monte,20354,88,1,35,48,444,117,208,119,4
South Gate,95591,496,2,223,256,2698,406,1379,913,6
South Lake Tahoe,21243,116,3,16,89,585,171,368,46,2
South Pasadena,25937,29,0,16,10,568,170,347,51,20
South San Francisco,66157,118,0,39,74,1188,268,739,181,25
Stallion Springs,2562,9,0,0,9,16,1,15,0,0
Stanton,39128,112,1,45,58,702,137,409,156,3
St. Helena,5934,6,0,0,6,72,25,45,2,0
Stockton,299796,3622,32,1088,2411,15080,4189,8748,2143,88
Suisun City,28805,64,1,35,25,630,132,379,119,2
Sunnyvale,148160,144,4,51,73,2434,574,1456,404,14
Susanville,16270,83,2,11,67,384,148,215,21,6
Sutter Creek,2445,4,0,0,4,58,15,40,3,1
Taft,8839,60,0,0,58,331,84,210,37,0
Tehachapi,13607,41,0,7,29,385,183,174,28,0
Temecula,106680,91,3,39,38,2848,711,1897,240,9
Temple City,36269,48,1,11,31,476,179,264,33,0
Thousand Oaks,128884,139,0,42,90,1604,291,1222,91,12
Tiburon,9133,2,0,0,2,87,19,68,0,0
Torrance,147534,187,1,76,94,2786,591,1833,362,6
Tracy,85174,152,0,57,88,2236,353,1648,235,12
Truckee,16146,18,0,2,16,173,67,99,7,3
Tulare,61424,430,6,77,332,2613,909,1333,371,23
Tulelake,987,1,0,0,1,8,4,4,0,0
Turlock,70075,310,2,80,216,2630,627,1578,425,44
Tustin,78836,100,1,36,57,1473,213,1147,113,5
Twentynine Palms,25914,74,2,5,58,353,153,159,41,1
Ukiah,15874,116,0,15,93,564,190,347,27,2
Union City,72480,218,2,92,121,1634,416,886,332,4
Upland,75640,163,0,67,87,2234,589,1246,399,4
Vacaville,94347,201,1,66,120,2096,267,1598,231,17
Vallejo,118336,1019,25,424,540,5734,2972,1553,1209,54
Ventura,108204,262,6,99,136,4027,745,3025,257,20
Vernon,115,22,0,13,9,321,28,187,106,0
Victorville,121699,651,9,202,404,4165,1461,2067,637,20
Villa Park,5959,6,0,0,6,86,30,56,0,3
Visalia,127824,500,8,156,305,4853,1218,3016,619,5
Vista,96712,445,1,140,276,2045,390,1326,329,6
Walnut,30279,37,0,10,26,463,220,207,36,0
Walnut Creek,66149,78,0,31,43,2161,364,1634,163,1
Waterford,8590,29,2,4,22,224,78,104,42,0
Watsonville,52076,237,3,71,143,1308,218,824,266,9
Weed,2927,26,0,3,17,110,33,74,3,0
West Covina,107867,231,1,106,122,3370,615,2254,501,2
West Hollywood,34902,216,0,68,134,1435,292,1044,99,2
Westlake Village,8440,11,0,3,7,148,40,102,6,1
Westminster,91885,283,0,84,186,2476,420,1720,336,8
Westmorland,2279,2,0,1,0,6,2,4,0,0
West Sacramento,49751,205,1,98,90,1483,380,894,209,9
Wheatland,3522,0,0,0,0,49,16,28,5,0
Whittier,86450,223,3,73,130,2383,455,1675,253,4
Wildomar,33453,40,0,11,27,536,166,287,83,1
Williams,5176,5,0,3,2,67,24,35,8,1
Willits,4832,30,0,1,28,61,6,35,20,2
Willows,6122,17,0,3,12,179,54,116,9,0
Windsor,27249,105,0,8,88,269,52,209,8,4
Winters,6992,8,1,3,4,115,27,76,12,2
Woodlake,7417,10,1,1,7,134,39,79,16,0
Woodland,56523,272,1,48,207,1942,510,1238,194,34
Yorba Linda,67492,30,0,6,19,700,172,482,46,1
Yountville,2969,1,0,0,0,57,17,34,6,0
Yreka,7639,49,1,2,44,278,71,193,14,2
Yuba City,65133,174,2,39,118,1980,438,1210,332,16
Yucaipa,52524,107,0,31,69,926,262,534,130,13
Yucca Valley,21214,86,3,15,61,429,141,234,54,2

Nebraska

NEBRASKA
Alliance,8510,20,0,1,11,136,57,76,3,1
Ashland,2502,2,0,0,2,17,2,15,0,0
Aurora,4397,1,0,0,0,31,17,12,2,0
Beatrice,12055,66,0,2,43,392,76,308,8,2
Bellevue,53023,70,0,28,29,963,138,717,108,5
Bennington,1476,0,0,0,0,26,12,11,3,0
Blair,7978,8,0,2,1,119,30,84,5,1
Bridgeport,1501,0,0,0,0,25,5,20,0,0
Broken Bow,3464,6,0,0,0,33,5,28,0,0
Central City,2908,1,0,0,1,63,7,55,1,0
Chadron,5845,9,0,0,7,186,17,162,7,2
Columbus,22624,22,1,2,13,510,70,433,7,2
Cozad,3929,4,0,0,3,39,6,31,2,0
Crete,7238,15,0,2,10,212,43,162,7,3
Falls City,4294,2,0,0,2,61,15,41,5,2
Fremont,26098,45,0,3,15,656,99,535,22,8
Gering,8480,0,0,0,0,184,39,135,10,0
Gordon,1552,7,0,0,6,23,0,22,1,0
Gothenburg,3557,1,0,0,1,90,14,74,2,0
Grand Island,50441,136,1,8,91,2389,526,1759,104,7
Hastings,25012,54,0,4,27,922,198,689,35,4
Holdrege,5548,6,0,0,3,122,29,90,3,0
Imperial,2140,5,0,0,5,15,4,11,0,0
Kearney,32113,56,0,5,35,825,134,663,28,5
Kimball,2455,18,0,0,18,10,2,8,0,0
La Vista,17790,7,0,3,3,215,27,170,18,1
Lexington,10204,27,0,3,13,275,39,226,10,4
Lincoln,267565,990,5,212,631,9354,1423,7625,306,40
Madison,2424,3,0,0,3,18,8,8,2,0
McCook,7639,10,0,0,3,215,38,166,11,0
Milford,2177,0,0,0,0,26,8,18,0,1
Minden,2972,3,0,0,2,57,9,45,3,0
Mitchell,1698,0,0,0,0,21,3,17,1,0
Nebraska City,7269,6,0,0,3,179,38,132,9,0
Norfolk,24362,30,0,1,10,864,135,675,54,1
Ogallala,4620,3,0,0,1,137,9,121,7,0
Omaha,425076,2449,42,718,1505,19108,3509,12519,3080,83
O'Neill,3677,0,0,0,0,7,0,6,1,0
Papillion,21274,10,0,4,1,373,34,322,17,1
Plattsmouth,6422,3,0,0,1,122,7,103,12,0
Ralston,7662,6,1,2,1,213,33,160,20,2
Scottsbluff,15057,41,0,6,25,720,127,578,15,1
Seward,7063,6,0,0,5,85,8,75,2,0
South Sioux City,13407,13,0,1,12,250,14,232,4,0
Superior,1925,1,0,0,1,12,1,10,1,0
Valentine,2768,8,0,0,7,25,5,17,3,0
Valley,1994,4,0,0,1,45,8,35,2,0
Wahoo,4493,2,0,0,2,55,16,38,1,1
West Point,3329,0,0,0,0,1,0,1,0,0
Wilber,1912,0,0,0,0,25,4,19,2,0
York,7875,1,0,0,1,196,20,162,14,0

NewYork

NEW YORK
Adams Village,1861,0,0,0,0,12,2,10,0,0
Addison Town and Village,2577,3,0,0,3,24,3,20,1,0
Akron Village,2846,3,0,0,3,16,1,15,0,0
Albany,97956,791,8,227,526,4090,705,3243,142,0
Albion Village,6388,23,0,4,16,223,53,165,5,0
Alfred Village,4089,5,0,3,2,46,10,36,0,0
Allegany Village,1781,3,0,0,3,10,0,10,0,0
Amherst Town,118296,107,1,31,68,2118,204,1882,32,3
Amityville Village,9519,9,0,4,3,210,16,188,6,1
Amsterdam,18182,30,0,12,18,405,99,291,15,0
Arcade Village,2053,0,0,0,0,39,3,35,1,0
Ardsley Village,4523,5,0,3,2,33,4,28,1,0
Asharoken Village,658,0,0,0,0,2,0,2,0,0
Attica Village,2522,2,0,0,2,5,0,4,1,0
Auburn,27270,96,1,22,53,859,132,721,6,0
Avon Village,3333,1,0,1,0,25,3,20,2,0
Baldwinsville Village,7473,5,0,1,4,88,10,77,1,0
Ballston Spa Village,5418,8,0,3,5,94,16,78,0,1
Batavia,15374,57,0,13,37,559,103,454,2,0
Bath Village,5733,15,0,3,11,191,32,157,2,2
Bedford Town,17627,5,0,1,4,156,26,127,3,0
Bethlehem Town,34243,13,0,3,10,442,50,388,4,0
Binghamton,46304,284,3,101,161,2349,525,1767,57,0
Black River,1410,0,0,0,0,14,2,12,0,0
Blooming Grove Town,12001,8,0,0,7,99,20,72,7,0
Bolivar Village,1022,1,0,0,1,4,2,2,0,0
Bolton Town,2325,2,0,0,2,24,4,20,0,0
Boonville Village,2054,1,0,0,1,20,6,14,0,0
Brant Town,2065,4,0,1,3,31,9,20,2,0
Brewster,2358,0,0,0,0,13,3,10,0,0
Briarcliff Manor Village,7976,1,0,0,1,11,1,10,0,0
Brighton Town,36689,26,1,10,13,793,142,623,28,0
Brockport Village,8284,23,1,5,16,165,29,132,4,0
Bronxville Village,6390,0,0,0,0,47,5,39,3,0
Brownville Village,1174,0,0,0,0,10,0,10,0,0
Buffalo,258789,3249,47,1322,1735,12491,3458,8076,957,0
Cairo Town,6577,0,0,0,0,15,1,14,0,0
Cambridge Village,1854,2,0,0,2,44,12,31,1,0
Camden Village,2219,5,0,0,5,46,4,42,0,0
Camillus Town and Village,24165,14,0,0,13,348,36,307,5,1
Canandaigua,10470,22,0,9,13,315,54,253,8,0
Canastota Village,4704,4,0,0,4,60,8,51,1,0
Canisteo Village,2246,3,0,1,2,12,3,9,0,0
Canton Village,6794,3,0,1,2,93,12,80,1,0
Cape Vincent Village,762,0,0,0,0,2,0,2,0,0
Carmel Town,34462,10,0,0,8,198,31,158,9,1
Carroll Town,3481,0,0,0,0,8,3,5,0,0
Carthage Village,3862,1,0,0,0,60,12,47,1,0
Cattaraugus Village,980,0,0,0,0,4,0,4,0,0
Cayuga Heights Village,3749,1,0,1,0,59,12,47,0,0
Cazenovia Village,2732,0,0,0,0,58,5,52,1,0
Central Square Village,1835,3,0,2,1,53,6,45,2,0
Chatham Village,1733,3,0,0,3,32,5,27,0,0
Cheektowaga Town,78361,158,0,48,99,2689,345,2271,73,2
Chester Town,7990,0,0,0,0,25,9,16,0,0
Chittenango Village,5016,1,0,0,1,65,11,53,1,0
Cicero Town,29571,12,0,2,10,440,45,393,2,0
Clarkstown Town,80705,65,0,17,40,1515,99,1388,28,0
Clyde Village,2049,4,0,3,1,60,16,43,1,0
Cobleskill Village,4503,5,0,3,2,218,14,204,0,1
Coeymans Town,7458,39,0,0,37,86,13,69,4,1
Cohoes,16179,26,0,11,14,243,65,163,15,0
Colonie Town,78215,63,0,31,32,1990,186,1753,51,10
Cooperstown Village,1827,1,0,0,1,16,2,14,0,0
Corning,11087,35,0,8,24,416,63,349,4,0
Cornwall-on-Hudson Village,2978,2,0,0,2,22,8,14,0,0
Cornwall Town,9543,1,0,0,1,42,10,32,0,0
Cortland,19331,18,0,3,12,398,88,306,4,1
Crawford Town,9264,11,0,2,9,113,16,97,0,0
Croton-on-Hudson Village,8180,1,0,1,0,53,8,43,2,0
Cuba Town,3209,5,0,0,4,81,7,72,2,0
Dansville Village,4605,2,0,1,1,152,24,120,8,0
Deerpark Town,7827,7,0,2,3,152,52,100,0,0
Delhi Village,2985,1,0,0,1,36,4,30,2,0
Depew Village,15189,17,0,2,12,310,54,251,5,2
Deposit Village,1628,0,0,0,0,14,6,8,0,0
Dewitt Town,22681,20,0,10,10,715,85,618,12,0
Dexter Village,1122,0,0,0,0,8,2,6,0,0
Dobbs Ferry Village,11021,1,0,0,1,104,13,89,2,0
Dolgeville Village,2191,7,0,0,7,41,6,34,1,0
Dryden Village,1913,3,0,1,2,99,6,93,0,0
Dunkirk,12329,40,0,12,28,307,78,228,1,0
East Aurora-Aurora Town,13774,5,0,2,3,131,24,105,2,0
Eastchester Town,19800,2,0,0,2,168,13,154,1,0
East Fishkill Town,29315,9,1,1,7,165,18,141,6,0
East Greenbush Town,16470,12,0,4,8,373,36,330,7,4
East Hampton Town,19674,20,0,1,17,300,56,237,7,0
East Hampton Village,1104,0,0,0,0,66,4,60,2,0
East Rochester Village,6596,8,1,3,4,125,25,97,3,0
East Syracuse Village,3036,8,0,4,4,147,19,121,7,0
Eden Town,7684,1,0,0,1,31,7,24,0,0
Ellenville Village,4124,17,0,2,14,173,41,132,0,1
Ellicott Town,5144,7,0,1,5,288,53,235,0,0
Elmira,28921,81,0,29,50,1027,224,790,13,0
Elmira Heights Village,4079,2,0,1,1,89,9,78,2,0
Elmira Town,5948,0,0,0,0,1,0,1,0,0
Endicott Village,13122,46,0,13,29,604,138,455,11,0
Evans Town,16292,17,0,1,15,313,48,259,6,5
Fairport Village,5335,5,0,0,4,53,13,37,3,0
Fallsburg Town,12109,22,1,0,21,162,65,96,1,0
Fishkill Town,20435,3,0,1,2,276,28,243,5,0
Floral Park Village,15926,14,0,7,5,72,16,44,12,0
Florida Village,2842,0,0,0,0,44,5,39,0,0
Fort Plain Village,2265,4,0,1,3,90,23,65,2,0
Frankfort Town,5033,0,0,0,0,50,22,27,1,0
Frankfort Village,2579,5,0,0,5,33,4,28,1,0
Franklinville Village,1702,1,0,1,0,32,0,32,0,0
Fredonia Village,10988,10,0,5,3,208,26,182,0,0
Freeport Village,43214,152,0,76,74,933,168,698,67,8
Friendship Town,1960,0,0,0,0,16,6,10,0,0
Fulton City,11739,24,0,7,14,463,81,376,6,1
Garden City Village,22596,10,0,4,6,346,33,303,10,2
Gates Town,28468,57,0,19,34,1051,95,922,34,0
Geddes Town,10442,7,0,2,5,251,21,222,8,1
Geneseo Village,7891,6,0,3,0,162,7,155,0,0
Geneva,13194,28,1,5,18,343,65,275,3,1
Germantown Town,1926,0,0,0,0,9,2,7,0,0
Glen Cove,27134,3,0,1,2,62,5,54,3,0
Glen Park Village,526,0,0,0,0,5,0,5,0,0
Glens Falls,14582,22,0,3,17,343,50,288,5,0
Glenville Town,21839,13,0,2,11,492,57,424,11,0
Gloversville,15315,33,0,6,18,686,111,560,15,0
Goshen Village,5400,2,0,1,0,64,2,62,0,0
Gowanda Village,2663,5,0,0,5,29,11,16,2,0
Granville Village,2498,6,0,0,5,26,7,19,0,1
Great Neck Estates Village,2794,0,0,0,0,20,6,12,2,0
Greece Town,96667,151,0,60,82,2303,332,1925,46,0
Greenburgh Town,44787,48,1,16,26,578,55,501,22,0
Greene Village,1553,0,0,0,0,1,1,0,0,0
Green Island Village,2621,2,0,1,1,42,7,31,4,0
Greenport Town,4065,2,0,1,1,213,10,201,2,0
Greenwood Lake Village,3118,2,0,0,2,21,3,16,2,0
Groton Village,2381,2,0,0,0,38,6,31,1,0
Guilderland Town,33805,12,0,5,4,672,48,623,1,0
Hamburg Town,45535,38,1,12,24,1167,134,1012,21,6
Hamburg Village,9517,8,0,0,6,161,40,121,0,0
Hammondsport Village,656,0,0,0,0,10,1,9,0,0
Harrison Town,27876,6,0,1,5,225,27,194,4,0
Hastings-on-Hudson Village,7937,1,0,1,0,81,4,75,2,0
Haverstraw Town,37196,64,0,16,45,340,83,244,13,3
Hempstead Village,55198,433,10,204,216,958,206,630,122,2
Herkimer Village,7693,53,0,3,41,379,49,330,0,1
Highland Falls Village,3847,3,0,0,3,39,8,31,0,0
Homer Village,3270,0,0,0,0,33,3,29,1,0
Hoosick Falls Village,3466,9,0,1,7,38,10,26,2,0
Hornell,8481,5,0,0,5,112,18,94,0,0
Horseheads Village,6701,2,0,0,2,110,20,90,0,0
Hudson,6676,26,0,8,17,198,25,172,1,0
Hudson Falls Village,7187,6,0,2,4,112,22,90,0,0
Huntington Bay Village,1428,1,0,0,1,12,0,11,1,1
Hyde Park Town,21397,18,0,4,11,180,42,133,5,0
Ilion Village,8002,15,0,2,12,128,21,106,1,0
Irondequoit Town,51506,93,1,51,35,1353,271,1049,33,0
Irvington Village,6530,0,0,0,0,23,4,19,0,0
Jamestown,30658,168,0,39,110,1140,281,829,30,0
Johnson City Village,14866,69,1,20,42,949,111,828,10,0
Johnstown,8531,14,0,4,9,316,29,273,14,0
Jordan Village,1350,1,0,0,1,2,0,2,0,0
Kenmore Village,15256,26,1,10,13,220,34,181,5,0
Kent Town,13381,1,0,0,0,98,22,71,5,0
Kings Point Village,5042,1,0,0,1,16,4,11,1,0
Kingston,23665,74,1,25,44,687,112,565,10,1
Kirkland Town,8296,0,0,0,0,103,21,81,1,0
Lackawanna,17965,89,1,11,64,533,100,398,35,3
Lake Placid Village,2491,2,0,0,2,51,11,38,2,1
Lake Success Village,3009,2,0,0,2,32,10,21,1,0
Lakewood-Busti,7280,1,0,1,0,341,23,316,2,0
Lancaster Town,36369,15,0,4,10,547,44,494,9,0
Larchmont Village,5930,2,0,0,2,87,8,77,2,0
Le Roy Village,4354,11,0,1,8,84,17,67,0,0
Lewiston Town and Village,16175,12,0,1,11,134,30,96,8,0
Liberty Village,4285,21,0,2,17,206,43,160,3,0
Little Falls,4912,16,0,1,12,130,18,111,1,0
Liverpool Village,2311,2,0,1,1,46,6,39,1,0
Lloyd Harbor Village,3683,0,0,0,0,18,2,16,0,0
Lloyd Town,10751,6,0,0,6,118,20,95,3,0
Lockport,20904,70,0,24,40,649,120,523,6,0
Long Beach,33534,35,0,13,21,337,42,277,18,0
Lowville Village,3457,2,0,0,2,58,7,47,4,0
Lynbrook Village,19528,12,0,3,8,164,18,128,18,0
Lyons Village,3543,27,0,3,19,179,34,142,3,0
Macedon Town and Village,9132,4,0,1,3,61,7,52,2,0
Malone Village,5881,4,0,2,2,192,28,161,3,2
Malverne Village,8542,4,0,3,1,21,3,17,1,0
Mamaroneck Town,12146,1,0,1,0,158,16,141,1,0
Mamaroneck Village,19164,8,0,2,5,181,23,150,8,0
Manchester Village,1688,0,0,0,0,0,0,0,0,0
Manlius Town,24461,18,0,4,14,402,56,343,3,0
Marcellus Village,1792,0,0,0,0,13,2,11,0,0
Marlborough Town,8769,5,0,1,4,135,35,97,3,1
Massena Village,10808,22,0,2,18,410,52,358,0,0
Mechanicville,5213,8,0,3,5,114,21,89,4,0
Medina Village,5953,12,0,3,9,139,37,100,2,0
Menands Village,3991,5,0,1,4,101,13,87,1,0
Middleport Village,1813,2,0,0,2,19,1,16,2,0
Middletown,27809,114,1,47,60,852,136,683,33,4
Monroe Village,8544,12,0,5,7,137,16,118,3,0
Montgomery Town,8961,6,0,1,3,114,22,91,1,0
Montgomery Village,4188,2,0,0,2,45,3,42,0,0
Monticello Village,6582,48,0,16,28,276,107,164,5,0
Moravia Village,1263,3,0,0,3,15,0,15,0,0
Moriah Town,3628,7,0,0,7,9,3,5,1,0
Mount Hope Town,7112,0,0,0,0,32,6,25,1,0
Mount Kisco Village,11028,17,0,6,10,108,10,98,0,0
Mount Morris Village,2912,2,0,1,1,74,10,63,1,0
Mount Pleasant Town,26564,12,0,6,6,226,25,198,3,0
Mount Vernon,68071,554,2,228,317,1436,317,972,147,0
Newark Village,8978,27,0,7,17,334,71,261,2,0
New Berlin Town,1622,0,0,0,0,0,0,0,0,0
Newburgh,28571,435,5,150,259,1040,304,673,63,15
Newburgh Town,30984,38,0,15,18,1353,143,1182,28,2
New Castle Town,17864,2,0,0,2,77,13,62,2,0
New Hartford Town and Village,20355,13,0,3,9,806,72,730,4,0
New Paltz Town and Village,14248,34,0,4,26,200,16,180,4,0
New Rochelle,78800,175,0,81,89,1391,150,1172,69,0
New Windsor Town,25767,31,0,8,22,471,65,394,12,4
New York,8396126,52384,335,19170,31767,141971,16606,117931,7434,0
New York Mills Village,3324,2,0,0,2,64,16,47,1,0
Niagara Falls,49574,584,3,166,403,2807,746,1949,112,22
Niagara Town,8241,13,0,2,11,489,48,427,14,0
Niskayuna Town,22097,13,0,5,7,341,51,282,8,0
Nissequogue Village,1754,0,0,0,0,8,1,6,1,0
North Castle Town,12077,3,0,0,3,68,12,53,3,0
North Greenbush Town,12137,8,0,2,6,230,32,196,2,0
Northport Village,7411,6,0,1,5,59,11,44,4,2
North Syracuse Village,6964,10,0,0,10,111,14,94,3,0
North Tonawanda,31176,41,1,17,15,586,114,455,17,0
Northville Village,1097,0,0,0,0,1,0,1,0,0
Norwich,7049,15,0,0,11,325,25,297,3,0
Ogdensburg,11072,23,0,5,17,397,72,321,4,2
Ogden Town,20026,17,0,6,9,208,24,176,8,0
Old Brookville Village,2171,4,0,1,3,54,16,28,10,0
Old Westbury Village,4625,1,0,0,1,39,6,29,4,0
Olean,14150,40,0,5,30,593,76,508,9,0
Oneida,11220,18,0,4,12,434,68,357,9,0
Oneonta City,13825,21,0,11,7,311,69,238,4,3
Orangetown Town,37438,37,0,13,23,317,41,262,14,0
Orchard Park Town,29386,16,0,4,10,346,37,297,12,0
Oriskany Village,1385,0,0,0,0,10,2,8,0,0
Ossining Village,25314,36,0,21,15,243,46,192,5,0
Oswego City,18139,54,1,13,37,630,83,533,14,0
Owego Village,3818,9,0,2,6,199,39,156,4,0
Oxford Village,1433,2,0,1,1,13,1,12,0,0
Oyster Bay Cove Village,4233,0,0,0,0,19,3,16,0,0
Painted Post Village,2116,1,0,0,1,73,5,66,2,1
Palmyra Village,3475,4,0,0,4,41,9,31,1,0
Peekskill,23908,30,0,8,22,248,25,215,8,0
Pelham Manor Village,5558,2,0,1,1,147,14,130,3,0
Pelham Village,6982,7,0,2,4,172,22,149,1,0
Penn Yan Village,5123,4,0,1,2,111,21,89,1,0
Perry Village,3633,3,0,0,3,99,14,84,1,0
Piermont Village,2550,1,0,0,0,19,6,13,0,0
Pine Plains Town,2460,1,0,0,1,12,1,9,2,0
Plattekill Town,10374,8,0,2,5,106,28,77,1,0
Plattsburgh City,19672,39,0,4,32,483,79,396,8,0
Pleasantville Village,7100,0,0,0,0,22,1,21,0,0
Port Byron Village,1274,0,0,0,0,0,0,0,0,0
Port Chester Village,29328,48,0,19,27,572,67,483,22,0
Port Dickinson Village,1602,0,0,0,0,31,0,31,0,0
Port Jervis,8689,15,1,3,8,284,67,214,3,3
Portville Village,997,0,0,0,0,8,1,7,0,0
Potsdam Village,9613,8,0,0,7,190,17,168,5,0
Poughkeepsie,30778,286,7,100,163,787,189,589,9,0
Poughkeepsie Town,43866,39,1,12,25,1339,125,1203,11,0
Pound Ridge Town,5200,3,0,0,3,33,15,18,0,0
Pulaski Village,2354,1,0,0,1,57,12,44,1,0
Quogue Village,977,0,0,0,0,41,13,27,1,0
Ramapo Town,87204,57,2,9,41,567,88,466,13,0
Red Hook Village,1947,1,0,0,1,30,6,24,0,0
Rensselaer City,9517,19,0,3,12,159,44,108,7,2
Rhinebeck Village,2635,2,0,0,2,42,0,41,1,0
Riverhead Town,33789,64,0,26,35,922,160,729,33,0
Rochester,210562,2107,42,918,1055,10051,2587,6855,609,132
Rockville Centre Village,24129,22,1,11,9,271,30,223,18,0
Rome,32557,47,4,23,20,662,157,470,35,2
Rosendale Town,6026,1,0,0,1,60,16,44,0,0
Rotterdam Town,29146,33,2,16,11,829,109,700,20,4
Rye Brook Village,9480,2,0,2,0,88,9,77,2,0
Sag Harbor Village,2279,3,0,1,2,71,17,53,1,0
Salamanca,5691,18,0,2,15,155,38,105,12,0
Sands Point Village,2715,0,0,0,0,18,4,13,1,0
Saranac Lake Village,5369,26,1,1,23,150,30,115,5,0
Saratoga Springs,27081,33,1,8,21,642,84,550,8,0
Saugerties Town,19318,15,0,5,7,319,51,268,0,0
Scarsdale Village,17564,1,0,0,1,184,24,153,7,0
Schenectady,66041,607,8,203,365,2800,769,1878,153,0
Schodack Town,11573,4,0,1,3,97,25,70,2,0
Schoharie Village,872,0,0,0,0,0,0,0,0,0
Scotia Village,7700,5,1,1,3,126,14,112,0,0
Seneca Falls Town,2362,12,0,1,11,292,49,238,5,0
Shandaken Town,3043,4,0,0,4,62,17,44,1,0
Shawangunk Town,14205,3,0,0,3,80,20,60,0,0
Shelter Island Town,2412,3,0,0,3,41,2,39,0,0
Sherburne Village,1351,1,0,0,1,15,7,8,0,0
Sherrill,3064,4,0,0,4,37,14,23,0,0
Shortsville Village,1437,0,0,0,0,0,0,0,0,0
Sidney Village,3805,7,0,1,2,185,21,161,3,0
Skaneateles Village,2450,0,0,0,0,10,2,8,0,0
Sleepy Hollow Village,9996,8,1,1,6,58,9,47,2,0
Sodus Village,1805,0,0,0,0,24,2,22,0,0
Solvay Village,6487,19,0,6,13,186,38,142,6,0
Southampton Town,50603,44,0,16,22,1020,219,752,49,1
Southampton Village,3161,3,0,1,2,118,9,105,4,0
South Glens Falls Village,3640,6,0,1,4,114,17,95,2,0
Southold Town,19963,12,0,5,6,343,70,271,2,0
Spring Valley Village,32288,132,2,34,87,404,53,335,16,0
Stillwater Town,6587,1,0,0,1,24,4,18,2,1
St. Johnsville Village,1691,3,0,0,3,47,8,39,0,0
Stony Point Town,15307,12,0,1,11,107,18,83,6,0
Suffern Village,10886,9,0,1,8,60,11,48,1,0
Syracuse,143834,1192,21,400,696,6473,1781,4298,394,57
Tarrytown Village,11449,6,0,3,3,110,12,94,4,0
Ticonderoga Town,4982,11,0,0,7,94,23,71,0,0
Tonawanda,14987,34,0,4,30,315,24,289,2,4
Tonawanda Town,58082,118,1,26,86,1099,190,882,27,1
Troy,49898,371,1,145,211,1985,593,1305,87,5
Trumansburg Village,1820,2,0,1,0,66,6,58,2,0
Tuckahoe Village,6578,0,0,0,0,35,7,27,1,0
Tupper Lake Village,3642,3,0,0,3,83,22,59,2,0
Tuxedo Park Village,615,0,0,0,0,0,0,0,0,0
Ulster Town,12195,14,0,2,9,437,25,410,2,0
Utica,61686,361,7,102,225,2528,449,1997,82,0
Vestal Town,27980,16,0,6,8,571,39,523,9,0
Walden Village,6887,18,1,1,14,142,13,124,5,0
Wallkill Town,27940,40,0,16,21,767,91,650,26,1
Walton Village,3012,6,0,0,5,68,18,50,0,0
Warsaw Village,3453,6,0,0,5,78,5,73,0,0
Washingtonville Village,5828,2,0,1,1,58,5,51,2,0
Waterford Town and Village,8392,4,0,0,4,59,6,52,1,0
Waterloo Village,5175,11,0,3,8,194,23,169,2,0
Watertown,28179,109,0,16,81,1165,169,953,43,0
Watervliet,10245,26,1,11,11,242,58,163,21,0
Watkins Glen Village,1862,6,0,0,6,92,10,80,2,0
Waverly Village,4337,5,0,1,4,54,9,41,4,0
Webster Town and Village,43777,21,0,3,16,469,101,361,7,0
Weedsport Village,1797,0,0,0,0,25,5,20,0,0
Wellsville Village,4574,11,0,0,10,164,32,129,3,1
Westhampton Beach Village,1732,2,0,0,2,44,4,37,3,0
West Seneca Town,44821,35,1,9,24,896,166,710,20,0
Whitehall Village,2604,6,0,0,6,62,12,49,1,0
White Plains,57559,78,1,28,46,1232,77,1134,21,0
Whitesboro Village,3733,4,0,0,4,36,14,21,1,0
Whitestown Town,9141,0,0,0,0,77,13,61,3,0
Woodbury Town,10685,3,0,2,1,541,9,529,3,0
Woodridge Village,829,7,0,0,7,17,8,9,0,0
Woodstock Town,5931,2,0,0,2,58,13,45,0,0
Yonkers,199134,1036,6,390,615,2368,470,1662,236,10
Yorktown Town,36643,15,0,2,13,334,45,287,2,0

CityCrimeData

+ cityName : String

+ population : int

+ violentCrimeCount : int

+ murderCount : int

+ robberyCount : int

+ assaultCount : int

+ propertyCount : int

+ burglaryCount : int

+ larcentyCount : int

+ vehicleTheftCount : int

+ arsonCount : int

<<constructor>> CityCrimeData(name : String, pop : int, vio : int, mur : int, rob : int, aslt : int, pro : int, bur : int, lar : int, veh : int, ars : int)

Explanation / Answer

CrimeDataDriver.java

import java.io.*;
import java.util.Scanner;

public class CrimeDataDriver
{

    public static void main(String[] args)
    {
        ObjectInputStream serializableInput;
        ObjectOutputStream serializableOutput;
        StateCrimeStats stateCrimeStats;
        String stateName;
        Scanner input = new Scanner(System.in);
        System.out.print("Enter state name: ");
        stateName = input.nextLine();


        //Try to read from file
        try
        {
            serializableInput = new ObjectInputStream(new FileInputStream(stateName + ".ser"));
            stateCrimeStats = (StateCrimeStats)serializableInput.readObject();
            serializableInput.close();
            System.out.println("Loading existing data...");
            System.out.print(stateCrimeStats);
        }
        catch(FileNotFoundException FNFE)
        {
            System.out.println("Processing new data...");
            StateCrimeData stateCrimeData = new StateCrimeData();
            try
            {
                stateCrimeData.readCrimeData(stateName + ".csv");
                stateCrimeStats = stateCrimeData.processCrimeData();
                serializableOutput = new ObjectOutputStream(new FileOutputStream(stateName + ".ser"));
                serializableOutput.writeObject(stateCrimeStats);
                serializableOutput.close();
                System.out.print(stateCrimeStats);
                System.out.println(stateName + "'s stats saved.");
            }
            catch(FileNotFoundException FNF)
            {
                System.err.println("Error reading crime data");
            }
            catch(IOException IOE)
            {
                System.err.println("Error writing to serializable file");
            }
        }
        catch (EOFException EOFE)
        {
            System.err.println("End of of Serializable File Reached");
        }
        catch(IOException IOE)
        {
            System.err.println("Error reading from serializable file");
        }
        catch(ClassNotFoundException CNFE)
        {
            System.err.println("Error, class not found");
        }
    }
}


StateCrimeData.java
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.StringTokenizer;


public class StateCrimeData
{
    private String stateName;
    private ArrayList<CityCrimeData> crimeByCity;

    public StateCrimeData()
    {
        crimeByCity = new ArrayList<CityCrimeData>();
    }

    public void readCrimeData(String crimeFile) throws FileNotFoundException
    {
        boolean done = false;
        StringTokenizer stringTokenizer;
        Scanner fileInput = null;
        String cityData;
        String cityName;
        int population;
        int violentCrimeCount;
        int murderCount;
        int robberyCount;
        int assaultCount;
        int propertyCount;
        int burglaryCount;
        int larcenyCount;
        int vehicleTheftCount;
        int arsonCount;

        //Create Scanner
        fileInput = new Scanner(new File(crimeFile));

        //Read from file
        try
        {
            stateName = fileInput.nextLine();
            while(!done)
            {
                cityData = fileInput.nextLine();
                stringTokenizer = new StringTokenizer(cityData, ",");
                cityName = stringTokenizer.nextToken();
                population = Integer.parseInt(stringTokenizer.nextToken());
                violentCrimeCount = Integer.parseInt(stringTokenizer.nextToken());
                murderCount = Integer.parseInt(stringTokenizer.nextToken());
                robberyCount = Integer.parseInt(stringTokenizer.nextToken());
                assaultCount = Integer.parseInt(stringTokenizer.nextToken());
                propertyCount = Integer.parseInt(stringTokenizer.nextToken());
                burglaryCount = Integer.parseInt(stringTokenizer.nextToken());
                larcenyCount = Integer.parseInt(stringTokenizer.nextToken());
                vehicleTheftCount = Integer.parseInt(stringTokenizer.nextToken());
                arsonCount = Integer.parseInt(stringTokenizer.nextToken());
                crimeByCity.add(new CityCrimeData(cityName, population, violentCrimeCount, murderCount,
                                                  robberyCount, assaultCount, propertyCount, burglaryCount,
                                                  larcenyCount, vehicleTheftCount, arsonCount));
            }
        }
        catch(NoSuchElementException NSEE)
        {
            done = true;
        }
        catch(NumberFormatException NFE)
        {
            System.out.println("Improperly Formatted");
        }
        catch(IllegalStateException ISE)
        {
            System.out.println("Error reading from file");
            return;
        }

        //Close Scanner
        if(fileInput != null)
        {
            fileInput.close();
        }
    }

    public StateCrimeStats processCrimeData()
    {
        int statePopulation = 0;
        int stateViolentCrimes = 0;
        int stateTheftCrimes = 0;
        double cityHighCrimeRate = 0;
        String highCrimeRateCity = "";
        CityCrimeData cityCrimeData;
        double localCrimeRate;

        for(int index = 0; index < crimeByCity.size(); index++)
        {
            cityCrimeData = crimeByCity.get(index);
            statePopulation += cityCrimeData.population;
            stateViolentCrimes += cityCrimeData.violentCrimeCount;
            stateTheftCrimes += cityCrimeData.burglaryCount + cityCrimeData.robberyCount + cityCrimeData.larcenyCount + cityCrimeData.vehicleTheftCount;
            localCrimeRate = calculateCrimeRate(cityCrimeData.propertyCount, cityCrimeData.population);
            if(localCrimeRate > cityHighCrimeRate)
            {
                cityHighCrimeRate = localCrimeRate;
                highCrimeRateCity = cityCrimeData.cityName;
            }
        }
        return new StateCrimeStats(stateName, statePopulation, stateViolentCrimes, stateTheftCrimes, highCrimeRateCity, cityHighCrimeRate);
    }

    private double calculateCrimeRate(int propertyCount, int population)
    {
        return ((double) propertyCount / population) * 100000;
    }
}


StateCrimeStats.java

import java.io.Serializable;

public class StateCrimeStats implements Serializable
{
    private String stateName;
    private int population;
    private int violentCrimes;
    private int theftCrimes;
    private String highestPropertyCrimeCity;
    private double highestPropertyCrimeRate;

    public StateCrimeStats(String sta, int pop, int vio, int thef, String propCity, double propRate)
    {
        stateName = sta;
        population = pop;
        violentCrimes = vio;
        theftCrimes = thef;
        highestPropertyCrimeCity = propCity;
        highestPropertyCrimeRate = propRate;
    }

    @Override
    public String toString()
    {
        return String.format("State: %s " +
                             "Population: %d " +
                             "Violent Crimes: %d " +
                             "Theft Crimes: %d " +
                             "Highest Property Crime Rate: %s - %f ", stateName, population, violentCrimes, theftCrimes, highestPropertyCrimeCity, highestPropertyCrimeRate);
    }
}


CityCrimeData.java

public class CityCrimeData
{
    public String cityName;
    public int population;
    public int violentCrimeCount;
    public int murderCount;
    public int robberyCount;
    public int assaultCount;
    public int propertyCount;
    public int burglaryCount;
    public int larcenyCount;
    public int vehicleTheftCount;
    public int arsonCount;

    public CityCrimeData(String name, int pop, int vio, int mur, int rob, int ass, int prop, int bur, int lar, int veh, int ars)
    {
        cityName = name;
        population = pop;
        violentCrimeCount = vio;
        murderCount = mur;
        robberyCount = rob;
        assaultCount = ass;
        propertyCount = prop;
        burglaryCount = bur;
        larcenyCount = lar;
        vehicleTheftCount = veh;
        arsonCount = ars;
    }
}


california.csv


Adelanto,31165,198,2,52,129,886,381,372,133,17
Agoura Hills,20762,19,0,10,7,306,109,185,12,7
Alameda,76206,158,0,85,63,1902,287,1285,330,17
Albany,19104,29,0,24,4,557,94,388,75,7
Alhambra,84710,163,1,81,72,1774,344,1196,234,7
Aliso Viejo,50005,25,0,4,19,315,71,224,20,3
Alturas,2681,28,1,2,21,71,23,46,2,0
American Canyon,20068,54,0,31,19,510,91,387,32,2
Anaheim,345320,1130,11,437,600,9611,1412,6518,1681,35
Anderson,10098,63,0,9,46,721,147,454,120,5
Antioch,106447,946,12,352,557,4440,1351,1872,1217,57
Apple Valley,71159,185,3,58,112,1594,596,775,223,22
Arcadia,57855,77,0,37,39,1518,376,1080,62,3
Arcata,17805,67,3,15,42,841,147,634,60,14
Arroyo Grande,17634,31,0,4,22,455,137,288,30,0
Artesia,16734,63,2,28,33,323,91,177,55,1
Arvin,20390,153,2,16,134,744,323,308,113,15
Atascadero,28938,97,1,24,60,544,119,400,25,7
Atherton,7278,10,0,1,8,115,34,78,3,1
Atwater,28906,182,1,22,152,1323,361,804,158,5
Auburn,13779,49,0,13,34,302,86,190,26,7