{"id":15651523,"url":"https://github.com/jexp/fincen","last_synced_at":"2025-04-30T19:48:00.980Z","repository":{"id":66743925,"uuid":"297147203","full_name":"jexp/fincen","owner":"jexp","description":"ICIJ #Fincen Files in Neo4j","archived":false,"fork":false,"pushed_at":"2020-11-19T15:49:00.000Z","size":6467,"stargazers_count":36,"open_issues_count":1,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T19:23:07.795Z","etag":null,"topics":["data-journalism","database","fincen","fincenfiles","graph-database","icij","investigative-journalism","neo4j","panama-papers","visualization"],"latest_commit_sha":null,"homepage":"https://www.icij.org/investigations/fincen-files/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jexp.png","metadata":{"files":{"readme":"readme.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-20T19:20:36.000Z","updated_at":"2025-01-27T20:56:21.000Z","dependencies_parsed_at":"2023-06-29T13:13:49.952Z","dependency_job_id":null,"html_url":"https://github.com/jexp/fincen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Ffincen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Ffincen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Ffincen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Ffincen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jexp","download_url":"https://codeload.github.com/jexp/fincen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774006,"owners_count":21641719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-journalism","database","fincen","fincenfiles","graph-database","icij","investigative-journalism","neo4j","panama-papers","visualization"],"created_at":"2024-10-03T12:38:52.914Z","updated_at":"2025-04-30T19:48:00.961Z","avatar_url":"https://github.com/jexp.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"= ICIJ FinCen Dataset in Neo4j\n\n== ICIJ Investigation\n\nhttps://www.icij.org/investigations/fincen-files/\n\nimage::https://media.icij.org/uploads/2020/09/FinCEN_Files_ICIJ_1920px.jpg[width=600]\n\n* https://www.icij.org/investigations/fincen-files/unchecked-by-global-banks-dirty-cash-destroys-dreams-and-lives/[Unchecked by global banks, dirty cash destroys dreams and lives]\n* https://www.icij.org/investigations/fincen-files/global-banks-defy-u-s-crackdowns-by-serving-oligarchs-criminals-and-terrorists/[Global banks defy U.S. crackdowns by serving oligarchs, criminals and terrorists]\n* https://www.icij.org/investigations/fincen-files/mining-sars-data/[How the ICIJ did the investiation]\n\n[quote, ICIJ again used Neo4j for their investigation]\n____\nFinally, ICIJ used graph databases (Neo4J and Linkurious) to visualize and explore the FinCEN Files’ 400 spreadsheets containing data on 100,000 transactions. These were among the many tools to help piece together a nuanced picture of a broken system.\n____\n\n=== Data\n\nhttps://media.icij.org/uploads/2020/09/download_data_fincen_files.zip[*CSV Files are available for download now*], via: https://www.icij.org/investigations/fincen-files/download-fincen-files-transaction-data/\n\nThe download contains two CSV files with the same data as our JSON so I'll adjust the instructions below.\n\nThe JSON files used here were scraped from their site (https://www.icij.org/investigations/fincen-files/explore-the-fincen-files-data/[Explore The FinCen Data Files])\n\n== Feedback and Contributions\n\nAll data is from the ICIJ Web-Visualization (JS files) or download section.\n\nIf you have fixes, or new ideas for queries, please send a pull request.\n\nIf something doesn't work, please create an issue.\n\n\n== Pre-Populated Demo Databases\n\nDemo Server with Neo4j Browser\n\n* link:https://demo.neo4jlabs.com:7473/browser?username=fincen\u0026authToken=fincen\u0026database=fincen[demo.neo4jlabs.com] (user:\"fincen\", password:\"fincen\", database:\"fincen\")\n\nSandbox\n\n* Sandbox: https://10-0-1-92-35670.neo4jsandbox.com/browser/ (user:\"fincen\", password:\"fincen\")\n* Bloom: https://10-0-1-92-35670.neo4jsandbox.com/browser/bloom/\n\n=== Dump File\n\n* link:fincen.dump[fincen.dump]\n* To import into Neo4j Aura, use the \"Upload Data\" feature and drop the dump file\n* For Neo4j Desktop, add the file to your project and use the \"Imort Dump\" from the 3-dots menu to import\n* For manual import use `neo4j-admin load --from fincen.dump` in a stopped dmbs \n* For a running 4.x Enterprise dbms, you need to add `--database fincen` and then use `:use system` and `create database fincen` to activate it.\n\n==  Import into Neo4j\n\n* The scraped JSON files can be imported using link:fincen.cypher[`fincen.cypher`]\n* The newly available CSV files can be imported using link:fincen_csv.cypher[`fincen_csv.cypher`]\n\n=== Neo4j Sandbox (3 days)\n\n. Start Blank Neo4j sandbox https://sandbox.neo4j.com/?usecase=blank-sandbox\n. Open Neo4j Browser with the button\n. Copy or drag\u0026drop link:fincen_csv.cypher[`fincen_csv.cypher`] into the editor window on top and run with the triangular run button\n. Explore with the sidebar, e.g. clicking on `Filing`\n. To explore interactively and visually, use the blue \"Open with Bloom\" button and use \"neo4j\" as a username, and the password (under the key icon) as password to log in\n\n\n=== Neo4j Desktop (local installation)\n\n. Download Neo4j Desktop https://neo4j.com/download\n. Install locally\n. Create a new project and a new database, call it eg. FinCen, set a password and remember it\n. Click on the three dots and then \"Manage\", click on \"Plugins\" and Install \"APOC\"\n. Start the database with the Start Button (Triangle)\n. Open Neo4j Browser (e.g. with the blue \"Open\" button) or by pressing cmd+k or ctrl+k and entering \"Browser\"\n. Copy or drag\u0026drop link:fincen_csv.cypher[`fincen_csv.cypher`] into the editor window on top and run with the triangular run button\n. Explore with the sidebar, e.g. clicking on `Filing`\n. To explore interactively and visually, select \"Open with Bloom\" from the blue \"Open\" button drop-down\n\n=== Neo4j Aura Cloud Database\n\n. Log into https://neo4j.com/cloud/aura (or directly https://console.neo4j.io)\n. Put in your credit card information\n. Create a new 1GB database\n. Save the password\n. Open Neo4j Browser with the button\n. Copy or drag\u0026drop link:fincen_csv.cypher[`fincen_csv.cypher`] into the editor window on top and run with the triangular run button\n. Explore with the sidebar, e.g. clicking on `Filing`\n. To explore interactively and visually, select \"Open with Bloom\" from the blue \"Open\" button drop-down\n\n== Exploration\n\n=== Neo4j Bloom\n\nimage::bloom-fincen.png[width=800]\n\nIn Neo4j Bloom, you can e.g. search for `Filing Entity` in the search bar.\n\nYou can configure the sidebar with icons for Countries, Entities and filings\n\nYou can set a rule based styling e.g. for Filings, I did a size based on `amount` with the min `100000` to `0.5x` and the max `100000000` to `2x`\n\nimage::bloom-sidebar.png[width=200]\n\nTo not have to do that manually, you can also import the link:fincen.neo4j-bloom-perspective[bloom perspective file] in this repository.\n\n=== Example Queries\n\nTo run in Neo4j Browser just copy them into the editor on top and run with the triangular run button.\n\n.Biggest Filings\n[source,cypher]\n----\nMATCH (f:Filing)\nRETURN f ORDER BY f.amount DESC LIMIT 10;\n----\n\n.Biggest Filing with participants\n[source,cypher]\n----\nMATCH (f:Filing)\nWITH f ORDER BY f.amount DESC LIMIT 10\nMATCH (f)--(e:Entity)\nRETURN *\n----\n\nimage::fincen-browser.png[width=600]\n\n.Entities with highest transaction volume\n[source,cypher]\n----\nMATCH (e:Entity)--(f:Filing)\nWITH e, round(sum(f.amount)) as total\nWITH e, total ORDER BY total DESC LIMIT 10\nOPTIONAL MATCH (e)-[:COUNTRY]-(c:Country)\nRETURN e.name, c.name, total\n----\n\n.Money flows between banks\n[source,cypher]\n----\nMATCH (source:Entity)\u003c-[:ORIGINATOR]-(f:Filing)-[:BENEFITS]-\u003e(target:Entity)\nWITH source, target, round(sum(f.amount)) as total ORDER BY total DESC LIMIT 10\nRETURN source.name, target.name, total\n----\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Ffincen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjexp%2Ffincen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Ffincen/lists"}