Watts-College / cpp-527-fall-2021

A course shell for CPP 527 Foundations of Data Science II
https://watts-college.github.io/cpp-527-fall-2021/
2 stars 6 forks source link

Lab 04 data #31

Open AmyTrumpower opened 3 years ago

AmyTrumpower commented 3 years ago

@lecy Dr Lecy,

Which year are we using for the IRS data? I went to the IRS website from the link provided in the lab and they have multiple files based on year (2014, 2015, 2016, 2017, 2018, 2019, and 2020) or

Can you tell me how to view the file that is provided on the class Github site? I can't figure out how to open it so it's readable or importable in to Excel so I can check my work. I just get a lot of random characters.

Thank you, Amy

lecy commented 3 years ago

Use the version archived on GitHub for the lab, please:

URL <- "https://github.com/DS4PS/cpp-527-spr-2020/blob/master/labs/data/IRS-1023-EZ-MISSIONS.rds?raw=true"
dat <- readRDS(gzcon(url( URL )))
head( dat[ c("orgname","codedef01","mission") ] ) %>% knitr::kable()
orgname codedef01 mission
NIA PERFORMING ARTS Arts, Culture, and Humanities A community based art organization that inspires, nutures,educates and empower artist and community.
THE YOUNG ACTORS GUILD INC Arts, Culture, and Humanities We engage and educate children in the various aspect of theatrical productions, through acting, directing, and stage crew. We produce community theater productions for children as well as educational theater camps and workshops.
RUTH STAGE INC Arts, Culture, and Humanities Theater performances and performing arts
STRIPLIGHT COMMUNITY THEATRE INC Arts, Culture, and Humanities
NU BLACK ARTS WEST THEATRE Arts, Culture, and Humanities
OLIVE BRANCH THEATRICALS INC Arts, Culture, and Humanities To produce high-quality theater productions for our local community, guiding performers and audience members to a greater appreciation of creativity through the theatrical arts - while leading with respect, organization, accountability.
lecy commented 3 years ago

It is an RDS (R dataset) file. To convert to Excel you can try:

URL <- "https://github.com/DS4PS/cpp-527-spr-2020/blob/master/labs/data/IRS-1023-EZ-MISSIONS.rds?raw=true"
dat <- readRDS(gzcon(url( URL )))
write.csv( dat, "IRS-1023-EZ-MISSIONS.csv", row.names=F )
kidistbetter105 commented 3 years ago

Hi Dr Lecy ! I installed = install.packages("quanteda") and it works .

But to use IRs file I use the (R dataset) file

URL <- "https://github.com/DS4PS/cpp-527-spr-2020/blob/master/labs/data/IRS-1023-EZ-MISSIONS.rds?raw=true" dat <- readRDS(gzcon(url( URL ))) write.csv( dat, "IRS-1023-EZ-MISSIONS.csv", row.names=F )

but am having this error.

Error in head(dat[c("orgname", "codedef01", "mission")]) %>% knitr::kable() : could not find function "%>%"

?????

AmyTrumpower commented 3 years ago

Hi @kidistbetter105 - I get this one a lot and if I load the dplyr library it seems to resolve. Maybe that will work for you.

lecy commented 3 years ago

Correct, the pipe operator is part of the dplyr library. Thanks Amy!

kidistbetter105 commented 3 years ago

@AmyTrumpower
It Helps :) now it works Perfectly .Thanks Amy !