Ok so a few things before we dive right in… this is in layman’s terms (because I myself am a layman). This first section will detail the steps required to install R and RStudio, before you can get started with pulling data using worldfootballR. The world is your oyster if you have the drive to learn. Set up your code upfront, then simply rerun it to get consistent results. Importantly, anything programmed means it’s repeatable. R is an amazing programming framework that allows you to do a number of things, including data cleaning, performing statistical analysis and modeling and building fully customisable visualisations using the R programming language. You can find out a lot more about R as you get more experienced with the language on the home page, but all you need to know for now is that R will be another tool in your toolkit to perform the analyses you want to do. R is a language and environment for statistical computing and graphics. This post is designed to take any aspiring analyst with absolutely no R coding experience to being able to extract data programmatically using the worldfootballR R library. The only prerequisites to this post are that you have a computer, internet connection and the desire to analyse world football data. To my knowledge, only FBref provide the ability to export data to a file - the other two don’t, so you’d need to find some other way to get your data (painfully slow copy and paste), and that’s where worldfootballR come in. These three sites are regularly used by analysts the world over, however the package is constantly evolving and may include data from additional sites in the future. (shot locations data for matches played in the major leagues).(player market values, team transfer history, player transfer history) and,.(a whole host of data to analyse, including results, match stats, season long stats, player and team stats, etc).The package as at version 0.3.2 provides access to data from the following data sites: This post will focus on getting you up and running with data in your hands… or on your screens. What this post won’t be is an in depth how-to-code-in-R post - there are plenty of online resources, including MOOCs, posts, screencasts, etc to do that. The post will demonstrate how to use the package to extract your data programmatically and save it in a suitable file format that your report ingests, saving you the manual steps of extracting data from popular websites listed below.Īdditionally, I will also aim to demonstrate the visualisation tools available in R, if you so choose to invest the time into learning R.Ī final aim of the post is to highlight what’s possible in R for those new to R programming in the hope that it stokes enough interest to get you started on your R learning journey. This post will hopefully teach you how to use worldfootballR - an R package built to aid in the extraction of world football data from a number of popular websites (with their consent). Do you find your love of football and curious mind converging to the point where you want to dig a little into the data to confirm if what your eyes are seeing is in fact what’s happening, but you just don’t know how to get started, or where to get data from? Or maybe you have already started doing some analysis in visualisation software, including PowerBI, Tableau, Excel, etc, or know enough about statistics to want to perform some statistical modelling, but you just need to know how to get access to more data, quicker and easier? Then this post will be for you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |