DS4PS / cpp-528-spr-2021

https://ds4ps.org/cpp-528-spr-2021/
0 stars 0 forks source link

lab03- Part 3 #23

Open malmufre opened 3 years ago

malmufre commented 3 years ago

Hello,

I am in the process of creating my Dorling cartogram, and everything was running smoothly but when I reached the last step, I got this error. image I am not sure how to solve this issue. Also, when I ran my code chunks before It worked, but it doesn't seem to run now. What could be the problem?

cenuno commented 3 years ago

Hi Marah,

There isn’t enough information here for me to properly diagnose the issue. Incorrect dimensions typically means R is expecting a value of X but you’ve given a value of Y that is either too high or too low.

My hunch is that there’s a mismatch between your use of 1:27 and 1:30. Though which one is correct is not something I can tell you.

Interesting use of the for loop! I’m curious to see your code when you submit.

— Cristian E. Nuno


From: Marah @.> Sent: Monday, March 29, 2021 3:55:45 PM To: DS4PS/cpp-528-spr-2021 @.> Cc: Subscribed @.***> Subject: [DS4PS/cpp-528-spr-2021] lab03- Part 3 (#23)

Hello,

I am in the process of creating my Dorling cartogram, and everything was running smoothly but when I reached the last step, I got this error. [image]https://user-images.githubusercontent.com/59895354/112909822-d08c2000-90fa-11eb-9f11-9f2a3f17a647.png I am not sure how to solve this issue. Also, when I ran my code chunks before It worked, but it doesn't seem to run now. What could be the problem?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/DS4PS/cpp-528-spr-2021/issues/23, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZB2SZKFBK57RRPVFDPIP3TGEAPDANCNFSM42AVKTWQ.

malmufre commented 3 years ago

What I did is limit my variables to 27 variables since some of them were not available for the year 2000. This is what I did in the code chunk above it image and because there are 27 variables I changed the number from 30 to 27. When I try to write my Dorling cartogram to geojson file type I get this image

Note: I am assuming that the important variables that need to be included are the mhmval90 , mhv. change and pct.change

lecy commented 3 years ago

It’s a good example of a case where it might be helpful to generalize. Maybe create a num.vars variable and replace all of your 1:27 or 1:30 with 1:num.vars?