refactor: rename data/openfootball → data/wikipedia, drop data/kaggle
Move world_cup.csv to app/data/ directly (the only remaining Kaggle file used by seed.ts for tournament metadata). Delete the rest of the Kaggle CSVs. Update path constants in scrape-wikipedia.ts and seed.ts accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-3
@@ -9,8 +9,7 @@ import { getIso } from '../lib/iso-codes'
|
||||
const DATABASE_URL = process.env.DATABASE_URL ?? 'postgres://wc:wc@localhost:5432/worldcup'
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const DATA_DIR = path.join(__dirname, '../app/data')
|
||||
const KAGGLE_DIR = path.join(DATA_DIR, 'kaggle')
|
||||
const WC_DIR = path.join(DATA_DIR, 'openfootball')
|
||||
const WC_DIR = path.join(DATA_DIR, 'wikipedia')
|
||||
|
||||
const YEARS = [
|
||||
1930,1934,1938,1950,1954,1958,1962,1966,1970,1974,
|
||||
@@ -247,7 +246,7 @@ async function run() {
|
||||
}
|
||||
|
||||
// 1. Tournaments from world_cup.csv (host, winner, runner_up)
|
||||
const wcRows = parseCsv(readFileSync(path.join(KAGGLE_DIR, 'world_cup.csv'), 'utf-8'))
|
||||
const wcRows = parseCsv(readFileSync(path.join(DATA_DIR, 'world_cup.csv'), 'utf-8'))
|
||||
for (const r of wcRows) {
|
||||
const year = parseInt(r['Year'])
|
||||
if (isNaN(year)) continue
|
||||
|
||||
Reference in New Issue
Block a user