Closed Sean-In-The-Library closed 2 years ago
Hi Sean, if you are wanting to download the spatial features of the census data, you will need to have geography=TRUE.
Best,
On Sun, Apr 25, 2021 at 11:29 AM Sean H. @.***> wrote:
I was trying to save my cartogram based on the instructions from Lab 4 and I keep hitting this wall. Initially I tried it with the county that I was using but couldn't figure it out so I tried it with the example give (PHX). Still no luck. I can't figure out what I'm missing here.
Here's the portion that I get stuck on:
phx <- merge( phx, phx.pop, by.x="GEOID", by.y="GEOID" ) phx <- merge( phx, phx.mhhi, by.x="GEOID", by.y="GEOID" ) head( @.*** ) %>% pander()
Error: (pictured below)
Error in @.***) : trying to get slot "data" from an object (class "sf") that is not an S4 object
[image: image] https://user-images.githubusercontent.com/60198848/116004679-a96d2500-a5b8-11eb-9c42-bc4868af2dff.png
Unfortunately this bottlenecks my progress making the map so that I can save it, render it, etc. I could manually make the map for the final but I'd prefer to do this if possible. Any ideas friends? or Dr. Howell? @Anthony-Howell-PhD https://github.com/Anthony-Howell-PhD
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DS4PS/cpp-529-spr-2021/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMK2Y77IC5LTXZRGRDQNAETTKRNOTANCNFSM43RRF5UQ .
-- Anthony Howell Asst. Prof. in Public Policy School of Public Affairs Arizona State University Faculty Profile https://sustainability.asu.edu/person/anthony-howell/ (CV https://www.dropbox.com/s/b1pxccpwxm6fats/Howell.CV.pdf?dl=0)
Oops, duh. That was a dumb oversight and thank you, @Anthony-Howell-PhD
But it's still not working for me.
I even tried st_transform
because I saw it on a stackoverflow-type site when other people had this problem.
The map objects can be sp or sf objects. Yours looks like an sf object but should be sp to export it.
there is a casting step you are missing.check back over the original tutorial for that step.
@lecy OK, I'll give that a try. Thank you!
I was trying to save my cartogram based on the instructions from Lab 4 and I keep hitting this wall. Initially I tried it with the county that I was using but couldn't figure it out so I tried it with the example give (PHX). Still no luck. I can't figure out what I'm missing here.
Here's the portion that I get stuck on:
Error: (pictured below)
Unfortunately this bottlenecks my progress making the map so that I can save it, render it, etc. I could manually make the map for the final but I'd prefer to do this if possible. Any ideas friends? or Dr. Howell?
I've clearly failed on the "Make sure that your map file is an sp “spatial object” file type and not an sf “simple features” file type" portion but I can't figure out how to convert it properly. @Anthony-Howell-PhD