score comparison updated

This commit is contained in:
lucasmbrown-usds 2021-06-23 11:03:11 -07:00
commit ec75b732cb
3 changed files with 68 additions and 55 deletions

View file

@ -16,6 +16,7 @@
"\n",
"DATA_PATH = Path.cwd().parent / \"data\"\n",
"FIPS_CSV_PATH = DATA_PATH / \"fips_states_2010.csv\"\n",
"OUTPUT_PATH = DATA_PATH / \"dataset\" / f\"census_acs_{ACS_YEAR}\"\n",
"\n",
"GEOID_FIELD_NAME = \"GEOID10\"\n",
"UNEMPLOYED_FIELD_NAME = \"Unemployed Civilians (fraction)\"\n",
@ -64,7 +65,7 @@
" line_count += 1\n",
" else:\n",
" fips = row[0].strip()\n",
" print(f\"Downloading data for state with FIPS code {fips}\")\n",
" print(f\"Downloading data for state/territory with FIPS code {fips}\")\n",
"\n",
" dfs.append(\n",
" censusdata.download(\n",
@ -89,7 +90,7 @@
"execution_count": null,
"id": "803cce31",
"metadata": {
"scrolled": true
"scrolled": false
},
"outputs": [],
"source": [
@ -105,41 +106,15 @@
"execution_count": null,
"id": "2a269bb1",
"metadata": {
"scrolled": false
"scrolled": true
},
"outputs": [],
"source": [
"# mkdir census\n",
"columns_to_include = [GEOID_FIELD_NAME, UNEMPLOYED_FIELD_NAME]\n",
"\n",
"df[columns_to_include].to_csv(\n",
" path_or_buf=DATA_PATH / \"tmp\" / \"census\" / \"census.csv\", index=False\n",
")"
"df[columns_to_include].to_csv(path_or_buf=OUTPUT_PATH / \"usa.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "05b93deb",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "43784bc1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1abc16a5",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {