@@ -56,7 +56,7 @@ getByName();
5656``` js
5757const getDetailed = async () => {
5858 const usBabyNames = await import (' ../lib/usBabyNames.mjs' );
59- const theDetails = await usBabyNames .getDetailed (' jonathan' , ' M ' );
59+ const theDetails = await usBabyNames .getDetailed (' jonathan' , ' m ' );
6060 console .log (' theDetails' , theDetails);
6161 };
6262
@@ -77,7 +77,7 @@ getDetailed();
7777 name: string,
7878 year: int,
7979 yearRange: {start: int, end: int},
80- sex: string (M / F ),
80+ sex: string (m / f ),
8181 rank: int,
8282 rankRange: {start: int, end: int},
8383 births: int,
@@ -90,7 +90,7 @@ Output from all the functions above looks like this:
9090[
9191 { id: 784623 ,
9292 name: ' jonathan' ,
93- sex: ' M ' ,
93+ sex: ' m ' ,
9494 births: 10919 ,
9595 rank: 30 ,
9696 year: 1975 }
@@ -128,7 +128,7 @@ Output for .getNameRankAndBirthsByYear("kanye") looks like:
128128 {
129129 id: 88737 ,
130130 name: ' bertha' ,
131- sex: ' M ' ,
131+ sex: ' m ' ,
132132 nameData: {
133133 " name" : " Bertha" ,
134134 " sex" : " female" ,
@@ -161,7 +161,7 @@ const directDbAccess = async () => {
161161 const usBabyNamesModule = await import (' ../lib/usBabyNames.mjs' );
162162 const nameDataDb = usBabyNamesModule .nameDataDb ;
163163 const nameDetailsDb = usBabyNamesModule .nameDetailsDb ;
164- const nameDetailsSql = " SELECT * from usNameDetails where name = 'jonathan' and sex = 'M ' " ;
164+ const nameDetailsSql = " SELECT * from usNameDetails where name = 'jonathan' and sex = 'm ' " ;
165165 nameDetailsDb .all (nameDetailsSql, [], (err , rows ) => {
166166 if (err) {
167167 console .log (' err' , err);
@@ -170,7 +170,7 @@ const directDbAccess = async () => {
170170 console .log (rows);
171171 });
172172
173- const nameDataSql = " SELECT * from usNameData where name = 'jonathan' AND sex = 'M ' ORDER BY year DESC limit 10" ;
173+ const nameDataSql = " SELECT * from usNameData where name = 'jonathan' AND sex = 'm ' ORDER BY year DESC limit 10" ;
174174 nameDataDb .all (nameDataSql, [], (err , rows ) => {
175175 if (err) {
176176 console .log (' err' , err);
@@ -202,9 +202,8 @@ You can access the baby name sqlite database directly from the command line like
202202``` sql
203203# sqlite3 sqlite/us-name-data.sqlite
204204
205- select * from usNameData WHERE name = ' jonathan' AND year = 1975 AND sex = ' M ' ;
205+ select * from usNameData WHERE name = ' jonathan' AND year = 1975 AND sex = ' m ' ;
206206
207- select * from usNameData WHERE name = ' jonathan' AND sex = ' M' ORDER BY year DESC ;
208207```
209208
210209# Name Meanings / Pronunciation / Details database
@@ -215,7 +214,7 @@ Generated by Chat GPT-4o-mini over the course of a few days in early August 2024
215214``` sql
216215# sqlite3 sqlite/us-name-details.sqlite
217216
218- select * from usNameDetails where name = ' bertha' AND sex = ' F ' ;
217+ select * from usNameDetails where name = ' bertha' AND sex = ' f ' ;
219218```
220219
221220# USA Historical Name Data Source: Government Fine Print
0 commit comments