{"id":25077871,"url":"https://github.com/egberts/immigration","last_synced_at":"2025-07-31T01:11:11.490Z","repository":{"id":254499671,"uuid":"846723925","full_name":"egberts/immigration","owner":"egberts","description":"Plotly Sankey on US Immigration","archived":false,"fork":false,"pushed_at":"2024-08-23T20:32:01.000Z","size":2999,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T02:39:58.025Z","etag":null,"topics":["plotly","python","sankey","sankey-chart","sankey-diagram","sankey-diagram-generator","sankey-graph","sankey-plots"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/egberts.png","metadata":{"files":{"readme":"README.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T20:22:50.000Z","updated_at":"2024-08-23T20:50:11.000Z","dependencies_parsed_at":"2024-08-23T21:56:50.354Z","dependency_job_id":"40124544-9a43-42d5-b294-db2cf781745f","html_url":"https://github.com/egberts/immigration","commit_stats":null,"previous_names":["egberts/immigration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fimmigration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fimmigration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fimmigration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fimmigration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egberts","download_url":"https://codeload.github.com/egberts/immigration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246563376,"owners_count":20797446,"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":["plotly","python","sankey","sankey-chart","sankey-diagram","sankey-diagram-generator","sankey-graph","sankey-plots"],"created_at":"2025-02-07T02:40:01.247Z","updated_at":"2025-04-01T00:48:53.994Z","avatar_url":"https://github.com/egberts.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"US Border Encounters \u0026 Enforcements 2023\n\nCreates a Sankey graph of the flow of immigration from the world to \nthe 'gotaways' and 'naturalized citizen' states, using Python.\n\n![](docs/pandas-plotly-immigration.png)\n\nTo create a graph, execute in a CLI shell:\n\n```shell\npython plotly-sankey-immigration-working.py\n```\n\nHow I Did This\n----\nThe idea is vastly orthogonal to the use of most Sankey libraries which is by using column-based dataframes (except for Riley Xu's [Sankeyflow](https://github.com/riley-x/SankeyFlow) is row-based dataframe).\n\nBy using row-based dataframe (datapoint) approach, it becomes easier to map the node blocks on the map (despite `DS3Sankey.js` chaotic slapping of nodes all over the place after 13th node added).\n\nOnce `X:Y` coordinate of using 0.000 to 1.000 : 0.000 to 1.000 range is supported ONLY within Nodes, it becomes easier to construct LARGE Sankey charts.\n\n\nPrior Work\n-----\n\nBased on Steve Rattner's work and aired on Morning Joe TV show.\n\n![Image](docs/Rattner_11_16_CHART1.png)\n\n\nCitations:\n----\n* https://stevenrattner.com/2023/11/steve-rattners-morning-joe-charts-the-border-at-a-breaking-point/\n* U.S. Custom and Border Protection, Office of Field Operations\n* U.S. Custom \u0026 Border Patrol\n* * https://www.cbp.gov/newsroom/stats/nationwide-encounters\n* * https://www.cbp.gov/newsroom/stats/custody-and-transfer-statistics\n* * https://www.cbp.gov/newsroom/stats/cbp-enforcement-statistics\n* * https://www.cbp.gov/newsroom/stats/cbp-enforcement-statistics/criminal-noncitizen-statistics\n* TRAC\n* * https://trac.syr.edu/immigration/\n* USCIS\n* * https://www.uscis.gov/citizenship-resource-center/naturalization-statistics\n* * https://www.uscis.gov/tools/reports-and-studies/immigration-and-citizenship-data/eligible-to-naturalize-dashboard\n* * https://www.uscis.gov/military/military-naturalization-statistics\n* DHS, Office of Homeland Security Statistics\n* * https://ohss.dhs.gov/topics/immigration/refugees-and-asylees/asylum-processing-rule-cohort-reports\n* * https://ohss.dhs.gov/topics/immigration/legal-immigration-and-adjustment-status-report\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegberts%2Fimmigration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegberts%2Fimmigration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegberts%2Fimmigration/lists"}