Watts-College / cpp-528-fall-2021

https://watts-college.github.io/cpp-528-fall-2021/
2 stars 2 forks source link

Measuring Gentrification Tutorial Part 2 #18

Open millmeli42 opened 3 years ago

millmeli42 commented 3 years ago

I am having difficulty replicating the results in the Tutorial part 2, beginning with this step.

adjust 2000 home values for inflation

mhv.00 <- d.full$mhmval00 * 1.28855
mhv.10 <- d.full$mhmval12

mhv.change <- mhv.10 - mhv.00

small initial values are skewing percentages

#

an average home value below $10k is really low -

these must be mostly vacant lots?

mhv.00[ mhv.00 < 10000 ] <- NA pct.change <- 100 * ( mhv.change / mhv.00 ) summary( pct.change )

Up until this point I receive the same results as the tutorial, but here I get the following results:

Min. 1st Qu. Median Mean 3rd Qu. Max. NA's -100.00 -100.00 -100.00 -100.00 -100.00 -91.05 220

I am pretty sure it has to do with the percentage change. Additionally I know there is an error here because as I continue with the tutorial, I get the result of 0 for number of gentrification.

I have attempted to try to find the error, but I cannot find it.

I can copy all of my code here, but really it is the same as the tutorial to this point and all outputs are exactly the same up until this point.

Thanks for any ideas!

Melissa

castower commented 3 years ago

Hello Melissa @millmeli42 ,

Can you email me your .rmd file(s) for part 1 and part 2? I believe there's a step missing, but I'm not sure exactly what it would be without seeing your code.

I did double check the code in the lab instructions and those are the correct output if all steps are followed.

Thanks!