Accessing ESPN’s New V3 API for Private Leagues: How We Got Here This marks post 3 of n of my 2019 ESPN Fantasy Football blog posts. In the last few months, ESPN upgraded their API from V2 to V3, breaking all of our previous work accessing and analysing the data from the API. In my last two posts, I explored how to access data from ESPN’s V3 API for public leagues.
Accessing ESPN Fantasy Football for Private Leagues In my previous post, I explained how to access the ESPN Fantasy Football’s new (V3) public API. But what if your league manager does not make the league public? Are you out of luck? In this post I’ll explain how to pass ‘cookies’ to ESPN and access private league data. To accomplish this, we’ll use… Python retriculate purrr Python?
ESPN’s New API (V3) In previous seasons, we’ve enjoyed relatively easy access to ESPN’s fantasy sports data. Sometime in the last few months, ESPN altered/upgraded their AP to V3. As I’ve tried to replicate previous analysis, old methods accessing the V2 API no longer work. Credit Where Credit Is Due Quick crash course on ESPN’s new #fantasyfootball API, #python focused — https://t.
Introduction Often times, I run simulations on my computer to help educate my students about different statistical topics. In doing this, I often end up running fairly “long” simulations that take up more time than what I’d like to use in the classrooms. Complaining about this let me to Googling, which, as usual, let me to a solution. Posted below is an example of what I learned with an accompanying ShinyApp which helps me explain bootstrapping to my students.
Inspiration At the 2019 New York R Conference, Emily Robinson gave a great talk called “Everything You Wanted to Know About Making R Packages but Were Afraid to Ask” (Note: This link will be live once the video is published). Emily Robinson is one of my ‘heros of R.’ I was honored to host her several years back a the United States Military Academy when she came to present her work on A/B Testing during her time at Esty.
It is our last summer at West Point! We will sure miss our cadets. To keep touch with everyone, I’ve created a ShinyApp (embedded below) that shows the location (and dates) of everyone over the summer training period. If you’d rather view the app outside the blog, here is the link -- --
Background One of my son’s favorite games he received for Christmas this year is UNO Attack. If you are not familiar with the rules, you can get up to speed here. In short, the rules are no different than usual UNO except when you cannot play, instead of taking a card, you press a button on an UNO card shooting contraption. Most of the time you get no cards, but some of the time it will “attack” with 1 or more cards.
Introduction In my previous post, I worked through how to get your league information from the ESPN and YAHOO APIs. The motivation for this project was to compare two leagues performances over the 2018 fantasy football season. As the ring leader of the West Point Department of Mathematical Sciences fantasy football league, we had 20 managers. This, of course, is too many for one league so we split the teams across two leagues.
Introduction Over Christmas 2017, my wife, Jill, resolved that our family (to include babysitters) would read our children over 1000 new books in 2018. More specifically, 29 December 2017 - 28 December 2018. A goal like this takes dedication, love, and of course, a Data Science-y approach. Special thanks to Ally, Zia, and Bookbuddy for help in accomplishing this goal! Also, special thanks to drob and juliasilge who privde the tidytext package and the entire R open-source community I rely on to do this analysis.
A Little About Dates in R Before we launch into any analysis that contains dates, we should know a few important nuggets about how R handles date-like objects. There are 3 date/time classes are built in to R - Date - POSIXct - POSIXlt Base R First, base R can read a string of text and convert it to a date class. To help it read the date, you must tell R what date format your character string should expect.