Let’s stroll by way of the method of taking a Jupyter Pocket book you’ve been engaged on and sharing it with others utilizing GitHub Gists. If the considered new instruments and platforms feels intimidating proper now, don’t fear. Gists had been constructed to simplify the method of exhibiting off your work with out requiring you to dive headfirst into complicated Git instructions. By the tip of this tutorial, you’ll have a shareable hyperlink you’ll be able to put up anyplace, from a portfolio web site to a dialogue discussion board, to showcase your undertaking or collect suggestions.
Earlier than You Start
Earlier than we begin, ensure you have a GitHub account. Creating one is straightforward, simply head over to github.com and observe the sign-up prompts. You’ll additionally wish to have your accomplished undertaking Jupyter pocket book or different file kind prepared. For Python initiatives on Dataquest, that is the .ipynb
file you produced whereas finishing a guided undertaking. In the event you haven’t downloaded it but or aren’t positive how, we’ll cowl that in a second.
Why Gists Matter
Sharing code information might be tough should you’ve by no means accomplished it earlier than. For instance, should you open a Jupyter pocket book file instantly in your laptop with out having Jupyter put in, you’ll see a bunch of uncooked textual content and JSON-like formatting as an alternative of good, clear renderings of your code and visualizations. That is the place Gists can are available in. They mechanically render .ipynb
information on-line so anybody with the hyperlink can view your code cells, plots, and analyses identical to you see them on-line or in your native coding atmosphere. What’s extra, Gists allow you to monitor totally different variations of your work, so you’ll be able to replace your undertaking should you obtain suggestions or uncover a typo.
Step One: Put together your File
In case your undertaking lives on Dataquest’s platform or one other on-line house, you’ll must obtain it. You are able to do this by finding your pocket book within the interface after which choosing the file. Search for an choice to obtain, usually discovered both in a menu or by right-clicking on the file’s title. After downloading, rename the file to one thing descriptive, like nyc_school_data_demo.ipynb
. This helps you keep in mind which undertaking it’s, particularly should you plan on sharing a number of initiatives. Under are examples of downloading could appear like for each widespread variations of Jupyter: Jupyter Pocket book and Jupyter Lab.
Jupyter Pocket book Obtain

Jupyter Lab Obtain
Step Two: Create a New Gist on GitHub
Subsequent, head to gist.github.com and register. When you’re there, you’ll see a clean house prompting you to create a brand new Gist. You’ll be able to both drag and drop your file onto the web page or copy/paste your code. At this level, you would possibly see the file’s uncooked textual content, however that’s fully regular. GitHub will correctly render every part when you full a couple of last steps.
Step Three: Title, Describe, and Select Visibility
Proper above the principle content material space, you’ll be able to add a brief description of your pocket book. As an illustration, you would possibly write “Guided Venture: Evaluation of NYC Faculty Information (Dataquest)” should you simply accomplished the NYC Faculty undertaking on the platform. If utilizing Jupyter, be sure the filename ends with .ipynb
so GitHub is aware of to deal with it like a Jupyter Pocket book.
You’ll additionally discover a button with dropdown choices on your Gist’s visibility: Public or Secret. Public Gists might be discovered by anybody, even through serps, and are greatest if you wish to share your work extensively. Secret Gists received’t present up usually searches however can nonetheless be accessed if somebody has the direct hyperlink. In the event you’re nervous about making your work too seen too quickly, be happy to maintain it secret till you’re prepared.
Step 4: Affirm the Pocket book Rendering
When you’ve created the Gist, it’s best to see your pocket book wanting very like it did whereas engaged on the undertaking code, together with any charts or tables you had in your last output cells. If one thing doesn’t look proper—maybe the file reveals uncooked JSON—double-check that you just included the .ipynb
extension once you named the file.
Step 5: Share Your Hyperlink and Collect Suggestions
Your Gist now has its personal URL, which you’ll be able to copy from the tackle bar on the high of your browser. You’ll be able to put up it on social media, embed it in a private web site, or add it to your portfolio web page. In the event you’d like to gather suggestions, share the hyperlink with friends or mentors and invite them to go away feedback instantly on the Gist.
Some communities, together with Dataquest’s personal boards, can help you put up a hyperlink to your undertaking in devoted areas for suggestions. It’s useful to let individuals know you’re utilizing a Gist in the event that they’re not accustomed to it so that they perceive that clicking the hyperlink will deliver them to a rendered pocket book.
You may additionally wish to embrace attribution or quotation credit for any information, photos, or code you borrowed. A simple manner to do that is by leaving a Gist remark that briefly states the supply and the way the fabric was used. For instance, should you used a dataset from Kaggle, you possibly can remark, “Information courtesy of [Dataset Name] from Kaggle, retrieved from https://www.dataquest.io/weblog/sharing-your-project-with-github-gists/.” This fashion, anybody viewing your Gist can rapidly see the place your supplies got here from and provides correct credit score.
Conserving Your Gist Up to date
Let’s say somebody suggests a change to your code, otherwise you discover a small error in your evaluation. You’ve gotten two choices for updates:
- Minor Edits: If it’s only a typo or a small wording change, click on the “Edit” button in your Gist, scroll by way of the uncooked code, and make the edit proper there. If you save, GitHub will preserve monitor of the revisions in a “Revisions” tab, the place you’ll be able to see a “diff” exhibiting precisely what modified.
-
Main Modifications or New Code: Possibly you have to alter the colour of a plot or appropriate a calculation. In that case, open your unique pocket book in Dataquest (or in one other Jupyter atmosphere), make the modifications, re-run all of the cells, and obtain a contemporary copy. Then return to your Gist, select “Edit,” take away the outdated code, and drag-and-drop the brand new file. Your Gist’s revision historical past will preserve monitor of all these modifications, so that you by no means lose earlier variations.
Troubleshooting Frequent Points
In case your pocket book doesn’t render immediately, verify that the file has the .ipynb
extension. Often, the web page may have a fast refresh. In case your plots aren’t displaying, it is likely to be that you just downloaded your file earlier than working all of the cells—working them once more and re-downloading ought to repair that. Additionally, keep in mind that a Gist is supposed primarily for sharing (and optionally commenting on) static notebooks. In the event you’re searching for a spot the place individuals can run your code instantly, you’ll wish to discover extra superior GitHub options or full repositories.
Subsequent Steps and Last Ideas
By placing your undertaking on a Gist, you’re already one step into the world of model management, which tracks modifications over time and permits others to contribute suggestions. You don’t must study complicated Git instructions for this—simply edit your Gist and let GitHub deal with the remaining.
From right here, contemplate including your Gist hyperlinks to any private portfolio websites, resumes, or social media pages. In the event you’re searching for structured suggestions from different learners or mentors, hop onto the Dataquest boards (or any neighborhood you belong to) and drop your Gist hyperlink. The extra you share your work, the simpler it turns into to refine your expertise and showcase them confidently.
Congratulations, you’ve simply made your undertaking simply accessible to anybody with an web connection. Gists are a easy but highly effective device for sharing your information evaluation work, they usually offer you a style of what it’s prefer to handle, replace, and iterate on initiatives with out getting overwhelmed by the main points of conventional Git workflows. Be at liberty to discover and create extra Gists for future initiatives, and even mix a number of information into one Gist to maintain associated work in a single place. Good luck, and glad coding!