Coder Social home page Coder Social logo

tdf's Introduction

Build Status codecov

tdf

Installation

To install the package, use

devtools::install_github("alastairrushworth/tdf")

Usage

Load the package and check out the help file

library(tdf)
?editions

Quick summary of the columns and their contents

tibble::glimpse(editions)

Observations: 106
Variables: 20
$ edition       <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,…
$ start_date    <date> 1903-07-01, 1904-07-02, 1905-07-09, 1906-07-04, 1907-07-08, 1908-07-1$ winner_name   <chr> "Maurice Garin", "Henri Cornet", "Louis Trousselier", "René Pottier", …
$ winner_team   <chr> "La Française", "Conte", "Peugeot–Wolber", "Peugeot–Wolber", "Peugeot–…
$ distance      <dbl> 2428, 2428, 2994, 4637, 4488, 4497, 4498, 4734, 5343, 5289, 5287, 5380…
$ time_overall  <dbl> 94.55389, 96.09861, NA, NA, NA, NA, NA, NA, NA, NA, 197.90000, 200.480…
$ time_margin   <dbl> 2.98916667, 2.27055556, NA, NA, NA, NA, NA, NA, NA, NA, 0.13555556, 0.…
$ stage_wins    <dbl> 3, 1, 5, 5, 2, 5, 6, 4, 2, 3, 1, 1, 1, 4, 2, 0, 3, 4, 4, 2, 3, 5, 1, 2…
$ stages_led    <dbl> 6, 3, 10, 12, 5, 13, 13, 3, 13, 13, 8, 15, 2, 14, 14, 3, 6, 15, 13, 8,…
$ height        <dbl> 1.62, NA, NA, NA, NA, NA, 1.78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ weight        <dbl> 60, NA, NA, NA, NA, NA, 88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ age           <int> 32, 19, 24, 27, 24, 25, 22, 22, 26, 23, 23, 24, 33, 30, 33, 36, 34, 29…
$ born          <date> 1871-03-03, 1884-08-04, 1881-06-29, 1879-06-05, 1882-10-18, 1882-10-1…
$ died          <date> 1957-02-19, 1941-03-18, 1939-04-24, 1907-01-25, 1917-12-20, 1917-12-2…
$ full_name     <chr> NA, NA, NA, NA, "Lucien Georges Mazan", "Lucien Georges Mazan", NA, NA…
$ nickname      <chr> "The Little Chimney-sweep", "Le rigolo (The joker)", "Levaloy / Trou-t$ birth_town    <chr> "Arvier", "Desvres", "Paris", "Moret-sur-Loing", "Plessé", "Plessé", "
$ birth_country <chr> "Italy", "France", "France", "France", "France", "France", "France", "$ nationality   <chr> " France", " France", " France", " France", " France", " France", " Lu…
$ stage_results <named list> [[<data.frame[37 x 8]>, <data.frame[35 x 8]>, <data.frame[27 x …

Comments? Suggestions? Issues?

Any feedback is welcome! Feel free to write a github issue or send me a message on twitter.

tdf's People

Contributors

alastairrushworth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tdf's Issues

Rider start lists for current (and future?) edition(s)

Hi Alastair,

I love the package and found it when I was looking to do something similar.

I wanted to do some visualisation of this year's Tour and part of that would involve creating a dataframe for all of the riders taking part in the 2021 edition. I would hope to include name, age, stage results, number of previous Grand Tours, wins and more.

If you'd be happy to have a collaborator that is.

Thanks,
Will

Missing or misattibuted stages

Hi...I love this package, so feel bad about pointing this out, but In the nested stage_results column in some years where they did stages within stages (they show up as 10a, 10b, etc) the results from the a and b stages are duplicated. an example is 1938. Same results appear for 10a and 10b, and 10c doesn't appear. I noticed it when going back to the tidytuesday TDF data, and matching up stage results to the stage winners set they included & saw differences.

See the TDF 1938 wiki page for example. Might be a scraping issue? Or when it was nested? I'd offer a solution via pull request but my scraping skills are weak at best.

If you want I can dig in and isolate specific years. But I noticed it in 1938 and I think 1936 also. That's why I'm wondering if a general coding issue, so might apply to most/all stages where it was broken up to a, b, c.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.