Skip to content

Commit

Permalink
v1.61
Browse files Browse the repository at this point in the history
  • Loading branch information
asjadnaqvi committed Apr 12, 2023
1 parent df2a6bd commit f2fd573
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 13 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

---

# bimap v1.6
# bimap v1.61

This package provides the ability to draw bi-variate maps in Stata. It is based on the [Bi-variate maps Guide](https://medium.com/the-stata-guide/stata-graphs-bi-variate-maps-b1e96dd4c2be).

Expand All @@ -22,7 +22,7 @@ The package can be installed from SSC (**v1.6**):
ssc install bimap, replace
```

Or it can be installed from GitHub (**v1.6**):
Or it can be installed from GitHub (**v1.61**):

```
net install bimap, from("https://raw.githubusercontent.com/asjadnaqvi/stata-bimap/main/installation/") replace
Expand Down Expand Up @@ -59,7 +59,7 @@ This command is a wrapper for `spmap` and assumes that you have shapefiles in St

## Syntax

The syntax for **v1.6** is as follows:
The syntax for **v1.61** is as follows:

```
bimap vary varx [if] [in], [ palette(name) reverse clr0(str) clrx(str) clry(str) clrsaturate(num)
Expand Down Expand Up @@ -379,7 +379,7 @@ bimap share_hisp share_afam using county_shp2, cut(pctile) palette(orangeblue) c
<img src="/figures/bimap20.png" height="500">

```
bimap share_hisp share_afam using county_shp2, cut(pctile) palette(orangeblue) bins(4) binsproper ///
bimap share_hisp share_afam using county_shp2, cut(pctile) palette(orangeblue) bins(4) percent ///
note("Data from the US Census Bureau.") ///
texty("Share of Hispanics") textx("Share of African Americans") texts(3.5) textlabs(3) values ///
ocolor() osize(none) ///
Expand All @@ -395,6 +395,9 @@ Please open an [issue](https://github.com/asjadnaqvi/stata-bimap/issues) to repo

## Change log

**v1.61 (12 Apr 2023)**
- Fixed a major bug in the legend. The boxes were not rescaling properly (reported by Faylosphie and Paul).

**v1.6 (17 Mar 2023)** (major update)
- Scalable color palettes.
- Customizable bins.
Expand Down
Binary file modified figures/bimap20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/bimap21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed figures/bimap22.png
Binary file not shown.
16 changes: 15 additions & 1 deletion installation/bimap.ado
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*! bimap v1.6 (17 Mar 2023)
*! bimap v1.61 (12 Apr 2023)
*! Asjad Naqvi ([email protected])

* v1.61 (12 Apr 2023): Fix to legend box and label rescaling.
* v1.6 (17 Mar 2023): Colors are now dynamically generated for any number of bins. several new options to control colors, bins, saturation, labels
* v1.51 (14 Nov 2022): Minor legend fixes
* v1.5 (05 Nov 2022): 3 new colors: rgb, gscale, viridis. arrow, scalebar, diagram passthrus added.
Expand Down Expand Up @@ -639,6 +640,19 @@ qui {
local z = `z' + 1
}


// rescale x and y (0-1)
summ x, meanonly
replace x = (x - r(min)) / (r(max) - r(min))
replace x_mid = (x_mid - r(min)) / (r(max) - r(min))
replace x_mark = (x_mark - r(min)) / (r(max) - r(min))

summ y, meanonly
replace y = (y - r(min)) / (r(max) - r(min))
replace y_mid = (y_mid - r(min)) / (r(max) - r(min))
replace y_mark = (y_mark - r(min)) / (r(max) - r(min))


if "`formatx'" =="" local formatx "%5.1f"
if "`formaty'" =="" local formaty "%5.1f"

Expand Down
4 changes: 2 additions & 2 deletions installation/bimap.pkg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 1.6
v 1.61
d {bf:BIMAP}: Bi-variate maps
d
d
Expand All @@ -10,7 +10,7 @@ d KW: map
d KW: bivariate map
d Distribution-Date: 20230316
d
d This version: 16 Mar 2023
d This version: 12 Apr 2023
d First version: 08 Apr 2022
d License: MIT
d
Expand Down
11 changes: 6 additions & 5 deletions installation/bimap.sthlp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{smcl}
{* 16Mar2023}{...}
{* 12Apr2023}{...}
{hi:help bimap}{...}
{right:{browse "https://github.com/asjadnaqvi/stata-bimap":bimap v1.6 (GitHub)}}
{right:{browse "https://github.com/asjadnaqvi/stata-bimap":bimap v1.61 (GitHub)}}

{hline}

Expand Down Expand Up @@ -163,8 +163,8 @@ Please see additional examples on {browse "https://github.com/asjadnaqvi/stata-b

{title:Package details}

Version : {bf:bimap} v1.6
This release : 16 Mar 2023
Version : {bf:bimap} v1.61
This release : 12 Apr 2023
First release: 08 Apr 2022
Repository : {browse "https://github.com/asjadnaqvi/stata-bimap":GitHub}
Keywords : Stata, map, bimap, bi-variate
Expand All @@ -179,6 +179,7 @@ Twitter : {browse "https://twitter.com/AsjadNaqvi":@AsjadNaqvi}
{title:Acknowledgements}

{p 4 4 2}
Faylosophie and Paul reported bug in the bimap v1.6 legends (v1.61).
Tyson King-Meadows and Vishakha Agarwal requested a greyscale palette (v1.5).
Souradet Shaw requested scalebar and arrow passthrus (v1.5).
Paul Frissard Martínez requested spmap legend options (v1.4).
Expand All @@ -205,5 +206,5 @@ If you find bugs and/or have feature requests, then please open an {browse "http

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

2 changes: 1 addition & 1 deletion installation/stata.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 1.6
v 1.61
d BIMAP: A package for creating bivariate maps.
d
d Asjad Naqvi
Expand Down

0 comments on commit f2fd573

Please sign in to comment.