Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
egofaktor refinements.
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
common: | ||
database: postgresql://localhost/parlament_etl | ||
prefix: data-exports/ | ||
format: csv | ||
|
||
exports: | ||
|
||
- query: > | ||
SELECT partei, (sum(egos)::float/sum(words)::float)*100 AS faktor, SUM(words) FROM egos | ||
WHERE partei IS NOT NULL GROUP BY partei ORDER BY (sum(egos)::float/sum(words)::float) DESC; | ||
filename: ego-parteien.csv | ||
- query: > | ||
SELECT fingerprint, (egos::float/words::float)*100 AS faktor, words FROM egos | ||
ORDER BY (egos::float/words::float) DESC; | ||
filename: ego-personen.csv | ||
- query: > | ||
SELECT partei, (sum(egos)::float/sum(words)::float)*100 AS faktor, | ||
(1/(sum(egos)::float/sum(words)::float))::bigint AS wordnum, SUM(words) FROM egos | ||
WHERE partei IS NOT NULL GROUP BY partei ORDER BY (sum(egos)::float/sum(words)::float) DESC; | ||
format: 'json' | ||
filename: parteien.json | ||
- query: > | ||
SELECT e.fingerprint, p.partei, p.geschlecht, p.vorname, p.nachname, | ||
(e.egos::float/e.words::float)*100 AS faktor, | ||
(1/(e.egos::float/e.words::float))::bigint AS wordnum, e.words FROM egos e | ||
LEFT JOIN person p ON e.fingerprint = p.fingerprint | ||
ORDER BY (e.egos::float/e.words::float) DESC; | ||
format: 'json' | ||
filename: personen.json | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters