Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with 'values percent' and option point [Not working on Mac] #19

Open
jcor24 opened this issue Mar 4, 2024 · 7 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jcor24
Copy link

jcor24 commented Mar 4, 2024

This Bimap command is great !!! Congratulations !!!

I was developing the exercises and the maps were not generated when using the 'values percent' option.

In the screen appears :
option 9 not allowed
r(198)

For the map number 17, when I use the syntax:

bimap share_hisp share_afam using county_shp2, cut(pctile) palette(pinkgreen) percent  ///
	title("{fontface Arial Bold:A Stata bivariate map}") ///
	note("Data from the US Census Bureau. Counties with population > 100k plotted as proportional dots.", size(1.8)) ///	
		 textx("Share of African Americans") texty("Share of Hispanics") texts(3.5) textlabs(3) values  ///
		 ocolor() osize(none) ///
		 polygon(data("state_shp2") ocolor(white) osize(0.3)) ///
		 point(data("county") x(_CX) y(_CY) select(keep if tot_pop>100000)  psize(absolute) fcolor(lime%85) ocolor(black) osize(0.12) size(0.9) )

In the screen appears :
Problem with option point(): suboption select() specified incorrectly

I am using Stata 17 for Mac. Could these problems be due to using this version of Stata? How to fix it?

@asjadnaqvi
Copy link
Owner

For the second problem, there is a bug in the syntax which has been fixed. The point data should read the file usa_county2:

bimap share_hisp share_afam using county_shp2, cut(pctile) palette(pinkgreen) percent  ///
	title("{fontface Arial Bold:A Stata bivariate map}") ///
	note("Data from the US Census Bureau. Counties with population > 100k plotted as proportional dots.", size(1.8)) ///	
		 textx("Share of African Americans") texty("Share of Hispanics") texts(3.5) textlabs(3) values  ///
		 ocolor() osize(none) ///
		 polygon(data("state_shp2") ocolor(white) osize(0.3)) ///
		 point(data("usa_county2") x(_CX) y(_CY) select(keep if tot_pop>100000) proportional(tot_pop) psize(absolute) fcolor(lime%85) ocolor(black) osize(0.12) size(0.9) )  
	)

For the first issue, I am not getting the error on Windows. Can you check if you have the latest bimap version? which bimap should show 1.81 or newer. If the issue still exists, can you provide more details please. You can set trace on and upload the output file for the map which is giving the error. WARNING: this will generate a very large output dump on screen so you might want to export it as a log file.

@jcor24
Copy link
Author

jcor24 commented Mar 5, 2024

I reinstall bitmap package using: net install bimap, from("https://raw.githubusercontent.com/asjadnaqvi/stata-bimap/main/installation/") replace. I am using bimap v1.81 (22 Aug 2023)

More details about the issue is in the following file in the link:
https://drive.google.com/file/d/1xvJ9i1wvIbX_MP-mgFgoGhoXvi4-Tcfx/view?usp=share_link

I realize "values percent" option is not working

@asjadnaqvi
Copy link
Owner

@jcor24 can you also dump the datafiles and the scripts on Google Drive please. I will check.

@jcor24
Copy link
Author

jcor24 commented Mar 5, 2024

Dear Asjad,

Here is the new link with datafiles and scripts : https://drive.google.com/drive/folders/1Zkx4DUwx2swAhFEgqMk0LyztEVnE-hbk?usp=share_link

Best,

Juan Cortez

@asjadnaqvi
Copy link
Owner

The code still works fine on PC. I will ask colleagues who use Mac to see if they can reproduce the error. Will get back soon.

@asjadnaqvi asjadnaqvi changed the title Problems with 'values percen' and option point Problems with 'values percen' and option point [Not working on Mac] Mar 5, 2024
@asjadnaqvi asjadnaqvi self-assigned this Mar 5, 2024
@asjadnaqvi asjadnaqvi added the bug Something isn't working label Mar 5, 2024
@jcor24 jcor24 changed the title Problems with 'values percen' and option point [Not working on Mac] Problems with 'values percent' and option point [Not working on Mac] Mar 5, 2024
@saaakill
Copy link

) select(k

The point option is not working. It does not produce any error but all the population points are centered in one place far from the map.
usa_point_map
The code -

bimap share_hisp share_afam using county_shp2, cut(pctile) palette(pinkgreen) percent  ///
title("{fontface Arial Bold:A Stata bivariate map}") ///
note("Data from the US Census Bureau. Counties with population > 100k plotted as proportional dots.", size(1.8)) ///	
	 textx("Share of African Americans") texty("Share of Hispanics") texts(3.5) textlabs(3) values  ///
	 ocolor() osize(none) ///
	 polygon(data("state_shp2") ocolor(white) osize(0.3)) ///
	 point(data("usa_county2") x(_CX) y(_CY) select(keep if tot_pop>100000) proportional(tot_pop) psize(absolute) fcolor(lime%85) ocolor(black) osize(0.12) size(0.9))

@asjadnaqvi
Copy link
Owner

@saaakill this is a projection issue. You need to make sure that the point data is also transformed using geo2xy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Next update
Development

No branches or pull requests

3 participants