tpemartin / 110-1-r4ds-main

MIT License
3 stars 73 forks source link

Exercise 5.1 Load the following data set: concerts_obo #60

Open tpemartin opened 2 years ago

tpemartin commented 2 years ago

Exercise 5.1 Load the following data set:

# Observation by observation
concerts_obo <-
  jsonlite::fromJSON("https://cloud.culture.tw/frontsite/trans/SearchShowAction.do?method=doFindTypeJ&category=17", simplifyDataFrame = F)

Data set concerts_obo has difference performance information as its observations. For each performance, there can be more than one show, and each show’s information is contained inside the observation’s showInfo element.

  1. How many shows does the 5th performance have?

  2. If we are to find out the number of shows for each performance, what is the .x-pattern?

  3. Find out the number of shows for each performance, and put the answer as an integer vector under analysis$number_of_shows. (i.e. analysis$number_of_shows[[5]] will show your answer in 1.)

  4. Construct a data frame with columns, title, date, location and locationName, where title comes from each observation’s title, and the rest three are from each observation’s 1st showInfo. In addition, date column has to be “POSIXct” “POSIXt” class with Taipei time zone.

raychiu135 commented 2 years ago

https://github.com/raychiu135/110-1-r4ds-main/blob/3b5a9875ca9e20ad46cd456f4901fe8cf7335af4/exercise_5.1.rmd#L2

linttttt commented 2 years ago

https://github.com/linttttt/110-1-r4ds-main/blob/cb45474eccfffc9a65a949f6e1116bb414492c91/studyCH5(EX).Rmd#L3

AmyChen20021003 commented 2 years ago

https://github.com/AmyChen20021003/110-1-r4ds-main/blob/fdca3bce1bf5fbe8fdad6f52abe8ac7cc6ff3dd8/5-1.Rmd#L7

tpemartin commented 2 years ago

@raychiu135

@AmyChen20021003

stone05261234 commented 2 years ago

https://github.com/stone05261234/110-1-r4ds-main/blob/4597e09b72d7a8d90637f11f641f55ea745d6c4f/5.1#L1