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 scripts/GeneratingJSON.ipynb +13 −3 Original line number Diff line number Diff line Loading @@ -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, Loading @@ -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", Loading Loading @@ -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\"))" ] Loading Loading @@ -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, 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
scripts/GeneratingJSON.ipynb +13 −3 Original line number Diff line number Diff line Loading @@ -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, Loading @@ -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", Loading Loading @@ -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\"))" ] Loading Loading @@ -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, Loading