Browse Source

lost data files

master
boB Rudis 5 years ago
parent
commit
df675e14a5
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 3
      DESCRIPTION
  2. 2
      R/util.R
  3. 54
      inst/extdata/deaths.csv
  4. 52
      inst/extdata/election2012.csv
  5. 1
      inst/extdata/wapostates.csv

3
DESCRIPTION

@ -28,7 +28,7 @@ Suggests:
Depends:
R (>= 3.2.0),
Imports:
ggplot2 (>= 2.2.0),
ggplot2 (>= 2.2.1.9000),
scales (>= 0.5.0)
RoxygenNote: 6.0.1
Collate:
@ -40,3 +40,4 @@ Collate:
'statebins.R'
'theme-statebin.R'
'util.R'
Remotes: tidyverse/ggplot2

2
R/util.R

@ -31,3 +31,5 @@ validate_states <- function(state_data, state_col, merge.x) {
return(state_data)
}
"%||%" <- function(a, b) { if (!is.null(a)) a else b }

54
inst/extdata/deaths.csv

@ -0,0 +1,54 @@
state,births,fertility_rate,deaths,death_rate
Alabama,58448,60.9,48681,1013.6
Alaska,11187,75.9,3849,532.6
Arizona,86441,67.5,48381,746.3
Arkansas,38347,67.0,29653,1009.3
California,503755,63.3,239942,636.6
Colorado,65187,62.0,32563,636.4
Connecticut,36359,53.2,29526,824.6
Delaware,11023,61.4,7845,864.8
District of Columbia,9399,55.3,4589,742.6
Florida,213148,59.0,173976,912.9
Georgia,130280,62.4,71248,725.9
Hawaii,18980,71.6,9923,721.8
Idaho,22963,74.1,12027,758.8
Illinois,159160,60.9,101906,791.9
Indiana,83227,64.7,58202,893.1
Iowa,38702,66.8,28184,920.4
Kansas,40341,72.3,25116,874.7
Kentucky,55758,65.4,42626,975.6
Louisiana,62642,67.0,40890,893.8
Maine,12798,53.9,13007,978.9
Maryland,72883,60.8,43745,750.6
Massachusetts,72439,53.5,53710,815.3
Michigan,113091,59.6,89508,906.3
Minnesota,68772,65.7,39820,745.0
Mississippi,38669,64.2,29278,983.0
Missouri,75446,64.3,55848,929.1
Montana,12118,66.6,9115,913.1
Nebraska,25942,72.3,15476,839.9
Nevada,34911,63.0,20343,747.0
New Hampshire,12352,50.3,10823,821.0
New Jersey,104230,60.4,70558,799.9
New Mexico,27068,67.8,16452,790.1
New York,240916,59.7,149174,766.4
North Carolina,119831,61.0,79882,827.2
North Dakota,10106,74.6,5965,872.2
Ohio,138483,62.6,111427,965.2
Oklahoma,52751,70.5,37175,980.5
Oregon,45067,59.0,32788,846.8
Pennsylvania,142514,58.8,128237,1006.3
Rhode Island,10926,51.7,9581,911.3
South Carolina,57155,61.4,42072,899.1
South Dakota,12104,78.1,7314,887.5
Tennessee,80371,62.6,60541,945.5
Texas,382727,69.9,168640,656.8
Utah,51465,83.1,15266,541.9
Vermont,6009,51.6,5433,867.3
Virginia,103013,61.7,60804,751.0
Washington,87463,63.5,49691,727.5
West Virginia,20827,61.3,21867,1178.6
Wisconsin,67295,61.8,48410,847.5
Wyoming,7572,69.5,4387,772.1
Puerto Rico,38900,51.8,29758,802.8
1 state births fertility_rate deaths death_rate
2 Alabama 58448 60.9 48681 1013.6
3 Alaska 11187 75.9 3849 532.6
4 Arizona 86441 67.5 48381 746.3
5 Arkansas 38347 67.0 29653 1009.3
6 California 503755 63.3 239942 636.6
7 Colorado 65187 62.0 32563 636.4
8 Connecticut 36359 53.2 29526 824.6
9 Delaware 11023 61.4 7845 864.8
10 District of Columbia 9399 55.3 4589 742.6
11 Florida 213148 59.0 173976 912.9
12 Georgia 130280 62.4 71248 725.9
13 Hawaii 18980 71.6 9923 721.8
14 Idaho 22963 74.1 12027 758.8
15 Illinois 159160 60.9 101906 791.9
16 Indiana 83227 64.7 58202 893.1
17 Iowa 38702 66.8 28184 920.4
18 Kansas 40341 72.3 25116 874.7
19 Kentucky 55758 65.4 42626 975.6
20 Louisiana 62642 67.0 40890 893.8
21 Maine 12798 53.9 13007 978.9
22 Maryland 72883 60.8 43745 750.6
23 Massachusetts 72439 53.5 53710 815.3
24 Michigan 113091 59.6 89508 906.3
25 Minnesota 68772 65.7 39820 745.0
26 Mississippi 38669 64.2 29278 983.0
27 Missouri 75446 64.3 55848 929.1
28 Montana 12118 66.6 9115 913.1
29 Nebraska 25942 72.3 15476 839.9
30 Nevada 34911 63.0 20343 747.0
31 New Hampshire 12352 50.3 10823 821.0
32 New Jersey 104230 60.4 70558 799.9
33 New Mexico 27068 67.8 16452 790.1
34 New York 240916 59.7 149174 766.4
35 North Carolina 119831 61.0 79882 827.2
36 North Dakota 10106 74.6 5965 872.2
37 Ohio 138483 62.6 111427 965.2
38 Oklahoma 52751 70.5 37175 980.5
39 Oregon 45067 59.0 32788 846.8
40 Pennsylvania 142514 58.8 128237 1006.3
41 Rhode Island 10926 51.7 9581 911.3
42 South Carolina 57155 61.4 42072 899.1
43 South Dakota 12104 78.1 7314 887.5
44 Tennessee 80371 62.6 60541 945.5
45 Texas 382727 69.9 168640 656.8
46 Utah 51465 83.1 15266 541.9
47 Vermont 6009 51.6 5433 867.3
48 Virginia 103013 61.7 60804 751.0
49 Washington 87463 63.5 49691 727.5
50 West Virginia 20827 61.3 21867 1178.6
51 Wisconsin 67295 61.8 48410 847.5
52 Wyoming 7572 69.5 4387 772.1
53 Puerto Rico 38900 51.8 29758 802.8

