11 datasets found
  1. Grandpa Golf

    • kaggle.com
    Updated Sep 12, 2023
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    FletcherKennamer (2023). Grandpa Golf [Dataset]. https://www.kaggle.com/datasets/fletcherkennamer/grandpa-golf/code
    Explore at:
    CroissantCroissant is a format for machine-learning datasets. Learn more about this at mlcommons.org/croissant.
    Dataset updated
    Sep 12, 2023
    Dataset provided by
    Kagglehttp://kaggle.com/
    Authors
    FletcherKennamer
    Description

    My Grandpa asked if the programs I was using could calculate his Golf League’s handicaps, so I decided to play around with SQL and Google Sheets to see if I could functionally recreate what they were doing.

    The goal is to calculate a player’s handicap, which is the average of the last six months of their scores minus 29. The average is calculated based on how many games they have actually played in the last six months, and the number of scores averaged correlates to total games. For example, Clem played over 20 games so his handicap will be calculated with the maximum possible scores accounted for, that being 8. Schomo only played six games, so the lowest 4 will be used for their average. Handicap is always calculated with the lowest available scores.

    This league uses Excel, so upon receiving the data I converted it into a CSV and uploaded it into bigQuery.

    First thing I did was change column names to best represent what they were and simplify things in the code. It is much easier to remember ‘someone_scores’ than ‘int64_field_number’. It also seemed to confuse SQL less, as int64 can mean something independently. (ALTER TABLE grandpa-golf.grandpas_golf_35.should only need the one RENAME COLUMN int64_field_4 TO schomo_scores;)

    To Find the average of Clem’s scores: SELECT AVG(clem_scores) FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 8; RESULT: 43.1

    Remembering that handicap is the average minus 29, the final computation looks like: SELECT AVG(clem_scores) - 29 FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 8; RESULT: 14.1

    Find the average of Schomo’s scores: SELECT AVG(schomo_scores) - 29 FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 6; RESULT: 10.5

    This data was already automated to calculate a handicap in the league’s excel spreadsheet, so I asked for more data to see if i could recreate those functions.

    Grandpa provided the past three years of league data. The names were all replaced with generic “Golfer 001, Golfer 002, etc”. I had planned on converting this Excel sheet into a CSV and manipulating it in SQL like with the smaller sample, but this did not work.

    Immediately, there were problems. I had initially tried to just convert the file into a CSV and drop it into SQL, but there were functions that did not transfer properly from what was functionally the PDF I had been emailed. So instead of working with SQL, I decided to pull this into google sheets and recreate the functions for this spreadsheet. We only need the most recent 6 months of scores to calculate our handicap, so once I made a working copy I deleted the data from before this time period. Once that was cleaned up, I started working on a function that would pull the working average from these values, which is still determined by how many total values there were. This correlates as follows: for 20 or more scores average the lowest 8, for 15 to 19 scores average the lowest 6, for 6 to 14 scores average the lowest 4 and for 6 or fewer scores average the lowest 2. We also need to ensure that an average value of 0 returns a value of 0 so our handicap calculator works. My formula ended up being:

    =IF(COUNT(E2:AT2)>=20, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&8)))), IF(COUNT(E2:AT2)>=15, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&6)))), IF(COUNT(E2:AT2)>=6, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&4)))), IF(COUNT(E2:AT2)>=1, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&2)))), IF(COUNT(E2:AT2)=0, 0, "")))))

    The handicap is just this value minus 29, so for the handicap column the script is relatively simple: =IF(D2=0,0,IF(D2>47,18,D2-29)) This ensures that we will not get a negative value for our handicap, and pulls the basic average from the right place. It also sets the handicap to zero if there are no scores present.

    Now that we have our spreadsheet back in working order with our new scripts, we are functionally done. We have recreated what my Grandpa’s league uses to generate handicaps.

  2. f

    Raw data in excel sheet.

    • plos.figshare.com
    • datasetcatalog.nlm.nih.gov
    xlsx
    Updated Jan 7, 2025
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Azhar Iqbal; Mohmed Isaqali Karobari; Deepti Shrivastava; Kumar Chandan Srivastava; Bilal Arjumand; Hmoud Ali Algarni; Meshal Aber Alonazi; Muhsen Alnasser; Osama Khattak; Jamaluddin Syed; Reham Mohmad Attia; Asma Abubakar Rashed; Sherif El Sayed sultan (2025). Raw data in excel sheet. [Dataset]. http://doi.org/10.1371/journal.pone.0311391.s001
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jan 7, 2025
    Dataset provided by
    PLOS ONE
    Authors
    Azhar Iqbal; Mohmed Isaqali Karobari; Deepti Shrivastava; Kumar Chandan Srivastava; Bilal Arjumand; Hmoud Ali Algarni; Meshal Aber Alonazi; Muhsen Alnasser; Osama Khattak; Jamaluddin Syed; Reham Mohmad Attia; Asma Abubakar Rashed; Sherif El Sayed sultan
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Background and objectivesAim of the current study was to assess the perception, preference, and practice of endodontists and restorative dentists at different locations around the world about dental magnification instruments.Materials and methodsA multicenter, cross-sectional study was ethically approved from the local committee of bioethics. After thorough literature search, a questionnaire was designed and validated. Later, the questionnaire was distributed to 10% (53 participants) of the total planned participants to conduct a pilot study. Based on the feedback from these participants, any ambiguities or discrepancies observed in the items and content of the questionnaire was modified. The questionnaire was assessed for its internal consistency as part of validating the items with Cronbach’s alpha of 0.80. The completed questionnaire with an informed consent form for the participant was administered to the endodontists and restorative dentists in three different geographical regions namely MENA (Middle East and Northern Africa), British-Isles, and Indian Sub-continent using WhatsApp through the snowball convenience sampling technique.ResultsMajority of the participants were male (56.5%) and in the age group of 25–35 years (30.3%). About 68.9% were from Indian sub-continent, followed by the British-Isles (16.5%) and the least (14.6%) were from the MENA region. By large, the participants of the present study, strongly agreed that dental magnification devices improved ergonomics, quality of work, and should be considered as standard of care in modern endodontic. Flip-up magnifiers (51.1%) and medium (8x-16x) magnification were preferred by majority of the participants. About 46.3% of specialist reported that they always used devices for all operative and endodontic procedures, especially while locating hidden and canals and negotiating calcified canals. Participants practicing in British-Isles have 2.42 times (P

  3. f

    Excel file containing source data for Figs 1–4, 6, B and C in S1 Text.

    • plos.figshare.com
    xlsx
    Updated Oct 17, 2024
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Sarah E. Copeland; Santina M. Snow; Jun Wan; Kristina A. Matkowskyj; Richard B. Halberg; Beth A. Weaver (2024). Excel file containing source data for Figs 1–4, 6, B and C in S1 Text. [Dataset]. http://doi.org/10.1371/journal.pgen.1011437.s002
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Oct 17, 2024
    Dataset provided by
    PLOS Genetics
    Authors
    Sarah E. Copeland; Santina M. Snow; Jun Wan; Kristina A. Matkowskyj; Richard B. Halberg; Beth A. Weaver
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Excel file containing source data for Figs 1–4, 6, B and C in S1 Text.

  4. f

    Excel spreadsheet of data from articles.

    • plos.figshare.com
    zip
    Updated Jul 3, 2025
    + more versions
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Yuting Zhang; Juan Shang (2025). Excel spreadsheet of data from articles. [Dataset]. http://doi.org/10.1371/journal.pone.0327014.s002
    Explore at:
    zipAvailable download formats
    Dataset updated
    Jul 3, 2025
    Dataset provided by
    PLOS ONE
    Authors
    Yuting Zhang; Juan Shang
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    This study investigates pricing and coordination strategies for a dual-channel supply chain (DCSC), considering technological innovations in emergencies. We have established the DCSC model consisting of a manufacturer, a retailer, and an E-commerce platform (ECP). Whether manufacturers choose to invest in technological innovation during emergencies can be divided into traditional production mode and technological innovation mode. Using the reverse induction method to solve the Stackelberg game problem, explore the pricing and channel selection strategies of each member in a DCSC under different modes. In addition, a revenue-sharing contract for a DCSC under emergencies was designed and improved. Research has shown that under emergencies, consumers’ technological innovation preference can increase the profits of each member in the DCSC and manufacturers’ technological innovation level. Manufacturers are more willing to choose technological innovation mode rather than traditional production mode. However, an increase in the commission rate of ECP can hinder the level of technological innovation of manufacturers and affect the issue of choosing between offline channel and ECP channel. Specifically, when the commission rate exceeds a certain threshold, the offline channel should be chosen. Finally, traditional revenue-sharing contracts fail to effectively coordinate DCSC that incorporate technological innovation during emergencies. To address this limitation, an improved revenue-sharing contract is proposed, which enhances the level of technological innovation while achieving Pareto improvements within the DCSC.

  5. f

    Independent Data Aggregation, Quality Control and Visualization of...

    • arizona.figshare.com
    • datasetcatalog.nlm.nih.gov
    png
    Updated May 30, 2023
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Chun Ly; Jill McCleary; Cheryl Knott; Santiago Castiello-Gutiérrez (2023). Independent Data Aggregation, Quality Control and Visualization of University of Arizona COVID-19 Re-Entry Testing Data [Dataset]. http://doi.org/10.25422/azu.data.12966581.v2
    Explore at:
    pngAvailable download formats
    Dataset updated
    May 30, 2023
    Dataset provided by
    University of Arizona Research Data Repository
    Authors
    Chun Ly; Jill McCleary; Cheryl Knott; Santiago Castiello-Gutiérrez
    License

    CC0 1.0 Universal Public Domain Dedicationhttps://creativecommons.org/publicdomain/zero/1.0/
    License information was derived automatically

    Description

    AbstractThe dataset provided here contains the efforts of independent data aggregation, quality control, and visualization of the University of Arizona (UofA) COVID-19 testing programs for the 2019 novel Coronavirus pandemic. The dataset is provided in the form of machine-readable tables in comma-separated value (.csv) and Microsoft Excel (.xlsx) formats.Additional InformationAs part of the UofA response to the 2019-20 Coronavirus pandemic, testing was conducted on students, staff, and faculty prior to start of the academic year and throughout the school year. These testings were done at the UofA Campus Health Center and through their instance program called "Test All Test Smart" (TATS). These tests identify active cases of SARS-nCoV-2 infections using the reverse transcription polymerase chain reaction (RT-PCR) test and the Antigen test. Because the Antigen test provided more rapid diagnosis, it was greatly used three weeks prior to the start of the Fall semester and throughout the academic year.As these tests were occurring, results were provided on the COVID-19 websites. First, beginning in early March, the Campus Health Alerts website reported the total number of positive cases. Later, numbers were provided for the total number of tests (March 12 and thereafter). According to the website, these numbers were updated daily for positive cases and weekly for total tests. These numbers were reported until early September where they were then included in the reporting for the TATS program.For the TATS program, numbers were provided through the UofA COVID-19 Update website. Initially on August 21, the numbers provided were the total number (July 31 and thereafter) of tests and positive cases. Later (August 25), additional information was provided where both PCR and Antigen testings were available. Here, the daily numbers were also included. On September 3, this website then provided both the Campus Health and TATS data. Here, PCR and Antigen were combined and referred to as "Total", and daily and cumulative numbers were provided.At this time, no official data dashboard was available until September 16, and aside from the information provided on these websites, the full dataset was not made publicly available. As such, the authors of this dataset independently aggregated data from multiple sources. These data were made publicly available through a Google Sheet with graphical illustration provided through the spreadsheet and on social media. The goal of providing the data and illustrations publicly was to provide factual information and to understand the infection rate of SARS-nCoV-2 in the UofA community.Because of differences in reported data between Campus Health and the TATS program, the dataset provides Campus Health numbers on September 3 and thereafter. TATS numbers are provided beginning on August 14, 2020.Description of Dataset ContentThe following terms are used in describing the dataset.1. "Report Date" is the date and time in which the website was updated to reflect the new numbers2. "Test Date" is to the date of testing/sample collection3. "Total" is the combination of Campus Health and TATS numbers4. "Daily" is to the new data associated with the Test Date5. "To Date (07/31--)" provides the cumulative numbers from 07/31 and thereafter6. "Sources" provides the source of information. The number prior to the colon refers to the number of sources. Here, "UACU" refers to the UA COVID-19 Update page, and "UARB" refers to the UA Weekly Re-Entry Briefing. "SS" and "WBM" refers to screenshot (manually acquired) and "Wayback Machine" (see Reference section for links) with initials provided to indicate which author recorded the values. These screenshots are available in the records.zip file.The dataset is distinguished where available by the testing program and the methods of testing. Where data are not available, calculations are made to fill in missing data (e.g., extrapolating backwards on the total number of tests based on daily numbers that are deemed reliable). Where errors are found (by comparing to previous numbers), those are reported on the above Google Sheet with specifics noted.For inquiries regarding the contents of this dataset, please contact the Corresponding Author listed in the README.txt file. Administrative inquiries (e.g., removal requests, trouble downloading, etc.) can be directed to data-management@arizona.edu

  6. f

    T1 values for intraobserver reproducibility assessment; Excel data with...

    • figshare.com
    xlsx
    Updated Jan 26, 2024
    + more versions
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Sadahiro Nakagawa; Takahiro Uno; Shunta Ishitoya; Eriko Takabayashi; Akiko Oya; Wakako Kubota; Atsutaka Okizaki (2024). T1 values for intraobserver reproducibility assessment; Excel data with manual ROI placement by observer 1. [Dataset]. http://doi.org/10.1371/journal.pone.0297402.s006
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jan 26, 2024
    Dataset provided by
    PLOS ONE
    Authors
    Sadahiro Nakagawa; Takahiro Uno; Shunta Ishitoya; Eriko Takabayashi; Akiko Oya; Wakako Kubota; Atsutaka Okizaki
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    T1 values for intraobserver reproducibility assessment; Excel data with manual ROI placement by observer 1.

  7. f

    T1 values for interobserver reproducibility assessment; Excel data with...

    • plos.figshare.com
    xlsx
    Updated Jan 26, 2024
    + more versions
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Sadahiro Nakagawa; Takahiro Uno; Shunta Ishitoya; Eriko Takabayashi; Akiko Oya; Wakako Kubota; Atsutaka Okizaki (2024). T1 values for interobserver reproducibility assessment; Excel data with semiautomatic ROI placement by observer 1 and 2. [Dataset]. http://doi.org/10.1371/journal.pone.0297402.s007
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jan 26, 2024
    Dataset provided by
    PLOS ONE
    Authors
    Sadahiro Nakagawa; Takahiro Uno; Shunta Ishitoya; Eriko Takabayashi; Akiko Oya; Wakako Kubota; Atsutaka Okizaki
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    T1 values for interobserver reproducibility assessment; Excel data with semiautomatic ROI placement by observer 1 and 2.

  8. Excel file - systematic review support

    • figshare.com
    ods
    Updated Jan 19, 2016
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Gabriella Bastone (2016). Excel file - systematic review support [Dataset]. http://doi.org/10.6084/m9.figshare.1259060.v1
    Explore at:
    odsAvailable download formats
    Dataset updated
    Jan 19, 2016
    Dataset provided by
    figshare
    Authors
    Gabriella Bastone
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Literature search methods: A systematic review was done in November 2014 using the databases Web of Science and Google Scholar to collect and analyse the primary literature to date written about tool use and tool making behaviour in non-human animals. The search for publications on Google Scholar was done using the search terms “tool+using+making+animals”, including only articles, written in a non-limited period of time, sorted by relevance. Since Google Scholar provided a large amount of articles in a descending order from more relevant to less relevant, we detected relevant articles doing a first manual scan looking at the title and at the abstract until relevance was consistent, producing a total of 23 possible publications.The search for literature that was executed using the database Web of Science was done using the search terms “Tool*” (Topic) AND “Use* OR Utilization*” (Topic) AND “Mak*” (Topic) AND “Animal*”(Topic). This produced a result of 316 possible publications. Then we refined the results using the following search categories: “Behavioral Sciences”, “Ecology”, “Zoology”. We also selected only articles. After that, 9 articles were left. Then these underwent a title and abstract scan for relevance to the specific topic. The full text of the remaining articles was processed, and the articles that did not provide specific information about the occurrence of tool use and/or tool behaviour in animals were excluded. We also excluded all the secondary literature as reviewed primary literature without providing its own data. Articles whose content was not focused on the specified topic and articles whose data provided were not enough were also excluded. Of the 339 initial publications, 32 were screened: 2 were removed for not being primary research articles, 24 were directly related to the topic, 6 were excluded with reasons listed above. The remaining 24 studies included in the analysis were composed of experiments from 1973 to 2014. Out of 24 articles, 4 were written in 2005, 2 in 1982, 2 in 1990, 2 in 1994, 2 in 2003 and 2 in 2014. All articles that were included in this review were published in English in a total of 17 journals. Journal of Comparative Psychology published 4 articles out of 24 and Primates published 3. Analysis of the literature: Studies were coded by the geographical location (country's name), the duration (total lenght of the research measured in months), the type of the experiment performed ( observational, experimental), the common name of the animal observed or used as experimental subject, the activity that was the scope of the tool use behaviour, the kind of tool being used.

  9. f

    Excel spreadsheet containing, in separate sheets, the underlying numerical...

    • plos.figshare.com
    xlsx
    Updated Jun 21, 2023
    + more versions
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Elenia Toccafondi; Marine Kanja; Flore Winter; Daniela Lener; Matteo Negroni (2023). Excel spreadsheet containing, in separate sheets, the underlying numerical data presented in the manuscript. [Dataset]. http://doi.org/10.1371/journal.ppat.1011207.s007
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jun 21, 2023
    Dataset provided by
    PLOS Pathogens
    Authors
    Elenia Toccafondi; Marine Kanja; Flore Winter; Daniela Lener; Matteo Negroni
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Excel spreadsheet containing, in separate sheets, the underlying numerical data presented in the manuscript.

  10. Dataset for Tabata-Fukushima et al. Mitochondrial Complex I Reverse Electron...

    • figshare.com
    xlsx
    Updated Jan 9, 2024
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Paul Brookes (2024). Dataset for Tabata-Fukushima et al. Mitochondrial Complex I Reverse Electron Transfer ROS paper (Redox Biology, 2024). [Dataset]. http://doi.org/10.6084/m9.figshare.24585234.v2
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jan 9, 2024
    Dataset provided by
    Figsharehttp://figshare.com/
    Authors
    Paul Brookes
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Original data set for Fukushima et al study on mitochondrial ROS generation under conditions simulating early reperfusion injury. Microsoft Excel spreadsheet, with one tab/sheet for each figure. See "Read Me" tab for more details. Note - Tukey's post-hoc tests used "Real Statistics" Excel plug-in. Underlying calculations are not included, since they will only be visible to those with the plug-in installed in Excel.

  11. f

    Excel sheet containing annotations of the publicly available P. multocida...

    • plos.figshare.com
    xlsx
    Updated Jun 21, 2023
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Epshita A. Islam; Jamie E. Fegan; Takele A. Tefera; David M. Curran; Regula C. Waeckerlin; Dixon Ng; Sang Kyun Ahn; Chun Heng Royce Lai; Quynh Huong Nguyen; Megha Shah; Liyuwork Tesfaw; Kassaye Adamu; Wubet W. Medhin; Abinet Legesse; Getaw Deresse; Belayneh Getachew; Neil Rawlyk; Brock Evans; Andrew Potter; Anthony B. Schryvers; Scott D. Gray-Owen; Trevor F. Moraes (2023). Excel sheet containing annotations of the publicly available P. multocida genomes evaluated in Fig 1. [Dataset]. http://doi.org/10.1371/journal.ppat.1011249.s002
    Explore at:
    xlsxAvailable download formats
    Dataset updated
    Jun 21, 2023
    Dataset provided by
    PLOS Pathogens
    Authors
    Epshita A. Islam; Jamie E. Fegan; Takele A. Tefera; David M. Curran; Regula C. Waeckerlin; Dixon Ng; Sang Kyun Ahn; Chun Heng Royce Lai; Quynh Huong Nguyen; Megha Shah; Liyuwork Tesfaw; Kassaye Adamu; Wubet W. Medhin; Abinet Legesse; Getaw Deresse; Belayneh Getachew; Neil Rawlyk; Brock Evans; Andrew Potter; Anthony B. Schryvers; Scott D. Gray-Owen; Trevor F. Moraes
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Excel sheet containing annotations of the publicly available P. multocida genomes evaluated in Fig 1.

  12. Not seeing a result you expected?
    Learn how you can add new datasets to our index.

Share
FacebookFacebook
TwitterTwitter
Email
Click to copy link
Link copied
Close
Cite
FletcherKennamer (2023). Grandpa Golf [Dataset]. https://www.kaggle.com/datasets/fletcherkennamer/grandpa-golf/code
Organization logo

Grandpa Golf

Data from my Grandpa's Golf league that I reverse engineered

Explore at:
CroissantCroissant is a format for machine-learning datasets. Learn more about this at mlcommons.org/croissant.
Dataset updated
Sep 12, 2023
Dataset provided by
Kagglehttp://kaggle.com/
Authors
FletcherKennamer
Description

My Grandpa asked if the programs I was using could calculate his Golf League’s handicaps, so I decided to play around with SQL and Google Sheets to see if I could functionally recreate what they were doing.

The goal is to calculate a player’s handicap, which is the average of the last six months of their scores minus 29. The average is calculated based on how many games they have actually played in the last six months, and the number of scores averaged correlates to total games. For example, Clem played over 20 games so his handicap will be calculated with the maximum possible scores accounted for, that being 8. Schomo only played six games, so the lowest 4 will be used for their average. Handicap is always calculated with the lowest available scores.

This league uses Excel, so upon receiving the data I converted it into a CSV and uploaded it into bigQuery.

First thing I did was change column names to best represent what they were and simplify things in the code. It is much easier to remember ‘someone_scores’ than ‘int64_field_number’. It also seemed to confuse SQL less, as int64 can mean something independently. (ALTER TABLE grandpa-golf.grandpas_golf_35.should only need the one RENAME COLUMN int64_field_4 TO schomo_scores;)

To Find the average of Clem’s scores: SELECT AVG(clem_scores) FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 8; RESULT: 43.1

Remembering that handicap is the average minus 29, the final computation looks like: SELECT AVG(clem_scores) - 29 FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 8; RESULT: 14.1

Find the average of Schomo’s scores: SELECT AVG(schomo_scores) - 29 FROM grandpa-golf.grandpas_golf_35.should only need the one LIMIT 6; RESULT: 10.5

This data was already automated to calculate a handicap in the league’s excel spreadsheet, so I asked for more data to see if i could recreate those functions.

Grandpa provided the past three years of league data. The names were all replaced with generic “Golfer 001, Golfer 002, etc”. I had planned on converting this Excel sheet into a CSV and manipulating it in SQL like with the smaller sample, but this did not work.

Immediately, there were problems. I had initially tried to just convert the file into a CSV and drop it into SQL, but there were functions that did not transfer properly from what was functionally the PDF I had been emailed. So instead of working with SQL, I decided to pull this into google sheets and recreate the functions for this spreadsheet. We only need the most recent 6 months of scores to calculate our handicap, so once I made a working copy I deleted the data from before this time period. Once that was cleaned up, I started working on a function that would pull the working average from these values, which is still determined by how many total values there were. This correlates as follows: for 20 or more scores average the lowest 8, for 15 to 19 scores average the lowest 6, for 6 to 14 scores average the lowest 4 and for 6 or fewer scores average the lowest 2. We also need to ensure that an average value of 0 returns a value of 0 so our handicap calculator works. My formula ended up being:

=IF(COUNT(E2:AT2)>=20, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&8)))), IF(COUNT(E2:AT2)>=15, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&6)))), IF(COUNT(E2:AT2)>=6, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&4)))), IF(COUNT(E2:AT2)>=1, AVERAGE(SMALL(E2:AT2, ROW(INDIRECT("1:"&2)))), IF(COUNT(E2:AT2)=0, 0, "")))))

The handicap is just this value minus 29, so for the handicap column the script is relatively simple: =IF(D2=0,0,IF(D2>47,18,D2-29)) This ensures that we will not get a negative value for our handicap, and pulls the basic average from the right place. It also sets the handicap to zero if there are no scores present.

Now that we have our spreadsheet back in working order with our new scripts, we are functionally done. We have recreated what my Grandpa’s league uses to generate handicaps.

Search
Clear search
Close search
Google apps
Main menu