Jump to content

FM Data Analytics: a data visualization tool based on R & Shiny - V3 RELEASED!


Recommended Posts

1 hour ago, gam945 said:

If you see a black window opening then immediately closing when you double-click on FMapp.bat, this is because you didn't change the paths! Please follow the instructions when you download the app to avoid this error!

Basically the FMapp.bat file contains the following:


<full path for Rscript.exe> <full path of app.R>

If you do not change the first path, Windows won't know which program (in this case Rscript.exe which comes with R when you install it) you are using.

If you do not change the second path, Windows won't know where is the script (in this case app.R in the main folder) you are trying to run from the Command Prompt.

That's my issue. Checked again and again and again I'm 100 % SURE I have the correct paths in the correct files.

Anyways...

Link to post
Share on other sites

  • Replies 162
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

5 minutes ago, yanloup64 said:

That's my issue. Checked again and again and again I'm 100 % SURE I have the correct paths in the correct files.

Anyways...

I was having this issue a fair bit. I was installing everything to my D drive and found moving it all over to my C drive made it work. Also try running the batch files in administrion mode too as it may be blocking the permissions the files need.

That got me to the point of being able to open the app at least

Link to post
Share on other sites

3 minutes ago, IWWROCKS said:

I was having this issue a fair bit. I was installing everything to my D drive and found moving it all over to my C drive made it work. Also try running the batch files in administrion mode too as it may be blocking the permissions the files need.

That got me to the point of being able to open the app at least

Tried admin mode too, no effect. Installing on C: drive may be the trick. Worth a try. Thx

Link to post
Share on other sites

