{"id":28476009,"url":"https://github.com/pedrohdosanjos/economic-data-analysis","last_synced_at":"2026-04-24T23:34:23.522Z","repository":{"id":297720007,"uuid":"997526844","full_name":"pedrohdosanjos/economic-data-analysis","owner":"pedrohdosanjos","description":"This project aims to analyze the export data from various states in the United States to Brazil over time. The data is sourced from the FRED (Federal Reserve Economic Data) API and processed to identify the top 5 exporting states for each year, as well as the states with the highest total export value across all years.","archived":false,"fork":false,"pushed_at":"2025-06-07T02:31:04.000Z","size":1050,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T23:36:15.632Z","etag":null,"topics":["api","data-analysis","data-visualization","jupyter-notebook","python"],"latest_commit_sha":null,"homepage":"","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/pedrohdosanjos.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,"zenodo":null}},"created_at":"2025-06-06T17:21:33.000Z","updated_at":"2025-06-07T02:31:07.000Z","dependencies_parsed_at":"2025-06-07T03:25:32.743Z","dependency_job_id":"db8b0e26-84f5-4f4c-81ac-c8bf05348a74","html_url":"https://github.com/pedrohdosanjos/economic-data-analysis","commit_stats":null,"previous_names":["pedrohdosanjos/economic-data-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedrohdosanjos/economic-data-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrohdosanjos%2Feconomic-data-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrohdosanjos%2Feconomic-data-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrohdosanjos%2Feconomic-data-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrohdosanjos%2Feconomic-data-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrohdosanjos","download_url":"https://codeload.github.com/pedrohdosanjos/economic-data-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrohdosanjos%2Feconomic-data-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","data-analysis","data-visualization","jupyter-notebook","python"],"created_at":"2025-06-07T15:05:50.066Z","updated_at":"2026-04-24T23:34:23.517Z","avatar_url":"https://github.com/pedrohdosanjos.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brazil Exports Analysis\n\nThis project retrieves export data to Brazil from FRED (Federal Reserve Economic Data) and analyzes the top 5 american states that export to Brazil each year.\n\n![Top 5 Exporters by Year](assets/linechart.png)\n\n![Top 5 Exporters All Time](assets/top5.png)\n\n![Export Trends](assets/top5at.png)\n\n## Steps:\n\n1. **Data Retrieval**:\n\n   - The data is retrieved using the FRED API, with the specific search term \"Value of Exports to Brazil from\".\n   - The data includes state-wise exports to Brazil for multiple years.\n\n2. **Data Preprocessing**:\n\n   - The results are cleaned by removing rows where all values are NaN.\n   - The index is updated to represent the year.\n\n3. **Visualization**:\n\n   - **Top 5 Exporters by Year**: For each year, the top 5 states are plotted in subplots as a bar chart. Each bar represents a state, and the height of the bar is the export value.\n   - **Top 5 Exporters of All Time**: A bar plot is generated showing the states with the highest total export value to Brazil across all years.\n\n## Requirements:\n\n- pandas\n- plotly\n- matplotlib\n- fredapi\n\nYou can install these dependencies with the following:\n\n```\npip install -r requirements.txt\n```\n\n## Running the Code:\n\n1. Fetch the data from FRED using the API key.\n2. Preprocess and clean the data.\n3. Visualize the results using **matplotlib** and **plotly** for line plots and bar plots.\n\n## Notes:\n\n- Ensure you replace the `api_key` variable with your own key from FRED API.\n- The code uses **matplotlib** to generate subplots and bar charts, and **plotly** to create line charts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrohdosanjos%2Feconomic-data-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrohdosanjos%2Feconomic-data-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrohdosanjos%2Feconomic-data-analysis/lists"}