<commit_before>ALTER TABLE "311rodent" ADD COLUMN geom geometry(POINT,4326);
UPDATE "311rodent" SET geom = ST_SetSRID(ST_MakePoint(lng,lat),4326);
CREATE INDEX "idx_rodent_geom" ON "311rodent" USING GIST(geom);
ALTER "311bytract" ADD rodent_count int;
update "311bytract" 
set rodent_count = b.cnt 
from "311bytract" as main join ( 
    select count(*) as cnt, t.tractce10 from "311rodent" as complaints 
    JOIN "tracts2010" as t 
    on ST_Contains(t.geom, complaints.geom) 
    group by t.tractce10) as b 
    on main.tractce10 = b.tractce10;<commit_msg>trying it without psycopg2<commit_after>ALTER TABLE "311rodent" ADD COLUMN geom geometry(POINT,4326);
UPDATE "311rodent" SET geom = ST_SetSRID(ST_MakePoint(lng,lat),4326);
CREATE INDEX "idx_rodent_geom" ON "311rodent" USING GIST(geom);
ALTER TABLE "311bytract" ADD rodent_count int;
update "311bytract" 
set rodent_count = b.cnt 
from "311bytract" as main join ( 
    select count(*) as cnt, t.tractce10 from "311rodent" as complaints 
    JOIN "tracts2010" as t 
    on ST_Contains(t.geom, complaints.geom) 
    group by t.tractce10) as b 
    on main.tractce10 = b.tractce10;
{'fraction_non_alphanumeric': 0.0986784140969163, 'fraction_numerical': 0.07312775330396476, 'mean_word_length': 4.825641025641025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3797921', 'n_tokens_mistral': 483, 'n_tokens_neox': 417, 'n_words': 119}