Publications by Jie Zou

a_5: xml, json and html in R

21.03.2021

a_5: Working with XML and JSON in R Jie Zou 2021-03-20 Read .xml file # store url url <- "https://raw.githubusercontent.com/Sugarcane-svg/R/main/R607/Assignments/a5/movies.xml" # get url my_url<-getURL(url = url) # get the content of this page xml.parse <- xmlParse(my_url) # parse data xml.root <- xmlRoot(xml.parse) # make data frame xml.df ...

393 sym R (1456 sym/10 pcs) 1 tbl

tidyverse + dplyr

01.04.2021

tidyverse + dplyr = easy code reader Jie Zou 2021-04-01 Read table the data is extracted from http://www.cuny.edu/about/alumni-students-faculty/faculty/distinguished-professors/. it shows the records of professors who teach in CUNY. I already preprocess data a little data <- read.csv("https://raw.githubusercontent.com/Sugarcane-svg/R/main/R607/A...

1608 sym R (1305 sym/11 pcs)

606 final project: will higher sugar content of candy the more popular of candy?

08.05.2021

Part 1 - Introduction People like candies. Especial holidays like Halloween, candies are even more popular than usual. Many businesses have to supply different candies for customers to choose, but there are so many varieties of candies in the world, and each business will not stock up all kinds of candies. So those candies that are the best for s...

4793 sym R (5170 sym/21 pcs) 9 img

607 final project: NYC crime with other factors?

08.05.2021

607 final project: NYC crime with other factors Jie Zou 2021-05-08 Introduction the project is going to see the crime rate in New York City. Specifically, the time during covid-19 because of many events happen in this time, and I want to see if those events affect the crime rate. Event I: unemployeement benefit government sent out unemployeement...

5853 sym R (10107 sym/46 pcs) 14 img

Document

29.04.2021

p4: document classification Jie Zou 2021-04-29 load data The files were downloaded in link, the one that I have is ‘20030228_spam.tar.bz2’ and ‘20030228_easy_ham.tar.bz2’. So, the project may not be fully reproducible. # data directory spam.dir<- "~/desktop/spam" ham.dir <- "~/desktop/easy_ham" get docs from each dir the first file unde...

1721 sym R (3718 sym/16 pcs) 2 img

Sentiment analysis

18.04.2021

a_10: Sentiment analysis Jie Zou 2021-04-18 library(gutenbergr) library(dplyr) library(tidyverse) library(tidytext) library(textdata) library(stringr) The Data The novels that I found interesting are in project gutenberg call “The Secret Garden” and “The Scarlet Letter”(by its name). So, first what we need to do is the obtain the data. ...

1742 sym R (4455 sym/24 pcs) 2 img

605: discussion12

12.11.2021

605: discussion12 Jie Zou 2021-11-11 info I found the data from kaggle and download locally, for the purpose of code repreduction, it would better to download the data set and save it with this R markdwon file. Finally, set the working directory where you save these files. Read data housing <- read.csv('housing.csv') # what is in the data set ...

2217 sym R (5084 sym/18 pcs) 4 img

605: hw15

12.12.2021

605: hw15 Jie Zou 2021-12-12 1 find the equation of the regression line for the given points. Round any final values to the nearest hundredth, if necessary. (5.6, 8.8), (6.3, 12.4), (7, 14.8), (7.7, 18.2), (8.4, 20.8) x <- c(5.6, 6.3, 7, 7.7, 8.4) y <- c(8.8, 12.4, 14.8, 18.2, 20.8) summary(lm(y ~ x)) ## ## Call: ## lm(formula = y ~ x) ## ## ...

3221 sym R (1014 sym/11 pcs)

605: discussion15

10.12.2021

605: discussion15 Jie Zou 2021-12-10 ex 9-15 pg 711 find \(f_{x}, f_y, f_{xx}, f_{yy}, f_{xy}\) and \(f_{yx}\) 9 \[f(x,y) = x^2y+3x^2+4y-5\] \[\begin{align*} f_x &= 2xy+6x \\ f_y &= x^2+4 \\ f_{xx} &= 2y+6 \\ f_{xy} &= 2x \\ f_{yx} &= 2x \\ f_{yy} &= 0 \end{align*}\] 10 \[f(x,y) = y^3 + 3xy^2 + 3x^2y + x^3\] \[\begin{align*} ...

2214 sym

605: hw10

31.10.2021

605: hw10 Jie Zou 2021-10-31 Smith is in jail and has 1 dollar; he can get out on bail if he has 8 dollars. A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability .4 and loses A dollars with probability .6. Find the probability that he wins 8 dollars before losing all of his money if he bet...

672 sym R (240 sym/4 pcs)