Documentation for Understat

in #understat6 years ago


understat.png


https://github.com/amosbastian/understat

<h3>What is <strong>Understat? <p dir="auto">It's a Python wrapper for the website <a href="https://understat.com/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Understat, which provides revolutionary football metrics multiple leagues. An example of this is expected goals (xG), which is the main new revolutionary football metric, and allows you to evaluate team and player performance. In a low-scoring game such as football, the final score does not really provide a clear picture of the teams' performances, and this is why more and more sports analytics turn to the advanced models like xG, which is a statistical measure of the quality of chances created and conceded. Understat's goal was to create the most precise method for shot quality evaluation. They did this by training neural network prediction algorithms with a large dataset (>100,000 shots, over 10 parameters for each), and have now made this data available for the public! <hr /> <p dir="auto">Yesterday I posted about <a href="https://steemit.com/understat/@amosbastian/a-small-update-to-understat" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">a small update, and in there I mentioned I had written some documentation for it as well. In this post I'll detail what kind of documentation I added exactly! <p dir="auto"><span><a href="https://github.com/amosbastian/understat/pull/2" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/amosbastian/understat/pull/2 <p dir="auto">The pull request also includes the functions I added, so I'm sorry for that. You can find the changes relevant to this update in the <code>.rst files. Basically I added documentation for all the functions in the Understat class, and also some documentation about installing and contributing, which I copied from the documentation of my other package, <strong>fpl: <p dir="auto"><span><a href="https://understat.readthedocs.io/en/latest/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://understat.readthedocs.io/en/latest/ <h3>Homepage <p dir="auto"><center><br /> <img src="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQma8C3bKdzWL5tMaiH24oXkpAnj4oME3Gvfpep8SuuMteq/image.png" srcset="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQma8C3bKdzWL5tMaiH24oXkpAnj4oME3Gvfpep8SuuMteq/image.png 1x, https://images.hive.blog/1536x0/https://cdn.steemitimages.com/DQma8C3bKdzWL5tMaiH24oXkpAnj4oME3Gvfpep8SuuMteq/image.png 2x" /><br /> <p dir="auto">I've added a basic example showing how to use <strong>understat with <code>asyncio and <code>aiohttp. I've also added three sections, one for installing it, one for all the functions in the Understat class, and another about contributing. <h3>Installation <p dir="auto"><center><br /> <img src="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmUe7uX6TDeK4bXysbq7dsyxkCzr9caQGTCrosgFTQ1kS7/image.png" srcset="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmUe7uX6TDeK4bXysbq7dsyxkCzr9caQGTCrosgFTQ1kS7/image.png 1x, https://images.hive.blog/1536x0/https://cdn.steemitimages.com/DQmUe7uX6TDeK4bXysbq7dsyxkCzr9caQGTCrosgFTQ1kS7/image.png 2x" /><br /> <sup><span><a href="https://understat.readthedocs.io/en/latest/user/installation.html" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://understat.readthedocs.io/en/latest/user/installation.html<br /> <p dir="auto">As you may expect, installing a Python package isn't exactly difficult, and so I've just copied the instructions from <strong>fpl's documentation, and changed all references to <strong>fpl to <strong>understat. <h3>The functions <p dir="auto"><center><br /> <img src="https://images.hive.blog/768x0/https://i.imgur.com/uAwcdEQ.png" alt="![](https://i.imgur.com/uAwcdEQ.png)" srcset="https://images.hive.blog/768x0/https://i.imgur.com/uAwcdEQ.png 1x, https://images.hive.blog/1536x0/https://i.imgur.com/uAwcdEQ.png 2x" /><br /> <sup>Documentation for the <code>get_teams()<span> function. See: <a href="https://understat.readthedocs.io/en/latest/classes/understat.html" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://understat.readthedocs.io/en/latest/classes/understat.html for the rest of the documentation.<br /> <p dir="auto">Unlike the other parts of the documentation this was made completely from scratch. Since there isn't an API, it's pretty important for people to understand what kind of information they are getting and in what kind of format. Because of this I've added usage examples for <em>every function, with also example output. <p dir="auto">Of course this means there is A LOT of documentation for people to go through, but I think this was the best way of doing it. Now they don't have to run the functions themselves to see what the output is, and can simply check the documentation for a reference. <p dir="auto">As you can see in the image above (showing an example of the documentation for <strong>1<span> of the functions), I've also included screenshots taken on <a href="https://understat.com/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://understat.com/ to show people, who are probably used to using the website, the equivalent data found on there. I also think this will give a good idea to users of what to expect from the output, and so they'll understand the functions easier and more quickly. <h3>Contributing <p dir="auto"><center><br /> <img src="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmQFcaZaBYiuNmrqH6HknRMbE14XxagTRFeKnqgn88Ytvj/image.png" srcset="https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmQFcaZaBYiuNmrqH6HknRMbE14XxagTRFeKnqgn88Ytvj/image.png 1x, https://images.hive.blog/1536x0/https://cdn.steemitimages.com/DQmQFcaZaBYiuNmrqH6HknRMbE14XxagTRFeKnqgn88Ytvj/image.png 2x" /><br /> <sup><span><a href="https://understat.readthedocs.io/en/latest/contributing/contributing.html" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://understat.readthedocs.io/en/latest/contributing/contributing.html<br /> <p dir="auto">Just like the installation section, this was copied completely from my other package <strong>fpl. Not much to say here because of that, but hopefully it will help people if they are interested in contributing. <h3>Roadmap <p dir="auto">I'm going to be posting about it on Reddit today, so hopefully I will get some more people interested in using it (and maybe also contributing). Maybe they will even come up with some suggestions as well, and depending on the feedback received the roadmap will change, so I'll wait and see.
Sort:  

Hello @amosbastian,

This was a great contribution from your end.

As I have seen you have greatly improved in writing documentation contribution since you started.

This contribution uses all latest standards for writing documentation which is great to see.

This is my first time seeing contribution by you in this project so I would look more into what's the project about :).

This contribution is selected as a staff pick as it shows a good amount of work done.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @ms10398! Keep up the good work!

Hi, @amosbastian!

You just got a 0.05% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hi @amosbastian!



Feel free to join our @steem-ua Discord serverYour post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!

Hey, @amosbastian!

Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the documentation category on Utopian for being of significant value to the project and the open source community.

We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
SteemPlus or Steeditor). Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!