Changes

Jump to navigation Jump to search
533 bytes added ,  16:28, 4 August 2017
--31523
\COPY colevelsimple TO 'colevelsimple.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV
 
I also added flags on the geodata table to filter points outside the US. You can use the geoallcoords1 table instead of geoallcoords and set excludeflag = 1 to filter out 292 erroneous points when you create your colevel tables.
CREATE TABLE geoallcoords1 AS
SELECT *, CASE
WHEN longitude < -125 OR longitude > -66 OR latitude < 24 OR latitude > 50 OR latitude = NULL OR longitude = NULL THEN 1::int ELSE
0::int END AS excludeflag
FROM geoallcoords;
--44999
 
SELECT COUNT(*) FROM geoallcoords1 WHERE excludeflag = 1;
--292
==Cleaning firmbase==

Navigation menu