diff --git a/model_data/app.py b/model_data/app.py index c5a019c9..e656e9ca 100644 --- a/model_data/app.py +++ b/model_data/app.py @@ -108,3 +108,20 @@ def handler(): ], addresses=address_meta ) + + from dbfread import DBF + import os + from tqdm import tqdm + import pandas as pd + borehole_file = os.path.abspath(os.path.dirname(__file__)) + "/model_data/local_data/borehole/borehole.dbf" + table = DBF(borehole_file) + borehole_data = [x for x in tqdm(table, total=len(table))] + + # Let's take a sample + borehole_sample = borehole_data[:1000] + df = pd.DataFrame(borehole_sample) + + import geopandas as gpd + + borehole_shape_file = os.path.abspath(os.path.dirname(__file__)) + "/model_data/local_data/borehole/borehole.shp" + boreholes = gpd.read_file(borehole_shape_file) diff --git a/model_data/requirements.txt b/model_data/requirements.txt index ff906389..9888d372 100644 --- a/model_data/requirements.txt +++ b/model_data/requirements.txt @@ -8,4 +8,7 @@ mock pytest-cov pytest-mock fuzzywuzzy -python-Levenshtein \ No newline at end of file +python-Levenshtein +dbfread +geopandas +geopy \ No newline at end of file