From 035adcf6303ad5989aa2ff85cc20d38cf1eb2bc2 Mon Sep 17 00:00:00 2001 From: siddjain444 Date: Thu, 25 Jan 2024 05:55:37 +0000 Subject: [PATCH] Updating the shapefile --- src/data.jl | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/data.jl b/src/data.jl index 927db64..5d8f9b4 100644 --- a/src/data.jl +++ b/src/data.jl @@ -83,22 +83,13 @@ function state_hr_district_dfs() # get the CRS (if on another DB) spatial_ref_df = DBInterface.execute(connection, "SELECT * from spatial_ref_sys") |> DataFrame db_crs = spatial_ref_df.SRTEXT[begin] # TODO: use this when converting. - # get tables for each admin level - state_table = do_geoquery(connection, "states") - hr_table = do_geoquery(connection, "homogeneous_regions") - district_table = do_geoquery(connection, "districts_2011") - # get rivers etc - shape_wkb_to_module_geom!(GeometryBasics, state_table) - shape_wkb_to_module_geom!(GeometryBasics, hr_table) + district_table = do_geoquery(connection,"districts_states_hr" ) shape_wkb_to_module_geom!(GeometryBasics, district_table) - # drop missing values, since we shouldn't have any at this stage. - dropmissing!(state_table) - dropmissing!(hr_table) dropmissing!(district_table) - # clean up by closing the connection DBInterface.close!(connection) - return state_table, hr_table, district_table + #return state_table, hr_table, district_table, my_table + return district_table end