]> projects.mako.cc - babynames-cdsw/commitdiff
merged updates with the new code
authorBenjamin Mako Hill <mako@atdot.cc>
Mon, 10 Apr 2023 22:35:35 +0000 (15:35 -0700)
committerBenjamin Mako Hill <mako@atdot.cc>
Mon, 10 Apr 2023 22:35:35 +0000 (15:35 -0700)
BabyNames.ipynb

index 8173933d3ae801a07001de18d27650e4f6b54c93..775b9a135d75906347609167a1ec8de59b7fc3d1 100644 (file)
@@ -6,19 +6,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "NAMES_LIST = \"yob2018.txt\"\n",
-    "\n",
-    "boys = {}\n",
-    "girls = {}\n",
-    "\n",
-    "for line in open(NAMES_LIST, 'r').readlines():\n",
-    "    name, gender, count = line.strip().split(\",\")\n",
-    "    count = int(count)\n",
-    "\n",
-    "    if gender == \"F\":\n",
-    "        girls[name.lower()] = count\n",
-    "    elif gender == \"M\":\n",
-    "        boys[name.lower()] = count"
+    "from ssadata import boys, girls"
    ]
   },
   {
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.7.4"
+
+   "version": "3.9.2"
   }
  },
  "nbformat": 4,

Benjamin Mako Hill || Want to submit a patch?