Plotting Data By State
- To: mathgroup at smc.vnet.net
- Subject: [mg132666] Plotting Data By State
- From: Alexandra Lipson <lipson.alexandra at gmail.com>
- Date: Fri, 2 May 2014 02:18:16 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
Hello All, I am trying to plot manipulated crime data from 1973 on a United States map to show the comparisons of the number of arrests of certain crimes to the number of actual crimes committed in a specific year. I want to show whether there are more arrests than crimes or more crimes than arrests in each state. I am new to Mathematica and would love some help. Here is what I have so far...(data manipulation still in progress): data = Import["/Users/allielipson/Desktop/USArrests.csv"]; alPop = 4000000; akPop = 300000; azPop = 2000000; arkPop = 2000000; caPop = 20000000; coPop = 2000000; cnPop = 3000000; dePop = 500000; flPop = 7000000; gaPop = 3000000; hiPop = 800000; idPop = 700000; ilPop = 9000000; inPop = 4000000; iwPop = 2000000; ksPop = 2000000; kenPop = 3000000; laPop = 3000000; mePop = 1000000; mlPop = 3000000; maPop = 5000000; miPop = 7000000; mnPop = 3000000; msPop = 2000000; missPop = 4000000; moPop = 600000; nePop = 1400000; nvPop = 700000; nhPop = 700000; njPop = 5000000; nmPop = 1000000; nyPop = 15000000; ncPop = 5000000; ndPop = 600000; ohPop = 8000000; okPop = 3000000; orPop = 2000000; paPop = 10000000; riPop = 900000; scPop = 3000000; sdPop = 600000; tePop = 4000000; txPop = 12000000; utPop = 1000000; vtPop = 400000; vaPop = 5000000; waPop = 3000000; wvPop = 2000000; wiPop = 4000000; wyPop = 300000; alMu = (data[[2, 2]]/100000)*alPop alAss = (data[[2, 3]]/100000)*alPop alRa = (data[[2, 5]]/100000)*alPop akMu = (data[[3, 2]]/100000)*akPop (*Still working on all the calculations... *) crimeData = Import["http://hci.stanford.edu/jheer/workshop/data/crime/CrimeStatebyState .\ csv"] alMur = crimeData[[15, 5]] alRap = crimeData[[61, 5]] alAssault = crimeData[[153, 5]] akMurder = crimeData[[337, 5]] akRap = crimeData[[383, 5]]; akAssault = crimeData[[475, 5]]; azMur = crimeData[[659, 5]]; azRap = crimeData[[705, 5]]; azAssault = crimeData[[797, 5]]; arkMur = crimeData[[981, 5]]; arkRap = crimeData[[1027, 5]]; arkAssault = crimeData[[1119, 5]]; caMurder = crimeData[[1303, 5]]; caRap = crimeData[[1349, 5]]; caAssault = crimeData[[1441, 5]]; coMurder = crimeData[[1625, 5]]; coRap = crimeData[[1671, 5]]; coAssault = crimeData[[1763, 5]]; cnMur = crimeData[[1947, 5]]; cnRap = crimeData[[1993, 5]]; cnAssault = crimeData[[2085, 5]]; deMurder = crimeData[[2269, 5]]; deRap = crimeData[[2315, 5]]; deAssault = crimeData[[2407, 5]]; flMurder = crimeData[[2913, 5]]; flRap = crimeData[[2959, 5]]; flAssault = crimeData[[3051, 5]]; gaMur = crimeData[[3235, 5]]; gaRap = crimeData[[3281, 5]]; gaAssault = crimeData[[3373, 5]]; hiMur = crimeData[[3557, 5]]; hiRap = crimeData[[3603, 5]]; hiAssault = crimeData[[3695, 5]]; idMur = crimeData[[3879, 5]]; idRap = crimeData[[3925, 5]]; idAssault = crimeData[[4017, 5]]; ilMur = crimeData[[4201, 5]]; ilRap = crimeData[[4247, 5]]; ilAssault = crimeData[[4339, 5]]; inMur = crimeData[[4523, 5]]; inRap = crimeData[[4569, 5]]; inAssault = crimeData[[4661, 5]]; iwMur = crimeData[[4845, 5]]; iwRap = crimeData[[4891, 5]]; iwAssault = crimeData[[4983, 5]]; ksMur = crimeData[[5167, 5]]; ksRap = crimeData[[5213, 5]]; ksAssault = crimeData[[5305, 5]]; keMur = crimeData[[5489, 5]]; keRap = crimeData[[5535, 5]]; keAssault = crimeData[[5627, 5]]; laMur = crimeData[[5811, 5]]; laRap = crimeData[[5857, 5]]; laAssault = crimeData[[5949, 5]]; meMur = crimeData[[6133, 5]]; meRap = crimeData[[6179, 5]]; meAssault = crimeData[[6271, 5]]; mlMur = crimeData[[6455, 5]]; mlRap = crimeData[[6501, 5]]; mlAssault = crimeData[[6593, 5]]; maMur = crimeData[[6777, 5]]; maRap = crimeData[[6823, 5]]; maAssault = crimeData[[6915, 5]]; miMur = crimeData[[7099, 5]]; miRap = crimeData[[7145, 5]]; miAssault = crimeData[[7237, 5]]; mnMur = crimeData[[7421, 5]]; mnRap = crimeData[[7467, 5]]; mnAssault = crimeData[[7559, 5]]; msMur = crimeData[[7743, 5]]; msRap = crimeData[[7789, 5]]; msAssault = crimeData[[7881, 5]]; missMur = crimeData[[8065, 5]]; missRap = crimeData[[8111, 5]]; missAssault = crimeData[[8203, 5]]; moMur = crimeData[[8387, 5]]; moRap = crimeData[[8433, 5]]; moAssault = crimeData[[8525, 5]]; neMur = crimeData[[8709, 5]]; neRap = crimeData[[8755, 5]]; neAssault = crimeData[[8847, 5]]; nvMur = crimeData[[9031, 5]]; nvRap = crimeData[[9077, 5]]; nvAssault = crimeData[[9169, 5]]; nhMur = crimeData[[9353, 5]]; nhRap = crimeData[[9399, 5]]; nhAssault = crimeData[[9491, 5]]; njMur = crimeData[[9675, 5]]; njRap = crimeData[[9721, 5]]; njAssault = crimeData[[9813, 5]]; nmMur = crimeData[[9997, 5]]; nmRap = crimeData[[10043, 5]]; nmAssault = crimeData[[10135, 5]]; nyMur = crimeData[[10319, 5]]; nyRap = crimeData[[10365, 5]]; nyAssault = crimeData[[10457, 5]]; ncMur = crimeData[[10641, 5]]; ncRap = crimeData[[10687, 5]]; ncAssault = crimeData[[10779, 5]]; ndMur = crimeData[[10963, 5]]; ndRap = crimeData[[11009, 5]]; ndAssault = crimeData[[11101, 5]]; ohMur = crimeData[[11285, 5]]; ohRap = crimeData[[11331, 5]]; ohAssault = crimeData[[11423, 5]]; okMur = crimeData[[11607, 5]]; okRap = crimeData[[11653, 5]]; okAssault = crimeData[[11745, 5]]; orMur = crimeData[[11929, 5]]; orRap = crimeData[[11975, 5]]; orAssault = crimeData[[12067, 5]]; paMur = crimeData[[12251, 5]]; paRap = crimeData[[12297, 5]]; paAssault = crimeData[[12389, 5]]; riMur = crimeData[[12573, 5]]; riRap = crimeData[[12619, 5]]; riAssault = crimeData[[12711, 5]]; scMur = crimeData[[12895, 5]]; scRap = crimeData[[12941, 5]]; scAssault = crimeData[[13033, 5]]; sdMur = crimeData[[13217, 5]]; sdRap = crimeData[[13263, 5]]; sdAssault = crimeData[[13355, 5]]; teMur = crimeData[[13539, 5]]; teRap = crimeData[[13585, 5]]; teAssault = crimeData[[13677, 5]]; txMur = crimeData[[13861, 5]]; txRap = crimeData[[13907, 5]]; txAssault = crimeData[[13999, 5]]; utMur = crimeData[[14183, 5]]; utRap = crimeData[[14229, 5]]; utAssault = crimeData[[14321, 5]]; vtMur = crimeData[[14505, 5]]; vtRap = crimeData[[14551, 5]]; vtAssault = crimeData[[14643, 5]]; vaMur = crimeData[[14827, 5]]; vaRap = crimeData[[14873, 5]]; vaAssault = crimeData[[14965, 5]]; waMur = crimeData[[15149, 5]]; waRap = crimeData[[15195, 5]]; waAssault = crimeData[[15287, 5]]; wvMur = crimeData[[15471, 5]]; wvRap = crimeData[[15517, 5]]; wvAssault = crimeData[[15609, 5]]; wiMur = crimeData[[15793, 5]]; wiRap = crimeData[[15839, 5]]; wiAssault = crimeData[[15931, 5]]; wyMur = crimeData[[16115, 5]]; wyRap = crimeData[[16161, 5]]; wyAssault = crimeData[[16253, 5]]; murdersNotAccountedForAl = alMur - alMu assaultsNotAccountedForAl = alAssault - alAss rapesNotAccountedForAl = alRap - alRa murdersNotAccountedForAk = akMurder - akMu Hope everyone is having a lovely May 1st. Thank you in advance! Alexandra
- Follow-Ups:
- Re: Plotting Data By State
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Plotting Data By State