Skip to content

Commit

Permalink
Improve house prices project
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Aug 31, 2022
1 parent 14b78e0 commit d90380c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ links.db
blacklist.txt
searchlive
wiki_history
house_prices.zip

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
4 changes: 3 additions & 1 deletion house_prices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ To follow this project, please install the following locally:

## Data

You'll need to download a few csv files to run this project. These files are included in this repo, but you may want newer versions:
You'll need to download a few csv files to run this project. These files are included in this repo. You can also download them all [here](https://drive.google.com/uc?export=download&id=1HlHw_JyRckfPOlwwxUHS-sdDqfZQ732p).

If you want to get newer versions:

* Federal reserve data
* [CPI dataset](https://fred.stlouisfed.org/series/CPIAUCSL) - CPIAUCSL.csv
Expand Down
25 changes: 23 additions & 2 deletions house_prices/prices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Files Needed\n",
"\n",
"Before running this code, make sure you have these files available. Check the README file for more info on how to get them.\n",
"Before running this code, make sure you have these files available. You can get them by cloning the code repository, or downloading them [here](https://drive.google.com/uc?export=download&id=1HlHw_JyRckfPOlwwxUHS-sdDqfZQ732p).\n",
"\n",
"- `CPIAUCSL.csv` - US CPI (inflation measure)\n",
"- `RRVRUSQ156N.csv` - rental vacancy rate, quarterly\n",
Expand Down Expand Up @@ -832,6 +832,28 @@
"dfs[0]"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "c7c79d80-19e9-47dc-8699-4d78a9254860",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'dfs' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/var/folders/xz/9z84c__j28g8tg28bmcthjj00000gn/T/ipykernel_6759/1633160854.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdfs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'dfs' is not defined"
]
}
],
"source": [
"dfs[1]"
]
},
{
"cell_type": "code",
"execution_count": 251,
Expand Down Expand Up @@ -2283,7 +2305,6 @@
"STEP = 52\n",
"\n",
"def predict(train, test, predictors, target):\n",
" \n",
" rf = RandomForestClassifier(min_samples_split=10, random_state=1)\n",
" rf.fit(train[predictors], train[target])\n",
" preds = rf.predict(test[predictors])\n",
Expand Down

0 comments on commit d90380c

Please sign in to comment.