Commit edd36d4e authored by everet's avatar everet

Fix and simplify tests.

parent 9505e680
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from search import CLSearch
import sys
sys.path.append("/PATH/TO/craigapts/craigapts")
sys.path.append(r"/path/to/craigapts")
GEO = "newjersey"
QUERY = "'no section 8'"
_all = CLSearch(GEO)
n_all = _all.data.shape[0]
_ns8 = CLSearch(GEO, QUERY)
n_ns8 = _ns8.data.shape[0]
from search import CLSearch
pct_ns8 = round((n_ns8/n_all)*100, 1)
print(f"{n_ns8:,} ({pct_ns8}%) of all {n_all:,} Craigslist ads in {GEO} contain {QUERY}.")
nj_ns8 = CLSearch(geo="newjersey", query="'no section 8'")
nj_ns8_df = nj_ns8.data
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment