<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jonathan Marcus on Medium]]></title>
        <description><![CDATA[Stories by Jonathan Marcus on Medium]]></description>
        <link>https://medium.com/@jonathan.marcus?source=rss-245a1aa83ca7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*03TEF4J8iucD4vAQ.jpg</url>
            <title>Stories by Jonathan Marcus on Medium</title>
            <link>https://medium.com/@jonathan.marcus?source=rss-245a1aa83ca7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:12:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jonathan.marcus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Can’t Teach an Old DAG New Tricks]]></title>
            <link>https://faun.pub/cant-teach-an-old-dag-new-tricks-16eee4a8fe62?source=rss-245a1aa83ca7------2</link>
            <guid isPermaLink="false">https://medium.com/p/16eee4a8fe62</guid>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[pipeline-as-code]]></category>
            <category><![CDATA[directed-acyclic-graph]]></category>
            <dc:creator><![CDATA[Jonathan Marcus]]></dc:creator>
            <pubDate>Tue, 22 Sep 2020 12:47:35 GMT</pubDate>
            <atom:updated>2021-01-05T11:10:43.386Z</atom:updated>
            <content:encoded><![CDATA[<h4>Better CI/CD and Data Pipelines with Trees</h4><p>Pipelines are everywhere in computing. CI/CD has <em>build</em>→<em>test</em>→<em>deploy</em> pipelines. Data science has <em>compute features</em>→<em>train model</em>→<em>backtest</em> pipelines. ETL literally means <em>extract</em>→<em>transform</em>→<em>load</em>. They are ubiquitous, everyone uses DAGs for them, and everyone is wrong.</p><h3>Pipelines as programs</h3><p>Let’s say I ask you to build a CI/CD pipeline to deploy a microservice-backed app into AWS. What steps do you take?</p><p><em>– At a high level, 1) stand up some basic AWS infrastructure, 2) build and deploy your containers, 3) test the new environment, and 4) swap it into place using a blue/green or canary strategy.</em></p><p>Wow, good answer. Hang on, I say, those are just high-level descriptions! How does, for example, step 2 work?</p><p><em>– For each microservice, build its Docker image, test the image, then deploy it to AWS.</em></p><p>Okay, but how do you test the image?</p><p><em>– Spin up the Docker container locally, send it requests, then tear it down</em>.</p><p>I get your point. You have a high-level idea of the tasks required, and each task is composed of ever-smaller tasks until the bottom level is just individual commands that you can execute. It’s just like programming, with high-level functions calling lower-level functions. If I ask you to draw a picture of this pipeline, you’ll probably draw something like this:</p><figure><img alt="An outline view of the pipeline from the previous paragraph." src="https://cdn-images-1.medium.com/max/342/1*EKdkxfCdJKAXkvTU2kvZtA.png" /></figure><p>So why does every pipeline tool look like this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekc6nElw9LvA_crUOSzArQ.png" /></figure><h3>The trouble with DAGs</h3><p>Common wisdom says that DAGs (directed acyclic graphs, basically a workflow that has no cycles) are the correct way to represent a pipeline. Jenkins, CircleCI, Airflow, Oozie, Luigi, Azkaban— there are hundreds of DAG tools, going back decades, that build pipelines with statements like “when A finishes, run B and C” or “only run Z once X and Y finish.” They are the most general and mathematically elegant formulation, no question.</p><p>The generality of DAGs comes at a price. When our pipeline is represented as a DAG, it loses all the structure that makes it sensible to humans. Every low-level task is a node in the graph, each is equally significant, and there are no groupings for concepts like “build and deploy your containers”. It is not for lack of trying that every visualization of a DAG is messy. The problem is too hard.</p><p>The lack of structure is also a hindrance when defining the DAG. Many tools like CircleCI or Jenkins use YAML files that define a big list of nodes and the dependencies that link them. With no structure to orient the developer, following the flow is challenging. Without the functions and abstractions that programming allows, the files get very repetitive. A YAML file will quickly become fragile, hampering further development.</p><h3>If not DAGs, then what?</h3><p>Go back to the natural illustration of the pipeline:</p><figure><img alt="An outline view of the pipeline from the previous paragraph." src="https://cdn-images-1.medium.com/max/342/1*EKdkxfCdJKAXkvTU2kvZtA.png" /></figure><p>That <em>looks</em> a lot like a directory tree. Would it be possible to just represent the pipeline as a tree, preserving all the structure?</p><p>Very possible, it turns out.</p><h3>Seeing the forest…</h3><p>Let’s model Step 2 as a tree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*Y6uIyehmQp_sXUoDrnsIBw.png" /></figure><p>The root is a <strong>Parallel</strong> node that runs each microservice at the same time. Each microservice is handled by a <strong>Serial</strong> node that builds, then tests, then pushes. The tests are run by another nested Serial node. The leaves of the tree are <strong>Exec</strong> nodes that run a command line or a function.</p><p>It makes sense visually. What does it look like in Python?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f68bf14c34c3d57d454c9e0ef1652a11/href">https://medium.com/media/f68bf14c34c3d57d454c9e0ef1652a11/href</a></iframe><p>The visualization follows naturally: the UI uses the tree explorer familiar to every computer user. It remains compact and understandable whether your pipeline has 5 nodes or 5,000,000 nodes by following one simple rule: each node contains a summary of all the nodes below it. Just expand to find out more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*42tY5bBiPjt9K1z1PdxciQ.gif" /></figure><h3>Pipelines as code</h3><p>Nodes should be normal objects that can be returned by functions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e926c55ed0c792fdceac51693e2fe6fa/href">https://medium.com/media/e926c55ed0c792fdceac51693e2fe6fa/href</a></iframe><p>Let’s generalize further. The entire “Build and Deploy” node can itself be returned by a function and used in a Serial node that runs the whole CI/CD pipeline. It could look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bdff107ccf9de8fe9de47260d07675b/href">https://medium.com/media/9bdff107ccf9de8fe9de47260d07675b/href</a></iframe><p>Take a second to think about this. The entire pipeline is just a regular program, following regular programming rules and abstractions. It never mentions a dependency. Instead of thinking about the details of which graph nodes point to which other graph nodes, we just break our problem into small, reusable functions. Each function returns a node that starts, does some work, and finishes when it’s done. Simple as that.</p><h3>But does it work?</h3><p>That isn’t pseudocode. Use <a href="https://conducto.com/">Conducto</a> to make it work by adding:</p><pre>from conducto import Parallel, Serial, Exec</pre><p><a href="https://conducto.com/">Conducto</a> is the pipeline tool—for CI/CD, data science, ETLs, and more—that is based on trees, not DAGs. Define your pipeline naturally in Python (JS and other languages coming soon), and interact with it intuitively in our beautiful UI. Run it for free on your laptop, or at scale in the Conducto cloud. It uses <a href="https://conducto.com/docs/basics/images">containers</a> to make the transition effortless. No pipeline tool would be complete without making it really easy to <a href="https://conducto.com/docs/basics/debugging">debug your errors</a> and polish your new features, and Live Debug is so good it’s almost magical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*3-Is40NlyvAQdj66kaVC7g.png" /><figcaption><a href="https://medium.com/conducto/easy-and-powerful-python-pipelines-2de5825375f2#d675">co.Lazy</a> allows for lazy pipeline definition. Sorry, tables are hard in Medium.</figcaption></figure><p>Not every problem can be solved with trees. Some problems truly need the flexibility of a DAG, and if you have one please let us know! Conducto’s co-founders <a href="https://medium.com/conducto/conducto-v1-483a813376f1">built its predecessor</a> to power one of the world’s top quantitative trading teams, driving billions of dollars in revenue over a decade. We used trees to handle massive machine learning pipelines, to store and index petabytes of data, and to continually deploy trading algorithms, optimized to the nanosecond. There were a few times when we wished for DAGs, but the vast majority of problems didn’t need it, and the simplicity of trees let us achieve all that with just a handful of engineers. Now Conducto does its own <a href="https://medium.com/conducto/supercharge-your-ci-cd-with-conducto-e701c4ea5be3">CI/CD in Conducto</a>, and it’s amazing.</p><p>We’ve built an incredible tool and we’re excited to share it. The world has plenty of DAG pipeline tools and zero tree pipeline tools. Well, now it has one. We hope you love it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p>👋 <a href="https://faun.dev/join"><strong>Join FAUN today and receive similar stories each week in your inbox!</strong></a><strong> </strong>️ <strong>Get your weekly dose of the must-read tech stories, news, and tutorials.</strong></p><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬</p><figure><a href="https://www.faun.dev/join?utm_source=medium.com/faun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cT0_laE4iPcqW1qrbstAg.gif" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16eee4a8fe62" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/cant-teach-an-old-dag-new-tricks-16eee4a8fe62">Can’t Teach an Old DAG New Tricks</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Weather Data Pipeline]]></title>
            <link>https://medium.com/conducto/write-a-data-science-pipeline-in-conducto-d44ffdb17ec8?source=rss-245a1aa83ca7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d44ffdb17ec8</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[workflow]]></category>
            <dc:creator><![CDATA[Jonathan Marcus]]></dc:creator>
            <pubDate>Thu, 09 Apr 2020 07:15:01 GMT</pubDate>
            <atom:updated>2020-07-29T20:29:32.878Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://medium.com/conducto/data/home">Conducto for Data Science</a></h4><p>This tutorial teaches how to make a simple <a href="https://www.conducto.com/">Conducto</a> pipeline to acquire raw data and visualize it.</p><p>Upon completion, you will understand how to use the following minimal components of Conducto.</p><ul><li><a href="#0526">co.Exec</a>, <a href="#ff55">co.Serial, and </a><a href="#ff55">co.Parallel</a> node classes,</li><li><a href="#b195">co.main() to make your pipeline executable</a>,</li><li><a href="#406c">co.data as an object store</a>, and</li><li><a href="#5bf5">Markdown to display data prettily</a></li></ul><p>View the <a href="https://github.com/conducto/demo/blob/main/data_science/examples/weather_data.py">source code</a>, or clone the <a href="https://github.com/conducto/demo">demo</a> and run it for yourself.</p><pre>git clone <a href="https://github.com/conducto/demo.git">https://github.com/conducto/demo.git</a><br>cd demo/data_science/examples<br>python weather_data.py --local</pre><p>Alternatively, download the zip archive <a href="https://github.com/conducto/demo/archive/master.zip">here</a>.</p><h3>Define Your Pipeline</h3><p>The task is to visualize some data provided by the United States Energy Information Administration.</p><p>To start, create an empty python file, let’s call it data_science.py, and import conducto.</p><pre>import conducto as co</pre><h4>Step 1: Download data with a shell command</h4><p>We will break down the problem into small steps. Ultimately, each command we want to run will be a Conducto <em>Exec</em> node that runs a shell command.</p><p>The first step is to download a dataset and save it to a data store. The shell command is a two-parter: part 1 uses curl to download the file; part 2 unzips and saves it to <em>co.data.user</em>, Conducto’s object store that is backed by local disk and scoped to your user.</p><pre>cmd = f&quot;&quot;&quot;<br>curl http://api.eia.gov/bulk/STEO.zip &gt; steo.zip<br>unzip -cq steo.zip | <strong>conducto-data-user puts --name {USER_DATA_PATH}<br>&quot;&quot;&quot;</strong></pre><p>We wrap this command in an Exec node.</p><pre>download_node = <strong>co.Exec(cmd)</strong></pre><h4>Step 2: Visualize with a Python function</h4><p>The second step loads the data, applies some transformations, and plots the results. Make a Python function to do this — don’t worry about the details, we’ll get to them later — and put co.main at the end of your script:</p><pre>def display(dataset):<br>    # ...</pre><pre><strong>if __name__ == &quot;__main__&quot;:<br>    co.main()</strong></pre><p>co.main allows you to call any of your file’s functions from the command line, like this.</p><pre>$ python data_science.py display --dataset=&#39;Heating Degree Days&#39;</pre><h4>Put it together with Parallel and Serial nodes</h4><p>A <em>Parallel</em> node has children that it runs at the same time. Use this to run three visualization steps, each of which is an Exec node, in parallel.</p><pre>display_node = <strong>co.Parallel()</strong><br>for dataset in DATASETS:<br>    display_node[dataset] = co.Exec(<br>        f&quot;python data_science.py --dataset=&#39;{dataset}&#39;&quot;<br>    )</pre><p>A <em>Serial</em><strong> </strong>node has children that run one after the other, stopping on the first error. Use this to first run the download step and then the three visualization steps.</p><pre>with <strong>co.Serial</strong>(image=IMG) as output:<br><em>    </em>output[&quot;Download&quot;] = download_node<br><em>    </em>output[&quot;Display&quot;] = display_node</pre><p>You saw earlier how co.main let you call methods from the command line. It also has special handling for methods that return a pipeline. To leverage this, wrap your pipeline in a function that returns the top-level node.</p><pre><strong>def run() -&gt; co.Serial:</strong><br>    with co.Serial(image=IMG) as output:<br>        # ...<br><strong>    return output</strong></pre><p>Conducto requires that you write a <em>type hint</em> to indicate the node return type of the function. Do not worry if type hints are new to you. Simply ensure that the first line of your function includes -&gt; co.[NodeClass], like this:</p><pre>def run() <strong>-&gt; co.Serial</strong>:</pre><h3>Execute Your Pipeline</h3><p>Executing your pipeline is easy. Call run (the name of your function above) from the command line with no additional arguments to pretty print your pipeline as a sanity check.</p><pre>$ python data_science.py run<br>/<br>├─0 Download   curl http://api.eia.gov/...<br>└─1 Display<br>  ├─ Heating   python data_science.py display --dataset=&#39;Heating&#39;<br>  ├─ Cooling  python data_science.py display --dataset=&#39;Cooling&#39;<br>  └─ Electric  python data_science.py display --dataset=&#39;Electric&#39;</pre><p>To execute the pipeline on your local machine add --local. <em>Local mode is always free</em> and your code and data never leave your machine. Run this and your browser will open and connect to the newly running pipeline.</p><pre>python data_science.py --local</pre><p>Coming soon, you will be able to effortlessly run the same pipeline in the cloud too.</p><pre>python data_science.py --cloud</pre><h3>Interact With Your Pipeline</h3><p>The script will automatically open the URL printed by the script in your browser. You can view and run your pipeline,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pK6R0LmAilJyEFpGpyplFA.png" /><figcaption>Explore the nodes in the left-hand <strong>pipeline pane</strong>. Your pipeline begins in the <strong>P</strong>ending state, so click the <strong>Run</strong> button (boxed in red) to begin executing the nodes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08LfS2bNChcX5nXFSGsxJw.png" /><figcaption>View output for any Exec node in the right-hand <strong>node pane</strong>.</figcaption></figure><h3>Implement the Python Function</h3><p>In step 2 we defined a Python function without implementing it. Let’s dig deeper to learn how to interact with the Conducto object store and display pretty results in the Conducto UI.</p><p>The Python function loads text from co.data.user, extracts a few datasets, and plots them. Consult the demo for the full implementation, which uses pandas, numpy, and matplotlib, but here is a summary.</p><h4>Object Store</h4><p>First, we read in the data from co.data.user and subset down to a few datasets.</p><pre>data_text = <strong>co.data.user.gets</strong>(USER_DATA_PATH)<br>all_data = [json.loads(line) for line in data_text.splitlines()]</pre><p>The datasets are time series. We use numpy to take the per-month average, and combine them into a single pandas DataFrame.</p><p>We graph the averages on a single plot using matplotlib and save it to local disk.</p><p>Then, we upload the image to <em>co.data.pipeline</em>, Conducto’s object store that is backed by local disk and scoped to the current pipeline. The Exec node runs in a Docker container and any local changes disappear when it finishes, so saving the image to co.data.pipeline allows us to view it from the app.</p><pre>dataname = f&quot;conducto/demo/data_science/{dataset}.png&quot;<strong><br>co.data.pipeline.put</strong>(dataname, filename)</pre><h4>Markdown</h4><p>Finally, we use markdown to display the image and the DataFrame. Get a link to the image using <strong>co.data.pipeline.url()</strong>, and use the DataFrame’s .to_markdown() to render it. By default, Exec node stdout and stderr display raw text, so wrap this in &lt;ConductoMarkdown&gt; tags for pretty formatting.</p><pre>print(f&quot;&quot;&quot;<br><strong>&lt;ConductoMarkdown&gt;<br></strong>![img]({<strong>co.data.pipeline.url</strong>(dataname)})<br><br>{df.to_markdown()}<br><strong>&lt;/ConductoMarkdown&gt;<br></strong>&quot;&quot;&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GX2ZPhEpym8obL5O-KzkZw.png" /><figcaption>Voila. A graph and a data table, all within the Conducto UI.</figcaption></figure><h3>How Much More Data Do You Need?</h3><p>This was a simple example, but once you add in <a href="https://medium.com/conducto/execution-environment-3bb663549a0c">Execution Environment</a>, <a href="https://medium.com/conducto/environment-variables-and-secrets-9acab502ec77">Environment Variables and Secrets</a>, <a href="https://medium.com/conducto/data-stores-f6dc90104029">Data Stores</a>, <a href="https://medium.com/conducto/node-parameters-7be236eaeaac">Node Parameters</a>, and <a href="https://medium.com/conducto/easy-and-powerful-python-pipelines-2de5825375f2">Easy and Powerful Python Pipelines</a>, you can easily express the most complex of data science pipelines in Conducto.</p><p>In my previous job, the predecessor to Conducto was the secret sauce that enabled our algorithmic trading team to run an ultra-productive data science and machine learning effort that has driven billions of dollars in revenue for a decade. Simply put, Conducto multiplied the impact of each team member by a lot.</p><p>How much more data do you need? Get started with Conducto now. Local mode is always free and is only limited by the cpu and memory on your machine. Cloud mode gives you immediate scale. Use the full power of python to write pipelines with ease. And, <a href="https://medium.com/conducto/easy-error-resolution-45ca08d40f1d#abd2">experience easy and painless error resolution</a>.</p><h3>Appendix: Full Code</h3><p>See the full code for this tutorial on <a href="https://github.com/conducto/demo/blob/master/data_science/examples/weather_data.py">GitHub</a>, and here’s a simplified version:</p><pre><strong>import</strong> collections, conducto as co, json, re<br><em><br></em>USER_DATA_PATH = &quot;conducto/demo/data_science/steo.txt&quot;</pre><pre>DOWNLOAD_COMMAND = f&quot;&quot;&quot;<br>curl http://api.eia.gov/bulk/STEO.zip &gt; steo.zip<br>unzip -cq steo.zip | conducto-data-user puts --name {USER_DATA_PATH}<br>&quot;&quot;&quot;.strip()<br><br>DATASETS = {<br>    &quot;Heating Degree Days&quot;   : r&quot;^STEO.ZWHD_[^_]*\.M$&quot;,<br>    &quot;Cooling Degree Days&quot;   : r&quot;^STEO.ZWCD_[^_]*.M$&quot;,<br>    &quot;Electricity Generation&quot;: r&quot;^STEO.NGEPGEN_[^_]*\.M$&quot;<br>}</pre><pre><em># co.Image is explained in a later article.<br></em>IMG = co.Image(&quot;python:3.8&quot;, copy_dir=&quot;.&quot;, reqs_py=[&quot;conducto&quot;, &quot;pandas&quot;, &quot;matplotlib&quot;, &quot;tabulate&quot;])<br><br><br><strong>def</strong> run() -&gt; co.Serial:<br><em>    &quot;&quot;&quot;<br>    Pipeline that downloads data from the US EIA and visualizes it.<br>    &quot;&quot;&quot;<br>    </em><strong>with</strong> co.Serial(image=IMG) <strong>as</strong> output:<br>        <em># First download some data from the US EIA.<br>        </em>output[&quot;Download&quot;] = co.Exec(DOWNLOAD_COMMAND)<br><br>        <em># Then make a few different visualizations of it.<br>        </em>output[&quot;Display&quot;] = co.Parallel()<br>        <strong>for</strong> dataset <strong>in</strong> DATASETS.keys():<br>            output[&quot;Display&quot;][dataset] = co.Exec(<br>                &quot;python data_science.py display &quot;<br>                f&quot;--dataset=&#39;{dataset}&#39;&quot;<br>            )<br>    <strong>return</strong> output<br><br><br><strong>def</strong> display(dataset):<br>    &quot;&quot;&quot;<br>    Read in the downloaded data, extract the specified<br>    datasets, and plot them.<br>    &quot;&quot;&quot;<br><em>    </em>data_text = co.data.user.gets(USER_DATA_PATH)<br>    all_data = [json.loads(line) <strong>for</strong> line <strong>in</strong> data_text.splitlines()]<br><br>    regex = DATASETS[dataset]<br>    subset_data = [d <strong>for</strong> d <strong>in</strong> all_data <strong>if</strong> &quot;series_id&quot; <strong>in</strong> d<br>                   <strong>and</strong> re.search(regex, d[&quot;series_id&quot;])]<br><br>    <strong>import</strong> matplotlib.pyplot <strong>as</strong> plt<br><em>    # ...</em></pre><pre><em>    # Save to disk, and then to co.data.pipeline<br>    </em>filename = &quot;/tmp/image.png&quot;<br>    dataname = f&quot;conducto/demo/data_science/{dataset}.png&quot;<br>    plt.savefig(filename)<br>    co.data.pipeline.put(dataname, filename)<br><br><em>    # Print out results as markdown<br>    </em>print(f&quot;&quot;&quot;<br>&lt;ConductoMarkdown&gt;<br>![img]({co.data.pipeline.url(https://medium.com/dataname)})<br><br>{df.transpose().round(2).to_markdown()}<br>&lt;/ConductoMarkdown&gt;<br>    &quot;&quot;&quot;)<br><br><br><strong>if</strong> __name__ == &quot;__main__&quot;:<br>    co.main()</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44ffdb17ec8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/conducto/write-a-data-science-pipeline-in-conducto-d44ffdb17ec8">Weather Data Pipeline</a> was originally published in <a href="https://medium.com/conducto">Conducto</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>