52
inst/extdata/election2012.csv

@ -0,0 +1,52 @@
state,Obama,Romney
AL,,9
AK,,3
AZ,,11
AR,,6
CA,55,
CO,9,
CT,7,
DE,3,
DC,3,
FL,29,
GA,,16
HI,4,
ID,,4
IL,20,
IN,,11
IA,6,
KS,,6
KY,,8
LA,,8
ME,4,
MD,10,
MA,11,
MI,16,
MN,10,
MS,,6
MO,,10
MT,,3
NE,,5
NV,6,
NH,4,
NJ,14,
NM,5,
NY,29,
NC,,15
ND,,3
OH,18,
OK,,7
OR,7,
PA,20,
RI,4,
SC,,9
SD,,3
TN,,11
TX,,38
UT,,6
VT,3,
VA,13,
WA,12,
WV,,5
WI,10,
WY,,3
1 state Obama Romney
2 AL 9
3 AK 3
4 AZ 11
5 AR 6
6 CA 55
7 CO 9
8 CT 7
9 DE 3
10 DC 3
11 FL 29
12 GA 16
13 HI 4
14 ID 4
15 IL 20
16 IN 11
17 IA 6
18 KS 6
19 KY 8
20 LA 8
21 ME 4
22 MD 10
23 MA 11
24 MI 16
25 MN 10
26 MS 6
27 MO 10
28 MT 3
29 NE 5
30 NV 6
31 NH 4
32 NJ 14
33 NM 5
34 NY 29
35 NC 15
36 ND 3
37 OH 18
38 OK 7
39 OR 7
40 PA 20
41 RI 4
42 SC 9
43 SD 3
44 TN 11
45 TX 38
46 UT 6
47 VT 3
48 VA 13
49 WA 12
50 WV 5
51 WI 10
52 WY 3

1
inst/extdata/wapostates.csv

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save