{"id":26334438,"url":"https://github.com/asjadnaqvi/stata-bumparea","last_synced_at":"2026-02-25T16:03:50.858Z","repository":{"id":152726458,"uuid":"625702424","full_name":"asjadnaqvi/stata-bumparea","owner":"asjadnaqvi","description":"A Stata package for ribbon plots.","archived":false,"fork":false,"pushed_at":"2025-01-08T09:30:53.000Z","size":9334,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-04T02:15:33.120Z","etag":null,"topics":["area","bump","package","ribbon","stata"],"latest_commit_sha":null,"homepage":"","language":"Stata","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/asjadnaqvi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"asjadnaqvi"}},"created_at":"2023-04-09T23:04:53.000Z","updated_at":"2025-01-24T10:22:23.000Z","dependencies_parsed_at":"2024-06-12T02:08:17.217Z","dependency_job_id":"2297aab2-c40c-408e-9dd4-1ab0b29b184e","html_url":"https://github.com/asjadnaqvi/stata-bumparea","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/asjadnaqvi/stata-bumparea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bumparea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bumparea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bumparea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bumparea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asjadnaqvi","download_url":"https://codeload.github.com/asjadnaqvi/stata-bumparea/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bumparea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29829411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T15:41:19.027Z","status":"ssl_error","status_checked_at":"2026-02-25T15:40:47.150Z","response_time":61,"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":["area","bump","package","ribbon","stata"],"created_at":"2025-03-16T00:18:58.142Z","updated_at":"2026-02-25T16:03:50.832Z","avatar_url":"https://github.com/asjadnaqvi.png","language":"Stata","funding_links":["https://github.com/sponsors/asjadnaqvi"],"categories":[],"sub_categories":[],"readme":"\n![StataMin](https://img.shields.io/badge/stata-2015-blue) ![issues](https://img.shields.io/github/issues/asjadnaqvi/stata-bumparea) ![license](https://img.shields.io/github/license/asjadnaqvi/stata-bumparea) ![Stars](https://img.shields.io/github/stars/asjadnaqvi/stata-bumparea) ![version](https://img.shields.io/github/v/release/asjadnaqvi/stata-bumparea) ![release](https://img.shields.io/github/release-date/asjadnaqvi/stata-bumparea)\n\n[Installation](#Installation) | [Syntax](#Syntax) | [Citation guidelines](#Citation-guidelines) | [Examples](#Examples) | [Feedback](#Feedback) | [Change log](#Change-log)\n\n---\n\n\n![bumparea-1](https://github.com/asjadnaqvi/stata-bumparea/assets/38498046/08bed45f-5c89-4047-bad8-cd6892690b98)\n\n# bumparea v1.4\n(21 Oct 2024)\n\n## Installation\n\nThe package can be installed via SSC or GitHub. The GitHub version, *might* be more recent due to bug fixes, feature updates etc, and *may* contain syntax improvements and changes in *default* values. See version numbers below. Eventually the GitHub version is published on SSC.\n\nSSC (**v1.4**):\n\n```\nssc install bumparea, replace\n```\n\nGitHub (**v1.4**):\n\n```\nnet install bumparea, from(\"https://raw.githubusercontent.com/asjadnaqvi/stata-bumparea/main/installation/\") replace\n```\n\nThe following packages are required for this command:\n\n```\nssc install palettes, replace\nssc install colrspace, replace\nssc install graphfunctions, replace\n```\n\nEven if you have these packages installed, please check for updates: `ado update, update`.\n\nIf you want to make a clean figure, then it is advisable to load a clean scheme. These are several available and I personally use the following:\n\n```\nssc install schemepack, replace\nset scheme white_tableau  \n```\n\n\nI also prefer narrow fonts in figures with long labels. You can change this as follows:\n\n```\ngraph set window fontface \"Arial Narrow\"\n```\n\n\n## Syntax\n\nThe syntax for the latest version is as follows:\n\n```stata\nbumparea y x [if] [in] [weight], by(varname) \n        [ top(num) dropother smooth(num) palette(str) labcond(str) offset(num) alpha(num) \n          lcolor(str) lwidth(str) percent format(fmt) recenter(mid|top|bot) colorby(name) colorvar(var) colother(str) \n          wrap(num) labsize(str) labcolor(str) labangle(str) labgap(str) labprop  labscale(num) * ]\n```\n\nSee the help file `help bumparea` for details.\n\nThe most basic use is as follows:\n\n```stata\nbumparea y x, by(group)\n```\n\nwhere `y` is a numerical variable we want to plot and `x` is the time dimension. Both need to be numeric. The `by()` is the category variable.\n\n\n## Citation guidelines\nSoftware packages take countless hours of programming, testing, and bug fixing. If you use this package, then a citation would be highly appreciated. Suggested citations:\n\n*in BibTeX*\n\n```\n@software{bumparea,\n   author = {Naqvi, Asjad},\n   title = {Stata package ``bumparea''},\n   url = {https://github.com/asjadnaqvi/stata-bumparea},\n   version = {1.4},\n   date = {2024-10-21}\n}\n```\n\n*or simple text*\n\n```\nNaqvi, A. (2024). Stata package \"bumparea\" version 1.4. Release date 21 October 2024. https://github.com/asjadnaqvi/stata-bumparea.\n```\n\n\n*or see [SSC citation](https://ideas.repec.org/c/boc/bocode/s459196.html) (updated once a new version is submitted)*\n\n\n\n## Examples\n\nLoad the Stata dataset\n\n```stata\nuse \"https://github.com/asjadnaqvi/stata-bumparea/blob/main/data/owid_emissions_reduced.dta?raw=true\", clear\ndrop if iso_code==\"\"\nkeep if year \u003e= 1990\n```\n\nLet's test the `bumparea` command:\n\n\n```\nbumparea total_ghg year, by(country) \n```\n\n\u003cimg src=\"/figures/bumparea1.png\" width=\"100%\"\u003e\n\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\txsize(2) ysize(1) \n```\n\n\u003cimg src=\"/figures/bumparea2.png\" width=\"100%\"\u003e\n\n\n### percent\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tpercent labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea3.png\" width=\"100%\"\u003e\n\n### dropother\n\n```\nbumparea total_ghg year, by(country) top(10) ///\n\tdropother labs(2) xsize(2) ysize(1) \n```\n\n\u003cimg src=\"/figures/bumparea4.png\" width=\"100%\"\u003e\n\n```\nbumparea total_ghg year, by(country) top(10) ///\n\tdropother percent labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea5.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) ///\n\ttop(12) dropother labs(2) xsize(2) ysize(1) \n```\n\n\u003cimg src=\"/figures/bumparea6.png\" width=\"100%\"\u003e\n\n### smooth\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tsmooth(1) dropother labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea7.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tsmooth(8) dropother labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea8.png\" width=\"100%\"\u003e\n\n### recenter\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\trecenter(top) dropother labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea9.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\trecenter(bot) dropother labs(2) xsize(2) ysize(1) \t\t\n```\n\n\u003cimg src=\"/figures/bumparea10.png\" width=\"100%\"\u003e\n\n\n\n### alpha and lines\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tlc(black) lw(0.03) dropother labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea11.png\" width=\"100%\"\u003e\n\n### colors\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tlc(black) lw(0.03) palette(reds, reverse) dropother labs(2) xsize(2) ysize(1) \t\n```\n\n\u003cimg src=\"/figures/bumparea12.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tlc(black) lw(0.03) palette(viridis) dropother labs(2) xsize(2) ysize(1) \n```\n\n\u003cimg src=\"/figures/bumparea13.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tlc(black) lw(0.03) palette(CET C6) alpha(100) dropother labs(2) xsize(2) ysize(1) \t\t\t\n```\n\n\u003cimg src=\"/figures/bumparea14.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\tlc(black) lw(0.03) palette(CET C6) alpha(50) dropother labs(2) xsize(2) ysize(1) \t\t\n```\n\n\u003cimg src=\"/figures/bumparea15.png\" width=\"100%\"\u003e\n\n### all together\n\n```stata\nbumparea total_ghg year, by(country) smooth(6) palette(CET L20) labs(2) ///\n\ttop(10) dropother recenter(mid) alpha(90) lw(0.15) xlabel(1990(1)2019, angle(45)) ///\n\ttitle(\"Top 10 countries by annual GHG emissions\", size(6)) ///\n\t\t\tnote(\"Source: OWID.\") ///\n\t\t\txsize(2) ysize(1) \n```\n\n\u003cimg src=\"/figures/bumparea16.png\" width=\"100%\"\u003e\n\n\n### custom x axis\n\n```stata\nuse \"https://github.com/asjadnaqvi/stata-bumparea/blob/main/data/owid_emissions_reduced.dta?raw=true\", clear\ndrop if iso_code==\"\"\nkeep if inlist(year, 1990, 1993, 1997, 2000, 2005, 2007, 2010, 2014, 2017, 2019)\n\nbumparea total_ghg year, by(country) smooth(8) palette(CET L08) labs(2) ///\n\ttop(15) dropother recenter(mid) alpha(80) lw(0.1) xlabel(1990(1)2019, angle(45)) ///\n\ttitle(\"Top 10 countries by annual GHG emissions\", size(6)) ///\n\t\t\tnote(\"Source: OWID. bumparea package. @AsjadNaqvi\") ///\n\t\t\txsize(2) ysize(1)\n```\n\n\u003cimg src=\"/figures/bumparea17.png\" width=\"100%\"\u003e\n\n\n### v1.2 options \n\n```stata\nbumparea total_ghg year, by(country) top(10) ///\n\t\t\txsize(2) ysize(1) \t\t\n```\n\n\u003cimg src=\"/figures/bumparea18.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) colother(gs6) ///\n\t\t\txsize(2) ysize(1) \t\t\n```\n\n\u003cimg src=\"/figures/bumparea19.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year, by(country) top(10) colorby(name) ///\n\t\t\txsize(2) ysize(1\t\t\n```\n\n\u003cimg src=\"/figures/bumparea20.png\" width=\"100%\"\u003e\n\n```stata\ncap drop cats\ngen cats = .\nreplace cats = 1 if inlist(country, \"Indonesia\", \"Japan\")\nreplace cats = 2 if inlist(country, \"United States\", \"Canada\")\nreplace cats = 3 if inlist(country, \"Iran\", \"Saudi Arabia\")\nreplace cats = 4 if inlist(country, \"China\")\n\t\t\t\nbumparea total_ghg year, by(country) top(10) colorvar(cats) ///\n\t\t\txsize(2) ysize(1) colo(white)\t\t\t\n```\n\n\u003cimg src=\"/figures/bumparea21.png\" width=\"100%\"\u003e\n\n\n\n### v1.4 options \n\n\n```stata\nbumparea total_ghg year, by(country) top(10) dropother xsize(2) ysize(1) format(%8.1f) offset(10) labprop labc(red) laba(45) ///\n\t\txlabel(1990(1)2019, labsize(2) angle(45) )\t\n```\n\n\u003cimg src=\"/figures/bumparea22.png\" width=\"100%\"\u003e\n\n```stata\nbumparea total_ghg year [aw = gdp], by(country) top(10) dropother xsize(2) ysize(1) format(%10.0fc) offset(10) labprop  ///\n\t\txlabel(1990(1)2018, labsize(2) angle(90) )\n```\n\n\u003cimg src=\"/figures/bumparea23.png\" width=\"100%\"\u003e\n\n\n```stata\nlevelsof year if !missing(gdp)\n\n\nbumparea total_ghg year [aw = gdp], by(country) wrap(20) dropother lc(black) labprop labc(white)  ///\t\nsmooth(8) top(15) palette(CET L20, reverse)  ///\n\tlw(0.1) xlabel(\"`r(levels)'\", angle(90) labsize(2)) offset(10) labsize(2.6)  ///\n\ttitle(\"{fontface Merriweather Bold:Top 30 countries by annual GHG emissions (GDP weighted)}\",  size(6)) ///\n\t\t\tnote(\"Source: Our World in Data. bumpline package.\", size(1.6)) ///\n\t\t\txsize(3) ysize(1) scheme(neon)\n```\n\n\u003cimg src=\"/figures/bumparea24.png\" width=\"100%\"\u003e\n\n## Feedback\n\nPlease open an [issue](https://github.com/asjadnaqvi/stata-bumparea/issues) to report errors, feature enhancements, and/or other requests.\n\n\n## Change log\n\n**v1.4 (21 Oct 2024)**\n- Weights are supported.\n- `wrap()` ported to `graphfunctions`.\n- All x-axis options removed. Use standard `xlabel()` syntax.\n- Added `labgap()`, `labcolor()`, `labangle()` for more flexiblity with ribbon labels.\n- Added `labprop` for proportional labels. Can be rescaled using `labscale()`.\n- Several bug fixes.\n\n**v1.31 (11 Jun 2024)**\n- Added `wrap()` to wrap labels.\n- Several code updates.\n\n**v1.3 (26 May 2024)**\n- The command now sums and fills missing categories.\n\n**v1.21 (15 Jan 2024)**\n- Minor fixes.\n- Updates to defaults.\n\n**v1.2 (25 Jul 2023)**\n- Several new options added: `colorby(name)` to alpha sort the colors, `colorby(var)` to color using a custom `var`, `colother()` to define the color of the \"Other\" category.\n- A bug with labels fixed (found by Marc Kaulisch)\n- Better checks for `by()` variables.\n- `saving()` option added. \n- Several small bug fixes and code optimizations.\n\n**v1.11 (06 Jun 2023)**\n- Minor bug fixes, checks, enhancements. \n\n**v1.1 (28 May 2023)**\n- Fixed `if` and `in` conditions that were not passing correctly.\n- Added checks for duplicates.\n- Minor code cleanups, updates to defaults, and help file.\n\n**v1.0 (10 Apr 2023)**\n- Public release.\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasjadnaqvi%2Fstata-bumparea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasjadnaqvi%2Fstata-bumparea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasjadnaqvi%2Fstata-bumparea/lists"}