stata-marimekko

A Stata package for Marimekko graphs

https://github.com/asjadnaqvi/stata-marimekko

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

ado graph marimekko mosaic package stata
Last synced: 6 months ago · JSON representation ·

Repository

A Stata package for Marimekko graphs

Basic Info
  • Host: GitHub
  • Owner: asjadnaqvi
  • License: mit
  • Language: Stata
  • Default Branch: main
  • Homepage:
  • Size: 1.36 MB
Statistics
  • Stars: 7
  • Watchers: 3
  • Forks: 0
  • Open Issues: 1
  • Releases: 3
Topics
ado graph marimekko mosaic package stata
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Funding License Citation

README.md

StataMin issues license Stars version release

Installation | Syntax | Examples | Feedback | Change log


marimekko_banner

marimekko v1.2

(11 Nov 2024)

This package provides the ability to draw Marimekko graphs in Stata.

Installation

The package can be installed via SSC or GitHub (the beta is on GitHub only). 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.

Install the package as follows:

SSC (v1.2):

ssc install marimekko, replace

or directly from GitHub (v1.2):

net install marimekko, from("https://raw.githubusercontent.com/asjadnaqvi/stata-marimekko/main/installation/") replace

If 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:

ssc install schemepack, replace set scheme white_tableau

I also prefer narrow fonts in figures with long labels. You can change this as follows:

graph set window fontface "Arial Narrow"

Syntax

The syntax for the latest version is as follows:

```stata marikmekko y x [if] [in] [weight], by(varname) [ over(varname) sort(varname) reverse palette(str) xshare xpercentage yshare ypercentage wrap(num) stat(mean|sum) lcolor(str) lwidth(str) labsize(str) labangle(str) labgap(str) labposition(str) labcolor(num) showtotal labcondition(num) labprop labscale(num) legposition(num) legrows(num) legsize(num) offset(num) * ]

```

See the help file help marimekko for details.

Examples

sysuse voter.dta, clear

stata marimekko pfrac pop, by(inc)

stata marimekko pfrac pop, by(inc) sort(inc)

marimekko pfrac pop, by(inc) over(candidat)

marimekko pfrac pop, by(inc) over(candidat) showtotal

marimekko pfrac pop, by(inc) over(candidat) showtotal labprop labsize(3)

marimekko pfrac pop, by(inc) over(candidat) showtotal yshare

marimekko pfrac pop, by(inc) over(candidat) showtotal ypercent

marimekko pfrac pop, by(inc) over(candidat) showtotal ypercent xpercent

marimekko pfrac pop, by(inc) over(candidat) sort(inc) showtotal ypercent xpercent

marimekko pfrac pop, by(inc) over(candidat) sort(inc) showtotal ypercent xpercent palette(sb colorblind6) lw(0.2) legsize(4)

Feedback

Please open an issue to report errors, feature enhancements, and/or other requests.

Change log

v1.2 (11 Nov 2024)

Complete package redesign with the following major changes:

  • Minimum syntax is now marimekko y x, by(), where by() defines the x-axis categories.
  • Y-axis categories are defined by over() variable.
  • Both axes can be scaled using xshare, xpercent and yshare, ypercent options. These are for (0,1) or (0,100) scaling.
  • All possible options added to control the labels. This also includes labprop and its controls, and labcond() to conditionally drop labels.
  • The option showtotal shows x-axis by() category totals with the labels.
  • Option wrap() allows label wrapping.
  • Weights are allowed.
  • Redesign of the underlying functions to generate boxes makes the command much faster than the previous versions.
  • legend() options are restricted to a limited set of predefined options which should be sufficient for most cases. These can be overwritten but avoid this.
  • Previous version had options to also show negative boxes. Currently these haven't been fully implemented and tested for this version.

v1.1 (02 Dec 2023) - Additional options, such as yline(), xline() added. - Code cleanup.

v1.0 (28 Jun 2022) - Beta version.

Owner

  • Name: Asjad Naqvi
  • Login: asjadnaqvi
  • Kind: user
  • Location: Vienna
  • Company: WIFO

Vienna, Austria

Citation (CITATION.cff)

cff-version: 1.2.0
authors:
- family-names: "Naqvi"
  given-names: "Asjad"
title: "Stata package ``marimekko''"
version: 1.2
date-released: 2024-11-11
url: "https://github.com/asjadnaqvi/stata-marimekko"

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 4
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 4
  • Create event: 1

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels