Thursday, July 7, 2016

Federal Reserve Economic Data & R

I was looking for data sets one day and I found a very cool site of tons of sets. The site is the Federal Reserve Economic Data.

I downloaded some Michigan population data by year and put it into R to create a plot with a linear regression.

Here's my code:
mipop = read.csv("mipop.csv")
attach(mipop)
model = lm(pop ~ year)
plot(year,pop)
abline(model)

And my plot:



It was just a fun little project to learn a few new basic skills, but pretty fun.



No comments:

Post a Comment