Skip to content

Commit

Permalink
v1.1 minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
asjadnaqvi committed Dec 22, 2022
1 parent 384afae commit cd4b4e4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 32 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![StataMin](https://img.shields.io/badge/stata-2015-blue) ![issues](https://img.shields.io/github/issues/asjadnaqvi/stata-spider) ![license](https://img.shields.io/github/license/asjadnaqvi/stata-spider) ![Stars](https://img.shields.io/github/stars/asjadnaqvi/stata-spider) ![version](https://img.shields.io/github/v/release/asjadnaqvi/stata-spider) ![release](https://img.shields.io/github/release-date/asjadnaqvi/stata-spider)


# spider v1.0
# spider v1.1

This package provides the ability to draw spiders Stata. It is based on the [Spider plots](https://medium.com/the-stata-guide/stata-graphs-spider-plots-613808b51f73) guide on Medium

Expand All @@ -17,7 +17,7 @@ The SSC version (**v1.0**):
ssc install spider, replace
```

Or it can be installed from GitHub (**v1.0**):
Or it can be installed from GitHub (**v1.1**):

```
net install spider, from("https://raw.githubusercontent.com/asjadnaqvi/stata-spider/main/installation/") replace
Expand Down Expand Up @@ -51,7 +51,7 @@ graph set window fontface "Arial Narrow"

## Syntax

The syntax for v1.0 is as follows:
The syntax for v1.1 is as follows:

```
spider variables [if] [in], over(categories)
Expand All @@ -75,7 +75,6 @@ spider numeric variables, over(category variable)
where `numeric variables` are a set of variables where each corresponds to a spider plot, and `over()` defines the categories.



## Examples

Set up the data:
Expand Down Expand Up @@ -210,16 +209,14 @@ spider index*, over(policy) ra(0.1 0.7) cuts(4) raformat(%5.1f) ralabs(2) smooth
Please open an [issue](https://github.com/asjadnaqvi/stata-spider/issues) to report errors, feature enhancements, and/or other requests.


## Acknowledgements

José Damas helped identify several issues with the first release.


## Versions

**v1.0 (13 October 2022)**
- First release.
**v1.1 (24 Dec 2022)**
- Fixed some bugs.
- Better checks for merges.

**v1.0 (13 Oct 2022)**
- First release



Expand Down
22 changes: 12 additions & 10 deletions installation/spider.ado
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*! spider v1.0 13 Oct 2022. Beta release.
*! spider v1.1 22 Dec 2022. Minor fixes.
*! Asjad Naqvi

* v1.1 22 Dec 2022. Minor fixes.
* v1.0 13 Oct 2022. Beta release.

**********************************
* Step-by-step guide on Medium *
Expand All @@ -17,17 +19,17 @@ program spider, sortpreserve
version 15

syntax varlist(numeric) [if] [in], over(varname) ///
[ alpha(real 5) ROtate(real 30) DISPLACELab(real 15) DISPLACESpike(real 2) palette(string) ] ///
[ alpha(real 5) ROtate(real 30) DISPLACELab(real 15) DISPLACESpike(real 2) palette(string) ] ///
[ RAnge(numlist min=2 max=2) cuts(real 6) smooth(numlist max=1 >=0 <=1) raformat(string) RALABSize(string) ] ///
[ LWidth(string) MSYMbol(string) MSize(string) MLWIDth(string) ] /// // spider properties
[ CColor(string) CWidth(string) SColor(string) SWidth(string) SLABSize(string) ] /// // circle = C, spikes = S
[ legend(passthru) title(passthru) subtitle(passthru) note(passthru) scheme(passthru) name(passthru) ]

// TODO:
// ROTATELABel: allow label rotations
// POLYgon : replace circles with polygons
// legend(passthru) not working. If labels have spaces, it breaks down. Check and fix.

// ROTATELABel: allow label rotations
// POLYgon : replace circles with polygons
// legend(passthru) not working. If labels have spaces, it breaks down. Check and fix.
// add a by() option for long data

// check dependencies
cap findfile colorpalette.ado
Expand All @@ -39,7 +41,7 @@ version 15

cap findfile labmask.ado
if _rc != 0 {
qui ssc install labutil, replace // sneaky install ;)
qui ssc install labutil, replace
}

marksample touse, strok
Expand Down Expand Up @@ -297,7 +299,7 @@ preserve
// final graph //
//////////////////////

local axisr = 100 * (1.2)
local axisr = 100 * (1.3)
if "`ralabsize'" == "" local ralabsize = 1.8


Expand Down Expand Up @@ -452,9 +454,9 @@ restore

cap confirm var _id
if _rc!=0 gen _id = .
cap drop _m
cap drop _merge
merge m:1 _id using `mysplines'
cap drop _m
cap drop _merge


end
Expand Down
6 changes: 3 additions & 3 deletions installation/spider.pkg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 1.0
v 1.1
d {bf:SPIDER}: A Stata package for spider plots.
d See {bf:help spider} after installation.
d
Expand All @@ -9,9 +9,9 @@ d KW: graphs
d KW: spider plot
d
d
d Distribution-Date: 20221013
d Distribution-Date: 20221222
d
d This version: 13 Oct 2022
d This version: 22 Dec 2022
d First version: 13 Oct 2022
d License: MIT
d
Expand Down
19 changes: 11 additions & 8 deletions installation/spider.sthlp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{smcl}
{* 13October2022}{...}
{* 22December2022}{...}
{hi:help spider}{...}
{right:{browse "https://github.com/asjadnaqvi/stata-spider":spider v1.0 (GitHub)}}
{right:{browse "https://github.com/asjadnaqvi/stata-spider":spider v1.1 (GitHub)}}

{hline}

Expand Down Expand Up @@ -34,7 +34,7 @@ The command is still {it:beta} and is subject to change and improvements. Please
The groups are determined by the {opt over()} variable. If there are more than one observations per {opt over()} variable, the command will collapse and average the data.
So make sure to control the data before using the {cmd:spider} command. See examples below.{p_end}

{p2coldent : {opt alpha(numeric)}}The transparency control of the spider area fills. The value ranges from 0-100, where 0 is no fill and 100 is fully filled.
{p2coldent : {opt alpha(num)}}The transparency control of the spider area fills. The value ranges from 0-100, where 0 is no fill and 100 is fully filled.
Default value is {it:5} or 5% transparency.{p_end}

{p2coldent : {opt ro:tate(num)}}Rotate the graph in degrees. The default value is {it:30} or 30 degrees to prevent overlab with range values.{p_end}
Expand Down Expand Up @@ -110,7 +110,7 @@ Even if you have these installed, it is highly recommended to update the depende

{title:Examples}

See {browse "https://github.com/asjadnaqvi/spider":GitHub} for examples.
See {browse "https://github.com/asjadnaqvi/stata-spider":GitHub} for examples.



Expand All @@ -123,10 +123,10 @@ See {browse "https://github.com/asjadnaqvi/spider":GitHub} for examples.

{title:Package details}

Version : {bf:spider} v1.0
This release : 13 Oct 2022
First release: 13 Oct 2021
Repository : {browse "https://github.com/asjadnaqvi/spider":GitHub}
Version : {bf:spider} v1.1
This release : 22 Dec 2022
First release: 13 Oct 2022
Repository : {browse "https://github.com/asjadnaqvi/stata-spider":GitHub}
Keywords : Stata, graph, spider plot
License : {browse "https://opensource.org/licenses/MIT":MIT}

Expand All @@ -147,3 +147,6 @@ Please submit bugs, errors, feature requests on {browse "https://github.com/asja

{p 4 8 2}Jann, B. (2018). {browse "https://www.stata-journal.com/article.html?article=gr0075":Color palettes for Stata graphics}. The Stata Journal 18(4): 765-785.

{psee}
{helpb sunburst}, {helpb sankey}, {helpb alluvial}, {helpb circlebar}, {helpb spider}, {helpb treemap}, {helpb circlepack}, {helpb arcplot},
{helpb marimekko}, {helpb bimap}, {helpb joyplot}, {helpb streamplot}, {helpb delaunay}, {helpb clipgeo}, {helpb schemepack}

0 comments on commit cd4b4e4

Please sign in to comment.