(Edit via Slide Master) Name – Job Title [email protected] From R to Python Robert...
-
Upload
maximilian-lane -
Category
Documents
-
view
214 -
download
0
Transcript of (Edit via Slide Master) Name – Job Title [email protected] From R to Python Robert...
(Edit via Slide Master) Name – Job [email protected]
From R to Python
Robert MastrodomenicoGlobal Sports Statistics
Robert Mastrodomenico – Global Sports [email protected]
Schedule
About me
My experiences with R
Why I moved to Python
Whats so good about Python
Robert Mastrodomenico – Global Sports [email protected]
About meCompleted a PhD in statistical genetics at
University of Reading in 2008
Worked at Smartodds from 2007 to 2011
Setup Global Sports Statistics in 2011
Robert Mastrodomenico – Global Sports [email protected]
My experiences with RInitially used R at PhD level integrated with
C to do analysis
R was the primary programming language once I started work
R used for data analysis and maintenance tasks
Robert Mastrodomenico – Global Sports [email protected]
Why I moved to pythonR was used due to the ease of data
manipulation and large statistical library
However R was also being used for other tasks such web scraping and html/xml parsing
R was becoming the only choice used for scripting
Robert Mastrodomenico – Global Sports [email protected]
Why I moved to python
I first used python for an XML parsing task
Code was easy to write
Results were great
This got me curious about what else Python had to offer
Robert Mastrodomenico – Global Sports [email protected]
Dive into Python
To learn more about Python I read “Dive into Python”
Syntactically and stylistically Python was much different to R
The more I learnt the more I used it
Robert Mastrodomenico – Global Sports [email protected]
Setting up by myself
In 2011 Global Sports Statistics was created
Everything had to be setup from scratch
Used the opporunity to do something different
Robert Mastrodomenico – Global Sports [email protected]
Why Change?
Development is faster in Python
Easy to write Object Orientated code
Fantastic Library of packages
Sometimes a change is good!
Robert Mastrodomenico – Global Sports [email protected]
What Python has to offer
Pandas: Data Analysis Library
Django: High Level Web Framework
NumPy: Package for numerical computing
SciPy: Routines for numerical Integration and Optimization
Robert Mastrodomenico – Global Sports [email protected]
What Python has to offer
Matplotlib: 2-D plotting
Flask: Microframework
Mechanize: Programatic Web Browsring
BeautifulSoup: Html Scraping
PyQt: GUI building
Robert Mastrodomenico – Global Sports [email protected]
Rpy2
But what if you want to use an R package
Rpy2 allows use of any R functionality from within Python
It also supports use of any packages that R has to offer
Robert Mastrodomenico – Global Sports [email protected]
Why move to Python
Im not saying you need to
However I believe a lot of what people do in R can be done faster in Python
Try it out whats the worst that can happen?