Open asukajames opened 2 years ago
I'm having the same issue. I'm pretty sure the .geojson file is not capturing the data collected from lab 5, which is why "mhv.growth", or any of the DV's are not being found. I think if you just manually add the data from lab 5, including the three URLs, it will temporarily fix it. But I'm sure there is a better solution.
@jalehend, yes, this is great deduction! But your solution isn't optimal. I'm working with @asukajames via email. Perhaps @asukajames can offer some insights when it is working.
I'm having the same issue even though I changed all the values.
@JPRayes,
In both cases it ended up being issues with building the dorling cartogram dataset. If you haven't done so I recommend watching the last three lab sessions, particularly the third one back, and watch how it was built. You can also reach out to me via email if you remain stuck.
@jalehend @JPRayes Sorry for my late response! I was having a hard time making the code work in the dashboard! My problem was the dataset. The merging order was wrong, therefore, mhv.00.x stayed in my dataset and kept messing up my dashboard.
What order are you referring to? The more I try to adjust my cartogram, the more errors I end up getting...
@asukajames can you elaborate on the merging order? I feel like I'm close, but I've been messing with my cartogram for so many hours now, I think I'm at the point of diminished returns.
@ JPRayes When you get to this step:
phx <- merge( phx, d, by.x="GEOID", by.y="tractid", all.x=T )
try:
phx <- merge(phx, d)
This will remove duplicates which may be your issue. You then have to do the extra step of making sure everything is there, but that may work. You could also try phx <- merge(phx, d, all.x = T)
So I was able to work through several issues and now have an almost fully functional dashboard:
Ensure your cartogram variables match the variables in your final dashboard file and are included under d <- select Somewhere along the way I completely left these out: pnhwht12, pnhblk12, phisp12, pntv12, pfb12, polang12, phs12, pcol12, punemp12, pflabf12, pprof12, pmanuf12, pvet12, psemp12, hinc12, incpc12, ppov12, pown12, pvac12, pmulti12, mrent12, p30old12, p10yrs12, p18und12, p60up12, p75up12, pmar12, pwds12, pfhh12
In the cartogram, I had to disable x <- as.numeric( x ) prior to merging the datasets: den <- merge( den_dorling , d, by.x="GEOID", by.y="tractid2", all.x=T )
Lastly, in the final two cartogram chunks, I was using the wrong variables and had to swap them for the correct ones. I was using den_dorling instead of den
I changed the values but I am still getting an error.
Inputs {.sidebar}
Median Home Values
Variable Distribution
Error Problem with
mutate()
columnq
. iq = ntile(get(input$home.value), 10)
. x object 'mhv.growth' not foundAnybody getting the same problem??