{"id":22377429,"url":"https://github.com/babak2/datafusion","last_synced_at":"2025-10-20T10:02:46.080Z","repository":{"id":265962297,"uuid":"896979005","full_name":"babak2/DataFusion","owner":"babak2","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-01T20:05:08.000Z","size":1254,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T23:43:30.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babak2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-01T19:09:42.000Z","updated_at":"2024-12-01T20:05:11.000Z","dependencies_parsed_at":"2024-12-01T20:34:24.724Z","dependency_job_id":null,"html_url":"https://github.com/babak2/DataFusion","commit_stats":null,"previous_names":["babak2/datafusion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FDataFusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FDataFusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FDataFusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FDataFusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babak2","download_url":"https://codeload.github.com/babak2/DataFusion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245708966,"owners_count":20659626,"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":[],"created_at":"2024-12-04T22:14:02.461Z","updated_at":"2025-10-20T10:02:45.950Z","avatar_url":"https://github.com/babak2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Fusion \u0026 Files Comparison\n\n## Overview\nThis Python script processes and combines population and energy price data into a unified file named valinfo.csv. \nThe population data in the resulting output file will pertain to MODEL IIASA-WiC POP and SCENARIO SSP3 v9 130115. \n\nThe program consists of two scripts:\n\n1. `data-fusion.py` - This main script processes population and energy price data, merges them, \u0026 saves the combined data to a CSV file.\n2. `compare-files.py` - This script compares the generated CSV file with an original CSV file to ensure the data is consistent.\n\n\n## Data files:\n\nData files (located in data directory): \n\n1. `IEA_Price_FIN_Clean_gr014_GLOBAL.dta` (input file: this is a STATA dataset)\n2. `population.csv` (input file)\n3. `valinfo_orig.csv` (this is the original valinfo file to be used for comparasion with the generated output)\n\n## Prerequisites\n\n- Python 3.x\n- pandas\n- numpy\n- warnings\n- os\n\n## Installation\n\n1. Clone the repository:\n\n    ```\n    git clone https://github.com/babak2/DataFusion.git\n    cd DataFusion\n    ```\n\n2. Install the required Python packages:\n\n    ```\n    pip install pandas numpy\n    ```\n\n## Usage\n\n### DataFusion Script\n\n1. **Description:**\n   - The `data-fusion.py` script loads population data and energy price data, processes and merges them, \u0026 saves the result to a CSV file in the output directory.\n\n2. **Running the Script:**\n\n  If Python 3 is the only Python version installed on your machine, you can use the `python` command. For example:\n\n   ```\n   python data-fusion.py\n   ```\n  \n  If both Python 2 and 3 are both installed, it's important to specify Python 3 using the `python3` command. For example:\n\n   ```\n   python3 data-fusion.py\n   ```\n\n\n4. **Output:**\n   - The combined data is saved as `valinfo.csv` in the `output` directory.\n\n### Compare Files \n\n1. **Description:**\n   - The `compare-files.py` script compares the generated CSV file (`output/valinfo.csv`) with the original CSV file (`data/valinfo_orig.csv`) to ensure they contain the same data.\n\n2. **Running the Script:**\n\n    ```\n    python3 compare-files.py\n    ```\n\n3. **Output:**\n   - The script prints (to the terminal) whether the files contain the same data or not. If there are differences, it prints the differences between the files.\n\n\n## Author \n\nBabak Mahdavi Aresetani\n\nbabak.m.ardestani@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabak2%2Fdatafusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabak2%2Fdatafusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabak2%2Fdatafusion/lists"}