Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goals and cards time #37

Open
ainureg opened this issue Jun 22, 2018 · 2 comments
Open

goals and cards time #37

ainureg opened this issue Jun 22, 2018 · 2 comments

Comments

@ainureg
Copy link

ainureg commented Jun 22, 2018

> json<-listfiles[1]
> temp<-fromJSON(json)
> tail( sapply( temp$matches,  function (z) sapply(z$goalHome, function (x) {x$time} ) )   )
$`457`
   1    2    3    4    5    6    7 
 "7" "16" "43" "48" "85" "88" "76" 

$`458`
   1    2    3    4    5    6    7 
"67" "78" "43" "48" "85" "88" "76" 

$`459`
   1    2    3    4    5    6    7 
"81" "78" "43" "48" "85" "88" "76" 

$`460`
   1    2    3    4    5    6    7 
"52" "78" "43" "48" "85" "88" "76" 

$`461`
   1    2    3    4    5    6    7 
"27" "31" "67" "48" "85" "88" "76" 

$`462`
   1    2    3    4    5    6    7 
"61" "31" "67" "48" "85" "88" "76" 

is there a mistake?
the same is about cards minutes
file
English_Premier_League_1992-1993.json

@ainureg ainureg changed the title wrong data? sry Jun 22, 2018
@ainureg ainureg closed this as completed Jun 22, 2018
@ainureg ainureg reopened this Jun 22, 2018
@jokecamp
Copy link
Owner

No problem. what's the mistake exactly? hard to read that formatted text.

@ainureg ainureg changed the title sry goals and cards time Jun 22, 2018
@ainureg
Copy link
Author

ainureg commented Jun 22, 2018

all the information in data is ok, except times

even no matching the number of scored

> temp$matches$`462`$goalAway

$`1`
$`1`$name
[1] "Matt Le Tissier"

$`1`$time
[1] "45"

$`1`$desc
[1] "Penalty"


$`2`
$`2`$name
[1] "Neil Maddison"

$`2`$time
[1] "52"

$`2`$desc
[1] "Own Goal"


$`3`
$`3`$name
[1] "Matt Le Tissier"

$`3`$time
[1] "65"

$`3`$desc
[1] "Penalty"


$`4`
$`4`$name
[1] "Brian Deane"

$`4`$time
[1] "67"


$`5`
$`5`$name
[1] "Chris Fairclough"

$`5`$time
[1] "90"


> 
> temp$matches$`462`$score
$home
[1] "Manchester United"

$away
[1] "Coventry City"

$homeScore
[1] "0"

$awayScore
[1] "0"

this output is for next file "English_Premier_League_1993-1994.json"
footballStats/English_Premier_League/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants