From 9f7818042e0354982c4bea8a22ca954a27b945a2 Mon Sep 17 00:00:00 2001 From: Jon Roig Date: Sun, 18 Aug 2024 11:30:15 -0700 Subject: [PATCH] everything lc --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c7bded7..4549ce5 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ getByName(); ``` js const getDetailed = async () => { const usBabyNames = await import('../lib/usBabyNames.mjs'); - const theDetails = await usBabyNames.getDetailed('jonathan', 'M'); + const theDetails = await usBabyNames.getDetailed('jonathan', 'm'); console.log('theDetails', theDetails); }; @@ -77,7 +77,7 @@ getDetailed(); name: string, year: int, yearRange: {start: int, end: int}, - sex: string (M/F), + sex: string (m/f), rank: int, rankRange: {start: int, end: int}, births: int, @@ -90,7 +90,7 @@ Output from all the functions above looks like this: [ { id: 784623, name: 'jonathan', - sex: 'M', + sex: 'm', births: 10919, rank: 30, year: 1975 } @@ -128,7 +128,7 @@ Output for .getNameRankAndBirthsByYear("kanye") looks like: { id: 88737, name: 'bertha', - sex: 'M', + sex: 'm', nameData: { "name": "Bertha", "sex": "female", @@ -161,7 +161,7 @@ const directDbAccess = async () => { const usBabyNamesModule = await import('../lib/usBabyNames.mjs'); const nameDataDb = usBabyNamesModule.nameDataDb; const nameDetailsDb = usBabyNamesModule.nameDetailsDb; - const nameDetailsSql = "SELECT * from usNameDetails where name = 'jonathan' and sex = 'M' "; + const nameDetailsSql = "SELECT * from usNameDetails where name = 'jonathan' and sex = 'm' "; nameDetailsDb.all(nameDetailsSql, [], (err, rows) => { if (err) { console.log('err', err); @@ -170,7 +170,7 @@ const directDbAccess = async () => { console.log(rows); }); - const nameDataSql = "SELECT * from usNameData where name = 'jonathan' AND sex = 'M' ORDER BY year DESC limit 10"; + const nameDataSql = "SELECT * from usNameData where name = 'jonathan' AND sex = 'm' ORDER BY year DESC limit 10"; nameDataDb.all(nameDataSql, [], (err, rows) => { if (err) { console.log('err', err); @@ -202,9 +202,8 @@ You can access the baby name sqlite database directly from the command line like ``` sql # sqlite3 sqlite/us-name-data.sqlite -select * from usNameData WHERE name = 'jonathan' AND year = 1975 AND sex = 'M'; +select * from usNameData WHERE name = 'jonathan' AND year = 1975 AND sex = 'm'; -select * from usNameData WHERE name = 'jonathan' AND sex = 'M' ORDER BY year DESC; ``` # 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 ``` sql # sqlite3 sqlite/us-name-details.sqlite -select * from usNameDetails where name = 'bertha' AND sex = 'F'; +select * from usNameDetails where name = 'bertha' AND sex = 'f'; ``` # USA Historical Name Data Source: Government Fine Print