Commit ba763697 authored by Gregory Herschlag's avatar Gregory Herschlag
Browse files

update

parent 310a8143
Loading
Loading
Loading
Loading

lib/setup.py

0 → 100644
+6 −0
Original line number Diff line number Diff line
from setuptools import setup
from Cython.Build import cythonize

setup(
    ext_modules=cythonize("biconnectedComponents.pyx"),
)
 No newline at end of file
+13 −3
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
    {
     "data": {
      "text/plain": [
       "<module 'writer' from '/Users/g/Projects/Districting/CodeBases/redistricting2020/data/lib/writer.py'>"
       "<module 'writer' from '/Users/g/Desktop/mapprocessing/scripts/../lib/writer.py'>"
      ]
     },
     "execution_count": 1,
@@ -23,7 +23,7 @@
    "import os\n",
    "import shapely\n",
    "import sys\n",
    "sys.path.append(\"/Users/g/Projects/Districting/CodeBases/redistricting2020/data/lib\")\n",
    "sys.path.append(\"../lib\")\n",
    "\n",
    "from tqdm import tqdm\n",
    "\n",
@@ -58,7 +58,7 @@
    "cblockShapefile = gpd.read_file(\"../shapefiles/tl_rd22_09_tabblock20\") # https://www2.census.gov/geo/tiger/TIGER2024/TABBLOCK20/\n",
    "\n",
    "reload(cnF)\n",
    "cnF.determineCountyIDMaps(\".\", path=\"..\")\n",
    "cnF.determineCountyIDMaps(\"data\", path=\"..\")\n",
    "cblockShapefile[\"COUNTY\"] = cblockShapefile[\"COUNTYFP20\"].apply(lambda g: cnF.countyName(g, stateID=\"09\"))\n",
    "precinctShapefile[\"COUNTY\"] = precinctShapefile[\"COUNTYFP20\"].apply(lambda g: cnF.countyName(g, stateID=\"09\"))"
   ]
@@ -421,6 +421,16 @@
    "## Find biconnected components and merge"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pyximport; pyximport.install(reload_support=True, language_level=3)\n",
    "import biconnectedComponents"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,