I added two demo videos in Github under the demo_videos directory. There is one for the setup (only step I didn't do is double-click on installpackages.bat after saving it as I already have the packages), and one for data extract and app use.

image.png.c60b001bc090bfb1d0c0f5f0d0d34528.png

@IWWROCKS I replicated the steps any user would do and didn't have any issues as you can see in the videos. Currently investigating to figure out the issue

Link to post
Share on other sites

19 minutes ago, IWWROCKS said:

I do have my language set to British English but have the same issue with regards to empty data. The excel sheet runs fine and brings in the data I want but when running the app it's not showing any data. All of the players, clubs, divisions appear on the filters, but not in the data subset (with all filter options selected)

I just fixed that problem for me: In Germany we use dots and commas not in the way they do it in GB.

To fix it, I had to change the following ingame options:


Preferences - Advanced - Formats

Positive: €1,00 (The Symbol of yout currency has to be before the value)
Decimal Symbol: Dot
Digit Grouping Symbol: Comma

With these settings, everything works fine for me now.
 

Link to post
Share on other sites

18 minuti fa, IWWROCKS ha scritto:

I was having this issue a fair bit. I was installing everything to my D drive and found moving it all over to my C drive made it work. Also try running the batch files in administrion mode too as it may be blocking the permissions the files need.

That got me to the point of being able to open the app at least

 

14 minuti fa, yanloup64 ha scritto:

Tried admin mode too, no effect. Installing on C: drive may be the trick. Worth a try. Thx

Same issue for me. Installing on C: hasn't done the job. Extraordinary work @gam945 and I congratulate with you for have made it and shared it with us, but for me it's just too much messing around with paths, renames, files etc.

I try again when I'll be more relaxed and patient.

Link to post
Share on other sites

6 minutes ago, marculatur said:

I just fixed that problem for me: In Germany we use dots and commas not in the way they do it in GB.

To fix it, I had to change the following ingame options:


Preferences - Advanced - Formats

Positive: €1,00 (The Symbol of yout currency has to be before the value)
Decimal Symbol: Dot
Digit Grouping Symbol: Comma

With these settings, everything works fine for me now.
 

You nailed it, thanks!

Link to post
Share on other sites

16 minutes ago, yanloup64 said:

Tried admin mode too, no effect. Installing on C: drive may be the trick. Worth a try. Thx

 

2 minutes ago, Federico said:

 

Same issue for me. Installing on C: hasn't done the job. Extraordinary work @gam945 and I congratulate with you for have made it and shared it with us, but for me it's just too much messing around with paths, renames, files etc.

I try again when I'll be more relaxed and patient.

I had same issue but managed to resolve it. Basically I uninstalled and started again and my issue came from not letting the installation packages.bat run through completely. It got to a point where it stopped and I thought that was it so I closed, but needed to wait and it will close itself. 

Link to post
Share on other sites

@gam945 Thanks for this tool. I'm having some issues as below, do you know how to resolve?

When importing the shortlist on the excel sheet only a few names come through.

Untitled2.png.809092382042d00d1627fb6de844854e.png

Naturally on the app there aren't any names that show up, but neither does other some of the other data such as value or wage. Also none of the visualisation selections show anything.

Untitled1.thumb.png.68e0f10ed88166d8d4c9bd802464368a.png

 

Link to post
Share on other sites

Just now, Mikal said:

@gam945 Thanks for this tool. I'm having some issues as below, do you know how to resolve?

When importing the shortlist on the excel sheet only a few names come through.

Untitled2.png.809092382042d00d1627fb6de844854e.png

Naturally on the app there aren't any names that show up, but neither does other some of the other data such as value or wage. Also none of the visualisation selections show anything.

Untitled1.thumb.png.68e0f10ed88166d8d4c9bd802464368a.png

 

Yes, when you export from FM, make sure to scroll from the top to the bottom. Otherwise FM won't export all the rows. You'll see that if you open the HTML files they are also empty.

Link to post
Share on other sites

4 minuti fa, IWWROCKS ha scritto:

Did you do a full reinstall of R making sure that's on C drive too? 

Yes I did. I installed "R" on my D: drive initially, then read your comments and uninstalled fromd D: to install it to C:.

I'm probably missing something... but as said I'll try again when I feel like messing up with it.

Link to post
Share on other sites

1 minute ago, DarJ said:

on the graphs where you put "games played" can you change that to "minutes played" because I feel like that is more accurate. I don't know if "games played" includes sub appearances etc

graph.png.1838ba76f0072cde74a5423165664571.png

Games played is = Minutes played/90

It is more accurate, and you'll see that it's possible to have decimal values.

Example: Player A played 90mins for 3 matches and 20min for 2 matches where he entered as a sub. So Games played = (90*3+20*2)/90 = 310/90 = 3.4 games played. The 310 value is from the Minutes data point in FM.

Link to post
Share on other sites

Fixed the empty data issue! It was coming from currency symbols in my code, replaced them by their unicode characters! Also make sure that you have the following settings before exporting in FM.

32 minutes ago, marculatur said:

Preferences - Advanced - Formats

Positive: €1,00 (The Symbol of yout currency has to be before the value)
Decimal Symbol: Dot
Digit Grouping Symbol: Comma
 

Thanks @marculatur and @IWWROCKS!

If you had already downloaded the app.R file, re-downloaded again from Github and replace the old app.R by it. No need for a full re-install.

Link to post
Share on other sites

1 hour ago, Mikal said:

 

I had same issue but managed to resolve it. Basically I uninstalled and started again and my issue came from not letting the installation packages.bat run through completely. It got to a point where it stopped and I thought that was it so I closed, but needed to wait and it will close itself. 

What installing the packages is supposed to show ? I've got a black window with some lines of codes popping up then closing short after. 

Link to post
Share on other sites

Just now, yanloup64 said:

What installing the packages is supposed to show ? I've got a black window with some lines of codes popping up then closing short after. 

Nothing, it just installs the packages then it closes automatically. You should notice success install messages in the lines of codes tho. If there's an error with the install it will pause, so if it closes after running it should be all good.

Link to post
Share on other sites

1 minute ago, gam945 said:

Nothing, it just installs the packages then it closes automatically. You should notice success install messages in the lines of codes tho. If there's an error with the install it will pause, so if it closes after running it should be all good.

It does

Link to post
Share on other sites

Please check post #2 before raising issues. 90% chance your issue is described in there. So far there is one user only who have an issue with the Excel tool, and another who has an issue with the FMapp batch file as he is on Windows 7. Video demos for the setup and usage of the app/tool are also available in Github (comes with your install).

 

Link to post
Share on other sites

@gam945 is it a problem if I install R onto my D drive rather than my C drive? My C drive is pretty full so want to put onto my D drive. I've followed your set-up bar that one change but can't get it to work. The CMD box pops up but disappears before I can read it to find out what's wrong.

Link to post
Share on other sites

43 minutes ago, cmason84 said:

@gam945 is it a problem if I install R onto my D drive rather than my C drive? My C drive is pretty full so want to put onto my D drive. I've followed your set-up bar that one change but can't get it to work. The CMD box pops up but disappears before I can read it to find out what's wrong.

It seems like everyone who had this error resolved it by moving R and my app to the C:\ drive. PM me a screen of the location of Rscript.exeapp.R and the content of FMapp.bat

Link to post
Share on other sites

44 minutes ago, Guimy said:

Should I place the app on the C:\ drive as well? Ran the installation as you instructed but can't get the app to open.

I put the app folder on my desktop. I had initial problems with it starting but think it was because I had a previous R installation on my computer. Once I'd got rid of that I made sure to run the app 'as administrator' and that seemed to resolve the issue I had.

Link to post
Share on other sites

8 hours ago, gam945 said:

It seems like everyone who had this error resolved it by moving R and my app to the C:\ drive. PM me a screen of the location of Rscript.exeapp.R and the content of FMapp.bat

When installing R don't install in the program files, create a new folder like 'Installed Files' on the C drive and install it there. That seemed to solve my issues.

Link to post
Share on other sites

2 hours ago, jtaylor1409 said:

I put the app folder on my desktop. I had initial problems with it starting but think it was because I had a previous R installation on my computer. Once I'd got rid of that I made sure to run the app 'as administrator' and that seemed to resolve the issue I had.

 

Same here. I'll try removing R and re-installing outside of Program Files.

edit: installing R outside of Program Files has done the trick! Eureka!

Link to post
Share on other sites

51 minutes ago, toygungoktas said:

First of all thank you for this tool, this looks amazing. One thing I noticed, free transfers are not listed in the scouting>filters section. I'm guessing that is because their value is 0. 

That is likely because they have 0 minutes played. In my code, players with no minutes played (=> no stats available) are removed from the filters table. Value of 0 is still 0, not NA (missing value).

Link to post
Share on other sites

2 minutes ago, jtaylor1409 said:

What would be the best way to run stats for a whole league @gam945? Would I need to shortlist all the players from each side within it or is there a simpler way?

That's something that is more on FM's side and not my app, but I don't think there's a screen in FM where you can have all players for a whole screen together.

Basically, you can replicate the FM views I provide for any screen that offers player statistics (like in Scouting > Players). 

So yeah seems like you have to shortlist all the players from each side OR replicate my .fmf view for the Players screen and filter by league in FM.

Link to post
Share on other sites

22 hours ago, gam945 said:

Yes, when you export from FM, make sure to scroll from the top to the bottom. Otherwise FM won't export all the rows. You'll see that if you open the HTML files they are also empty.

[Please Ignore]

Edited by jtaylor1409
Sorted the issue needed to highlight them.
Link to post
Share on other sites

On 10/01/2021 at 17:24, Hovis Dexter said:

Hi @gam945 When I try to extract either the squad or shortlist data into Excel I'm getting the following error message and wonder if you have any suggestions

screenshot_20210110_171843.png.4cd3d000b3dfde67fc0dabb7c73b6588.png

I'm having the same issue it appears.

Can't wait to get started with this, this looks like amazing work @gam945
image.png.ab2495d703175861db137c4e70e99c5d.png
 

Edited by Gdawg69
Link to post
Share on other sites

@Hovis Dexter @Gdawg69Excel issues from VBA code have been rare and if Excel is set up correctly there should not be any. My best guess is try to add a "Application." in front of the "ThisWorkbook.Queries...", save the Excel file and try again.

Anyway I'm working on an update that should release in the next few days that will bypass the Excel tool. The app will read directly the html files instead of reading the spreadsheet which itself reads on the htmls. 

Edited by gam945
Link to post
Share on other sites

@gam945 Thank you for the suggestion. Unfortunately, I couldn't get it to work. Really pleased to hear that you are working on an update which will bypass the Excel tool ... I'm sure this will also be welcomed by everybody who uses Libreoffice instead of Excel

Link to post
Share on other sites

3 hours ago, Hovis Dexter said:

@gam945 Thank you for the suggestion. Unfortunately, I couldn't get it to work. Really pleased to hear that you are working on an update which will bypass the Excel tool ... I'm sure this will also be welcomed by everybody who uses Libreoffice instead of Excel

Same, tried it again, and tried the suggested potential fix but nothing.

Will wait for the bypass.

Link to post
Share on other sites

  • gam945 changed the title to A tool based on R Shiny for the FM data driven manager - V2 RELEASED!

UPDATE LOG: V2 (2020/01/15)

* The app now directly reads the FM outputs to extract the data, thus meaning the Excel tool is obsolete. It is no longer included in the download.

* FFP Contribution and future time playing removed from the views (5 columns) as they are user-specific

* The app now dynamically install required packages if needed. First thing the code does is check if there are missing required packages and installs them. This means the installpackages.bat batch file is now obsolete. It is no longer included in the download.

* FMapp.bat now detects its current directory and uses it to launch the app. It is very important that you don't modify the file's structure! Instead of replacing 3 paths in the last version, you only need to replace 1, and it's a one-time process.

* DNA Model subsection was added in the Squad Analysis section. This enables you to select key attributes for your playing style and calculate a "DNA rating". Similarly to the Scouting section, the color code is used in the tables and the plots.

* Added status messages to show the user what's going on before the app is launched in their browser.

* Points in the plots have now a subtle black outline to make them more visible.

* Free players that have played competitive matches/have statistics available are no longer considered as NA values and will show in the table/plots. New Division entry in the filters: "Free player/unknown"

 

To use the new version of the app, download the entire app again from my Github. To avoid confusions, delete the previous versions. You do not need to install R again!

https://github.com/ybenadjal/FM-Data-Analytics

Edited by gam945
Link to post
Share on other sites

6 minutes ago, r70lla said:

Thanks @gam945

Everything works for me, except the squad analysis data is blank. Will the tool only report on league matches rather than friendly games?

 

 

Nice to hear it works! And yes the data is from competitive games (league/cup/etc). Afaik there's no way to extract friendly games stats. Has your squad played competitive matches?

Edited by gam945
Link to post
Share on other sites

1 minute ago, gam945 said:

Nice to hear it works! And yes the data is from competitive games (league/cup/etc). Afaik there's no way to extract friendly games stats. Has your squad played competitive matches?

No not yet, only in pre season. Will update shortly once the league starts.

Link to post
Share on other sites

34 minutes ago, r70lla said:

Tool works perfectly for me. Thank you !

Great! I think -and this was the general feedback I perceived from v1 version- that there was way too much "parts" to the app. Having eliminated the other batch file and the Excel tool certainly helped streamlining the application and make it more accessible.

I'll have a lot less free time to work on the app from now on, but I intend to focus on user interface for the next update, and maybe add some more stats (headers won vs height for example). It won't release as fast as the v2 version tho.

About your request comparing the squad's attributes, isn't it something we can actually do in FM? The spirit of this app was more to add value to FM's data (which is massively underused by users imo). But also to mirror real life analysis, and attributes isn't something you have access to in real life, contrarily to game statistics. So one of my ideas was to rely the least possible on attributes. DNA model/rating is the only example where I use attributes, and it's only for the squad. Essentially as if your coaching team grades your players on 100 based on your playing style.

Feel free to leave feedback/suggestions/requests or to share your experience with the app here and I hope my app will actually help you make some difficult decisions on the transfer market and in squad planning!

Edited by gam945
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...