Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included 3 photographs. 1st photograph of the points outlining the shape. the second photo is my desired result which I have drawn out by hand. The third photo is an attempt that doesnt meet my desired result..
I am using the analysis tool provided by Carto, running a concave hull and have tried various target percent values and without the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below
SELECT row_number() over() as cartodb_id, territoryid as category, ST_ConcaveHull( ST_Collect(the_geom), 0.8, false ) AS the_geom, count(1) as count_vals FROM ( SELECT * FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter WHERE territoryid IN (3) ) _analysis_source GROUP BY territoryid