-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
330 lines (272 loc) · 19.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="description" content="Web tool that calculates the most likely age for someone given their name.">
<meta name="keywords" content="name, age, calculator, guess, visualization, united states, usa">
<meta name="author" content="Randal S. Olson">
<title>Name Age Calculator</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="shortcut icon" href="images/favicon.png" type="image/png">
<link rel="icon" href="images/favicon.png" type="image/png">
<style>
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.grid .tick {
stroke: lightgrey;
opacity: 0.7;
}
.grid path {
stroke-width: 0;
}
.x.axis path {
display: none;
}
.area {
fill: #3F5D7D;
stroke-width: 0;
}
.line {
fill: none;
stroke: black;
stroke-width: 1.5px;
}
</style>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript">
(function(d){
var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
p.type = 'text/javascript';
p.async = true;
p.src = '//assets.pinterest.com/js/pinit.js';
f.parentNode.insertBefore(p, f);
}(document));
</script>
<center>
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive size ad for blog -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-5475335462909831"
data-ad-slot="4097645704"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<br />
<div id="chart"></div>
<p><strong>Black line</strong>: # babies given name that year. <font color="#3F5D7D"><strong>Shaded area</strong></font>: # people from that year alive w/ that name as of Jan. 2024.</p>
<form action="index.html" method="get" id="name_form">
<select id="GenderPicker" name="Gender" form="name_form">
<option value="F">Female</option>
<option value="M" selected>Male</option>
</select>
<input type="text" id="NamePicker" name="Name"></input>
<input type="submit" value="Calculate">
</form>
<br />
<p><a href="" target="_blank" id="download_url">Download the data</a> for the current chart or <a href="index.html">look up a random popular name</a>.</p>
<p>Records prior to 1940 are <a href="http://www.prooffreader.com/2014/08/sex-ratio-is-clearest-indicator-of-bias.html">estimates</a> and should be taken with a grain of salt.</p>
<p>Records after 1985 are based on Social Security records and are quite reliable.</p>
<br />
<table width="470px" style="border-collapse: separate; margin: 0 auto;">
<tr>
<!-- reddit -->
<td><script type="text/javascript" src="//www.redditstatic.com/button/button1.js"></script></td>
<!-- Facebook -->
<td><div class="fb-share-button" data-href="http://rhiever.github.io/name-age-calculator/" data-layout="button_count"></div></td>
<!-- Twitter -->
<td><a href="https://twitter.com/share" class="twitter-share-button" data-text="Can the Name Age Calculator guess how old you are?" data-via="randal_olson" data-hashtags="dataviz">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></td>
<!-- LinkedIn -->
<td><script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-counter="right"></script></td>
<!-- Pinterest -->
<td><a href="https://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Frhiever.github.io%2Fname-age-calculator%2F&description=Name%20Age%20Calculator"
data-pin-do="buttonPin"
data-pin-config="above">
<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></td>
</tr>
</table>
<br />
<table width="720px">
<tr>
<td align="left" width="33%">Code and analysis by <strong><a href="http://www.randalolson.com/">Randy Olson</a></strong></td>
<td align="center" width="33%"><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img src="images/CC.png" /></a></td>
<td align="right" width="33%">Methods from <strong><a href="http://fivethirtyeight.com/features/how-to-tell-someones-age-when-all-you-know-is-her-name/">FiveThirtyEight</a></strong><br />Data from <strong>SSA.gov <a href="http://www.ssa.gov/oact/babynames/limits.html">[1]</a> <a href="http://www.ssa.gov/oact/NOTES/as120/LifeTables_Tbl_7.html">[2]</a></strong></td>
</tr>
</table>
<br />
</center>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script>
function plotName(name, gender) {
var http = new XMLHttpRequest();
http.open("HEAD", "names/" + gender + "/" + name.charAt(0) + "/" + name + ".txt", false);
http.send();
if (http.status == 404) {
window.alert("Sorry, \"" + name + "\" is not in the " + gender_text + " name database.");
window.location.replace("index.html");
}
var margin = {top: 40, right: 60, bottom: 60, left: 60},
width = 600,
height = 400;
var parseDate = d3.time.format("%Y").parse;
var x = d3.time.scale()
.range([0, width]);
var y = d3.scale.linear()
.range([height, 0]);
var color = d3.scale.ordinal().range(["#000000", "#008AB8"]);
var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom")
.ticks(12)
.tickFormat(d3.time.format("%Y"));
var yAxis = d3.svg.axis()
.scale(y)
.orient("left")
.ticks(6);
var area = d3.svg.area()
.interpolate("basis")
.x(function(d) { return x(d.YOB); })
.y0(height)
.y1(function(d) { return y(d.Alive); });
var line = d3.svg.line()
.interpolate("basis")
.x(function(d) { return x(d.YOB); })
.y(function(d) { return y(d.Born); });
var svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
function make_x_axis() {
return d3.svg.axis()
.scale(x)
.orient("bottom")
.ticks(5)
}
function make_y_axis() {
return d3.svg.axis()
.scale(y)
.orient("left")
.ticks(5)
}
d3.csv("names/" + gender + "/" + name.charAt(0) + "/" + name + ".txt", function(error, data) {
data.forEach(function(d) {
d.YOB = parseDate(d.YOB);
d.Born = +d.Born;
d.Alive = +d.Alive;
});
x.domain(d3.extent(data, function(d) { return d.YOB; }));
y.domain([0, d3.max(data, function(d) { return d.Born; })]);
svg.append("g")
.attr("class", "grid")
.attr("transform", "translate(0," + height + ")")
.call(make_x_axis()
.tickSize(-height, 0, 0)
.tickFormat("")
)
svg.append("g")
.attr("class", "grid")
.call(make_y_axis()
.tickSize(-width, 0, 0)
.tickFormat("")
)
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.call(xAxis);
svg.append("g")
.attr("class", "y axis")
.call(yAxis)
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", -75)
.attr("x", -125)
.attr("dy", "1em")
.style("text-anchor", "end");
//.text("Number of people with name");
svg.append("path")
.attr("class", "line")
.attr("d", line(data));
svg.append("path")
.attr("class", "area")
.attr("d", area(data));
svg.append("text")
.attr("x", (width / 2))
.attr("y", 0 - (margin.top / 2))
.attr("text-anchor", "middle")
.style("font-size", "24px")
.text("Birth years of American " + gender_text + " named " + name);
});
d3.csv("names/" + gender + "/" + name.charAt(0) + "/" + name + "-stats.txt", function(error, data) {
svg.append("text")
.attr("x", (width / 2))
.attr("y", height + margin.bottom - 10)
.attr("text-anchor", "middle")
.style("font-size", "14px")
.style("font-weight", "bold")
.text("The median living " + gender_text.substring(0, gender_text.length - 1) + " named " + name + " was born around " + data[0]["Median"] + " and ranges from " + (2024 - (data[0]["75th_Percentile"])) + " to " + (2024 - (data[0]["25th_Percentile"])) + " years old.");
});
}
function toTitleCase(str) {
return str.replace(/\w\S*/g, function(txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });
}
// return a parameter value from the current URL
function getParam ( sname )
{
var params = location.search.substr(location.search.indexOf("?") + 1);
var sval = "";
params = params.split("&");
// split param and value into individual pieces
for (var i = 0; i < params.length; i++) {
temp = params[i].split("=");
if ( [temp[0]] == sname ) {
sval = temp[1];
break;
}
}
return sval.split("+")[0];
}
var name = toTitleCase(getParam("Name"));
var gender = toTitleCase(getParam("Gender"));
if (name == "" || gender == "") {
var popular_names = ['Aaliyah', 'Aaron', 'Abigail', 'Adam', 'Addison', 'Adrian', 'Agnes', 'Aidan', 'Aiden', 'Alan', 'Albert', 'Alejandro', 'Alex', 'Alexa', 'Alexander', 'Alexandra', 'Alexandria', 'Alexis', 'Alfred', 'Alice', 'Alicia', 'Alison', 'Allen', 'Allison', 'Alma', 'Alvin', 'Alyssa', 'Amanda', 'Amber', 'Amelia', 'Amy', 'Ana', 'Andre', 'Andrea', 'Andrew', 'Angel', 'Angela', 'Angelina', 'Anita', 'Ann', 'Anna', 'Anne', 'Annette', 'Annie', 'Anthony', 'Antonio', 'April', 'Ariana', 'Arianna', 'Arlene', 'Arnold', 'Arthur', 'Ashley', 'Aubrey', 'Audrey', 'Austin', 'Autumn', 'Ava', 'Avery', 'Bailey', 'Barbara', 'Barry', 'Beatrice', 'Benjamin', 'Bernard', 'Bernice', 'Bertha', 'Bessie', 'Beth', 'Bethany', 'Betty', 'Beverly', 'Bill', 'Billie', 'Billy', 'Blake', 'Bobby', 'Bonnie', 'Bradley', 'Brandi', 'Brandon', 'Brandy', 'Brayden', 'Brenda', 'Brent', 'Brett', 'Brian', 'Brianna', 'Brittany', 'Brooke', 'Brooklyn', 'Bruce', 'Bryan', 'Bryce', 'Caitlin', 'Caleb', 'Calvin', 'Cameron', 'Camila', 'Carl', 'Carla', 'Carlos', 'Carmen', 'Carol', 'Carole', 'Caroline', 'Carolyn', 'Carrie', 'Carson', 'Carter', 'Casey', 'Cassandra', 'Catherine', 'Cathy', 'Cecil', 'Cecilia', 'Chad', 'Charlene', 'Charles', 'Charlie', 'Charlotte', 'Chase', 'Chelsea', 'Cheryl', 'Chester', 'Chloe', 'Chris', 'Christian', 'Christina', 'Christine', 'Christopher', 'Cindy', 'Claire', 'Clara', 'Clarence', 'Claudia', 'Clayton', 'Clifford', 'Clyde', 'Cody', 'Cole', 'Colin', 'Colleen', 'Colton', 'Connie', 'Connor', 'Constance', 'Cooper', 'Cora', 'Corey', 'Cory', 'Courtney', 'Craig', 'Crystal', 'Curtis', 'Cynthia', 'Daisy', 'Dale', 'Damian', 'Dan', 'Dana', 'Daniel', 'Danielle', 'Danny', 'Darlene', 'Darrell', 'Darren', 'David', 'Dawn', 'Dean', 'Deanna', 'Debbie', 'Deborah', 'Debra', 'Delores', 'Denise', 'Dennis', 'Derek', 'Derrick', 'Destiny', 'Devin', 'Diana', 'Diane', 'Diego', 'Dolores', 'Dominic', 'Don', 'Donald', 'Donna', 'Doris', 'Dorothy', 'Douglas', 'Duane', 'Dustin', 'Dylan', 'Earl', 'Eddie', 'Edgar', 'Edith', 'Edna', 'Eduardo', 'Edward', 'Edwin', 'Eileen', 'Elaine', 'Eleanor', 'Eli', 'Elias', 'Elijah', 'Elizabeth', 'Ella', 'Ellen', 'Elmer', 'Elsie', 'Emily', 'Emma', 'Eric', 'Erica', 'Erik', 'Erika', 'Erin', 'Ernest', 'Esther', 'Ethan', 'Ethel', 'Eugene', 'Eva', 'Evan', 'Evelyn', 'Everett', 'Faith', 'Fernando', 'Florence', 'Floyd', 'Frances', 'Francis', 'Francisco', 'Frank', 'Franklin', 'Fred', 'Frederick', 'Gabriel', 'Gabriella', 'Gabrielle', 'Gail', 'Garrett', 'Gary', 'Gavin', 'Gene', 'Genevieve', 'George', 'Georgia', 'Gerald', 'Geraldine', 'Gertrude', 'Gilbert', 'Gina', 'Gladys', 'Glen', 'Glenda', 'Glenn', 'Gloria', 'Gordon', 'Grace', 'Grant', 'Grayson', 'Gregory', 'Gwendolyn', 'Hailey', 'Haley', 'Hannah', 'Harold', 'Harper', 'Harry', 'Harvey', 'Hayden', 'Hazel', 'Heather', 'Hector', 'Heidi', 'Helen', 'Henry', 'Herbert', 'Herman', 'Holly', 'Howard', 'Hunter', 'Ian', 'Ida', 'Irene', 'Isaac', 'Isabel', 'Isabella', 'Isabelle', 'Isaiah', 'Ivan', 'Jack', 'Jackson', 'Jacob', 'Jacqueline', 'Jake', 'James', 'Jamie', 'Jane', 'Janet', 'Janice', 'Jared', 'Jasmine', 'Jason', 'Javier', 'Jaxon', 'Jay', 'Jayden', 'Jean', 'Jeanette', 'Jeanne', 'Jeff', 'Jeffery', 'Jeffrey', 'Jenna', 'Jennie', 'Jennifer', 'Jeremiah', 'Jeremy', 'Jerome', 'Jerry', 'Jesse', 'Jessica', 'Jessie', 'Jessie', 'Jesus', 'Jill', 'Jim', 'Jimmie', 'Jimmy', 'Jo', 'Joan', 'Joann', 'Joanna', 'Joanne', 'Jocelyn', 'Joe', 'Joel', 'John', 'Johnnie', 'Johnny', 'Jon', 'Jonathan', 'Jordan', 'Jordan', 'Jorge', 'Jose', 'Joseph', 'Josephine', 'Joshua', 'Josiah', 'Joy', 'Joyce', 'Juan', 'Juanita', 'Judith', 'Judy', 'Julia', 'Julian', 'Julie', 'June', 'Justin', 'Kaitlyn', 'Kara', 'Karen', 'Katelyn', 'Katherine', 'Kathleen', 'Kathryn', 'Kathy', 'Katie', 'Katrina', 'Kayla', 'Kaylee', 'Keith', 'Kelly', 'Kelsey', 'Kenneth', 'Kevin', 'Kim', 'Kimberly', 'Kristen', 'Kristin', 'Kristina', 'Kyle', 'Kylie', 'Lance', 'Landon', 'Larry', 'Laura', 'Lauren', 'Laurie', 'Lawrence', 'Layla', 'Leah', 'Lee', 'Lena', 'Leo', 'Leon', 'Leona', 'Leonard', 'Leroy', 'Leslie', 'Leslie', 'Lester', 'Levi', 'Lewis', 'Liam', 'Lillian', 'Lillie', 'Lily', 'Linda', 'Lindsay', 'Lindsey', 'Lisa', 'Lloyd', 'Logan', 'Lois', 'Loretta', 'Lori', 'Lorraine', 'Louis', 'Louise', 'Lucas', 'Lucille', 'Lucy', 'Luis', 'Luke', 'Lydia', 'Lynn', 'Mabel', 'Mackenzie', 'Madeline', 'Madelyn', 'Madison', 'Maggie', 'Makayla', 'Manuel', 'Marc', 'Marcia', 'Marcus', 'Margaret', 'Margie', 'Maria', 'Mariah', 'Marian', 'Marie', 'Marilyn', 'Mario', 'Marion', 'Marissa', 'Marjorie', 'Mark', 'Marlene', 'Marsha', 'Martha', 'Martin', 'Marvin', 'Mary', 'Mason', 'Mateo', 'Matthew', 'Mattie', 'Maureen', 'Maurice', 'Max', 'Maxine', 'Maxwell', 'Maya', 'Megan', 'Melanie', 'Melinda', 'Melissa', 'Melody', 'Melvin', 'Mia', 'Micah', 'Michael', 'Micheal', 'Michele', 'Michelle', 'Miguel', 'Mike', 'Mildred', 'Miles', 'Milton', 'Minnie', 'Miranda', 'Miriam', 'Mitchell', 'Molly', 'Monica', 'Morgan', 'Myrtle', 'Nancy', 'Naomi', 'Natalie', 'Nathan', 'Nathaniel', 'Neil', 'Nellie', 'Nicholas', 'Nicole', 'Nina', 'Noah', 'Nolan', 'Nora', 'Norma', 'Norman', 'Oliver', 'Olivia', 'Omar', 'Oscar', 'Owen', 'Paige', 'Pamela', 'Parker', 'Patricia', 'Patrick', 'Patsy', 'Paul', 'Paula', 'Pauline', 'Pearl', 'Peggy', 'Peter', 'Philip', 'Phillip', 'Phyllis', 'Preston', 'Priscilla', 'Rachel', 'Ralph', 'Randall', 'Randy', 'Ray', 'Raymond', 'Rebecca', 'Regina', 'Reginald', 'Renee', 'Rhonda', 'Ricardo', 'Richard', 'Ricky', 'Riley', 'Riley', 'Rita', 'Robert', 'Roberta', 'Roberto', 'Robin', 'Rodney', 'Roger', 'Ronald', 'Ronnie', 'Rosa', 'Rose', 'Rosemary', 'Roy', 'Ruben', 'Ruby', 'Russell', 'Ruth', 'Ryan', 'Sabrina', 'Sadie', 'Sally', 'Sam', 'Samantha', 'Samuel', 'Sandra', 'Sara', 'Sarah', 'Savannah', 'Scarlett', 'Scott', 'Sean', 'Sebastian', 'Seth', 'Shane', 'Shannon', 'Sharon', 'Shawn', 'Sheila', 'Shelby', 'Sherry', 'Shirley', 'Sofia', 'Sophia', 'Sophie', 'Spencer', 'Stacey', 'Stacy', 'Stanley', 'Stella', 'Stephanie', 'Stephen', 'Steve', 'Steven', 'Sue', 'Susan', 'Suzanne', 'Sydney', 'Sylvia', 'Tamara', 'Tammy', 'Tanya', 'Tara', 'Taylor', 'Taylor', 'Teresa', 'Terri', 'Terry', 'Thelma', 'Theodore', 'Theresa', 'Thomas', 'Tiffany', 'Timothy', 'Tina', 'Todd', 'Tom', 'Tommy', 'Toni', 'Tony', 'Tonya', 'Tracy', 'Travis', 'Trevor', 'Tristan', 'Troy', 'Tyler', 'Valerie', 'Vanessa', 'Vera', 'Vernon', 'Veronica', 'Vicki', 'Vickie', 'Victor', 'Victoria', 'Vincent', 'Viola', 'Violet', 'Virginia', 'Vivian', 'Walter', 'Wanda', 'Warren', 'Wayne', 'Wendy', 'Wesley', 'William', 'Willie', 'Willie', 'Wilma', 'Wyatt', 'Xavier', 'Yolanda', 'Yvonne', 'Zachary', 'Zoe', 'Zoey'];
var name_genders = ['F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'M', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'F', 'M', 'M', 'M', 'M', 'F', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'M', 'F', 'M', 'M', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'F', 'F', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'M', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'M', 'M', 'F', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'M', 'F', 'F', 'M', 'M', 'F', 'M', 'M', 'M', 'F', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'M', 'F', 'M', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'M', 'F', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'M', 'M', 'M', 'M', 'F', 'F', 'F', 'M', 'F', 'F', 'F', 'M', 'F', 'M', 'F', 'F', 'F', 'F', 'M', 'F', 'M', 'M', 'F', 'M', 'M', 'F', 'M', 'F', 'M', 'M', 'F', 'F', 'M', 'F', 'F'];
var choice = Math.floor(Math.random() * popular_names.length);
name = popular_names[choice];
gender = name_genders[choice];
}
else {
if (gender == "F") {
var dd = document.getElementById("GenderPicker");
for (var i = 0; i < dd.options.length; i++) {
if (dd.options[i].value === gender) {
dd.selectedIndex = i;
break;
}
}
}
document.getElementById("NamePicker").value = name;
}
document.getElementById("download_url").href = "names/" + gender + "/" + name.charAt(0) + "/" + name + ".txt";
var gender_text = "girls";
if (gender == "M") {
gender_text = "boys";
}
plotName(name, gender);
</script>
</body>