<?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 Landung &quot;Don&quot; Setiawan on Medium]]></title>
        <description><![CDATA[Stories by Landung &quot;Don&quot; Setiawan on Medium]]></description>
        <link>https://medium.com/@donsetiawan?source=rss-74a79b40da98------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WIhx-6NIRrlBR1Bym0e2Jg.jpeg</url>
            <title>Stories by Landung &amp;quot;Don&amp;quot; Setiawan on Medium</title>
            <link>https://medium.com/@donsetiawan?source=rss-74a79b40da98------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:43:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@donsetiawan/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[Start working with data using Python (Part 1: Conda Stuff)]]></title>
            <link>https://donsetiawan.medium.com/start-working-with-data-using-python-part-1-conda-stuff-8111bbb1132f?source=rss-74a79b40da98------2</link>
            <guid isPermaLink="false">https://medium.com/p/8111bbb1132f</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[conda]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Landung "Don" Setiawan]]></dc:creator>
            <pubDate>Fri, 05 Feb 2021 04:52:02 GMT</pubDate>
            <atom:updated>2021-02-05T04:52:02.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IG8Krz2DcYPrKoxj" /><figcaption>Photo by <a href="https://unsplash.com/@davidclode?utm_source=medium&amp;utm_medium=referral">David Clode</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hey! Good to see you again. If this is your first time, welcome. 😃</p><p>On the last blog (<a href="https://donsetiawan.medium.com/start-working-with-data-using-python-part-0-the-setup-ac1b7c87df8f">Part 0: The Setup</a>), I introduced myself and covered <a href="https://conda.io/en/latest/"><strong>conda</strong></a><strong>, </strong>an <strong>open source </strong><strong>package and </strong><strong>environment management system</strong>. I also pointed to some resources containing instructions on how to install conda from either <a href="https://www.anaconda.com/products/individual"><strong>Anaconda</strong></a> or <a href="https://docs.conda.io/en/latest/miniconda.html"><strong>Miniconda</strong></a><strong> </strong>distribution.</p><p>Below I’m going to walk you through <em>how </em>to use conda. It definitely changed the way that I manage Python, R, JavaScript, and even trying out Golang Go.</p><h3>Managing Conda</h3><p>If you go through Part 0, you should have installed conda in your system. Let’s first start by checking if conda was installed correctly.</p><pre>conda --version</pre><h4>Conda Help and Manual</h4><p>To see the full documentation for any command, type the command followed by --help. For example, to learn about the conda update command:</p><pre>conda update --help</pre><p>Once it has been confirmed that conda has been installed, we will now make sure that it is up to date.</p><pre>conda update conda</pre><p>Conda will compare versions and let you know what is available to install. It will also tell you about other packages that will be automatically updated or changed with the update. <em>If there are newer version available, follow the instruction to install the newest version of conda.</em></p><h3>Managing Environments</h3><h4>What is a conda environment and why is it so useful?</h4><p>Using conda, you can create an isolated <em>environment</em> for your project. An <em>environment</em> is a set of packages that can be used in one or multiple projects.</p><p>There are two ways of creating a conda environment.</p><ol><li>An environment file in YAML format.</li><li>Manual specifications of packages within the command line.</li></ol><p>You can see what environment is currently activated by the prefix on the command line for example:</p><pre>(base) myMacBookPro:~ lsetiawan$</pre><p>This is my laptop terminal, you can see that the base environment is active.</p><blockquote>For best practice, I like to keep the base environment clean, which means not installing anything other than certain core packages (more on this later).</blockquote><p>You can get additional information by executing:</p><pre>conda info</pre><p>You can also list all the various conda environments in your system by executing:</p><pre>conda info --envs</pre><p>The current active environment will have a star (*) in the middle. You will probably only have one environment at this point called base. This is conda’s default environment.</p><pre># conda environments:<br>#<br>base                  *  /Users/lsetiawan/miniconda<br>airbnbsite               /Users/lsetiawan/miniconda/envs/airbnbsite<br>app-env                  /Users/lsetiawan/miniconda/envs/app-env<br>apps                     /Users/lsetiawan/miniconda/envs/apps</pre><h4>1. Creating environment with an environment file.</h4><p>Okay, I mentioned above that an environment file that conda uses is in yaml format. YAML? What’s that?</p><ul><li>YAML stands for YAML Ain’t Markup Language</li><li>It is a human friendly data serialization standard for all programming languages.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9561a6fa60a00c59b0b8b0c74a96ff32/href">https://medium.com/media/9561a6fa60a00c59b0b8b0c74a96ff32/href</a></iframe><p>So, right above is an example environment file called <strong>playenv.yaml. </strong>You can create this file by using a text/code editor.</p><blockquote>There are a lot of choices out there for text/code editor, but one I recommend is <a href="https://code.visualstudio.com/">VSCode</a> (Visual Studio Code). VSCode is an open source tool for code editing, it’s free and works with a lot of different programming languages!</blockquote><p>Once you have that file created, let’s install it so that we can create a conda environment called playenv.</p><pre>conda env create --file playenv.yaml</pre><p>To activate the environment, execute the command below:</p><pre>conda activate playenv</pre><p>Once activated, you should be able to run pyjoke and get a joke back:</p><pre>(playenv) myMacBookPro:medium lsetiawan$ pyjoke<br>Software developers like to solve problems. If there are no problems handily available, they will create their own.</pre><p><strong>Breaking down the environment file</strong></p><p>So, there are 3 main parts to the environment file: <em>name, channels, dependencies</em></p><p>name: This is the name of the environment.</p><p>channels: This is the channel where the conda package comes from. Think of it like an app store. More on this later …</p><p>dependencies: This is where you list out all the packages you want to get installed. As you can see we are installing python 3.7, however, we can easily install other version of python by changing the number.</p><h4>2. Create environment from the command line.</h4><p>Conda environment can be created by specifying the name, channel, and list of packages within the command line interface. In the example below, I am creating the same environment as above, but now it’s called playenv2 .</p><pre>conda create --name playenv2 --channel conda-forge --yes python=3.7 pyjokes</pre><p>You can see some similar keywords above such as name, channel, and a list of packages.</p><p><strong>Conda Environments Best Practice</strong></p><p>For best practice, I follow these steps:</p><ol><li>When starting a new environment, always generate it from an environment file rather than the command line.</li><li>As you add packages to the environment, be sure to update the environment file.</li><li>Unless you have to (i.e. Production Environments), try to avoid specifying the version of each package. This will ensure you have the most up to date version that will work across platform. If you follow these guidelines, you should be able to give your environment file to anyone, and they will be able to install your packages with no problem.</li></ol><h3>The basics of channels</h3><p>Within the environment file, there is a section called channels.</p><p><em>What is this? Why are channels so important?</em></p><p>I mentioned that you can think of channels like an app store. Channels are where conda packages are hosted. There are so many different channels and all of these channels live on <a href="https://anaconda.org/">Anaconda Cloud</a>. Go ahead and click on the Anaconda Cloud link and search <strong>pandas</strong> on the search bar. You can see that there seem to be a lot of copies of the package!</p><p>As you can see from the <a href="https://anaconda.org/search?q=pandas">search result</a> on Anaconda Cloud, the top one is called <strong>conda-forge/pandas</strong>. The conda-forge part is the channel name and pandas is the package name. This channel is actually one of the most popular channel in Anaconda Cloud, and one I recommend of using by default.</p><blockquote><a href="https://conda-forge.org/">Conda-forge</a> is a community led collection of recipes, build infrastructure and distributions for the conda package manager.</blockquote><blockquote>(Lot’s of jargon here, but basically it is a channel built by a community of people, even you can contribute to this channel in your later journey!) I’ve contributed to about <a href="https://github.com/conda-forge/staged-recipes/pulls?q=is%3Apr+author%3Alsetiawan+is%3Aclosed">13 packages</a> over the years.</blockquote><p>Without specifying any channel, conda actually have a default channel and packages from the default channel are located <a href="https://repo.anaconda.com/pkgs/main/">here</a>. I have learned to setup conda-forge as a channel to default to before searching to the actual default channel. You can follow the steps below to get it all set up also.</p><ol><li>To list out your channels and priorities: conda config --get channels</li><li>Add conda-forge to the top of the channels list so it can be prioritized: conda config --add channels conda-forge</li><li>Setup a strict channel policy so that packages will be installed from conda-forge unless they only exist on defaults: conda config --set channel_priority strict</li><li>Turn on <em>show channel url</em> settings so that you can always see where each package is installed from: conda config --set show_channel_urls True</li></ol><h3>Conda packages</h3><p>I should explain that a conda package is not just a python package. It is a compiled software package, that also include all of its dependencies even the lower level ones. A conda package is often cross platform and is built from a recipe.</p><p>You can see what packages has been installed by executing conda list.</p><pre># packages in environment at /Users/lsetiawan/miniconda/envs/playenv:<br>#<br># Name                    Version                   Build  Channel<br>ca-certificates           2021.1.19            hecd8cb5_0<br>certifi                   2020.12.5        py37hf985489_1    conda-forge<br>libcxx                    11.0.1               habf9029_0    conda-forge<br>libffi                    3.3                  h046ec9c_2    conda-forge<br>ncurses                   6.2                  h2e338ed_4    conda-forge<br>openssl                   1.1.1i               h35c211d_0    conda-forge<br>pip                       21.0.1             pyhd8ed1ab_0    conda-forge<br>pyjokes                   0.6.0                      py_0    conda-forge<br>python                    3.7.9           h6c3b2c9_0_cpython    conda-forge<br>python_abi                3.7                     1_cp37m    conda-forge<br>readline                  8.1                  h9ed2024_0<br>setuptools                52.0.0           py37hecd8cb5_0<br>sqlite                    3.34.0               h17101e1_0    conda-forge<br>tk                        8.6.10               hb0a8c7a_1    conda-forge<br>wheel                     0.36.2             pyhd3deb0d_0    conda-forge<br>xz                        5.2.5                haf1e3a3_1    conda-forge<br>zlib                      1.2.11            h7795811_1010    conda-forge</pre><p>So as you can see, our playenv environment installed more than just python and pyjokes package. Knowing this, often times you only need to list out the highest level of package and its dependencies will be installed.</p><p>Now let’s try install pandas to our playenv environment. Simply active the playenv environment to make sure that you’re in that.</p><pre># Activate playenv<br>conda activate playenv</pre><pre># Install pandas<br>conda install pandas</pre><p>You can see that pandas brings in many other packages. Follow the instruction to proceed to add all of those packages into the environment.</p><pre>Collecting package metadata (current_repodata.json): done<br>Solving environment: done</pre><pre>## Package Plan ##</pre><pre>environment location: /Users/lsetiawan/miniconda/envs/playenv</pre><pre>added / updated specs:<br>    - pandas</pre><pre>The following packages will be downloaded:</pre><pre>package                    |            build<br>    ---------------------------|-----------------<br>    libblas-3.9.0              |       8_openblas          11 KB  conda-forge<br>    libcblas-3.9.0             |       8_openblas          11 KB  conda-forge<br>    liblapack-3.9.0            |       8_openblas          11 KB  conda-forge<br>    numpy-1.20.0               |   py37ha9839cc_0         5.4 MB  conda-forge<br>    pandas-1.2.1               |   py37h010c265_0        10.4 MB  conda-forge<br>    ------------------------------------------------------------<br>                                           Total:        15.8 MB</pre><pre>The following NEW packages will be INSTALLED:</pre><pre>libblas            conda-forge/osx-64::libblas-3.9.0-8_openblas<br>  libcblas           conda-forge/osx-64::libcblas-3.9.0-8_openblas<br>  libgfortran        conda-forge/osx-64::libgfortran-5.0.0-9_3_0_h6c81a4c_17<br>  libgfortran5       conda-forge/osx-64::libgfortran5-9.3.0-h6c81a4c_17<br>  liblapack          conda-forge/osx-64::liblapack-3.9.0-8_openblas<br>  libopenblas        conda-forge/osx-64::libopenblas-0.3.12-openmp_h54245bb_1<br>  llvm-openmp        conda-forge/osx-64::llvm-openmp-11.0.1-h7c73e74_0<br>  numpy              conda-forge/osx-64::numpy-1.20.0-py37ha9839cc_0<br>  pandas             conda-forge/osx-64::pandas-1.2.1-py37h010c265_0<br>  python-dateutil    conda-forge/noarch::python-dateutil-2.8.1-py_0<br>  pytz               conda-forge/noarch::pytz-2021.1-pyhd8ed1ab_0<br>  six                conda-forge/noarch::six-1.15.0-pyh9f0ad1d_0</pre><pre>The following packages will be SUPERSEDED by a higher-priority channel:</pre><pre>ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --&gt; conda-forge::ca-certificates-2020.12.5-h033912b_0</pre><pre>Proceed ([y]/n)?</pre><p>There are so many different things to know about conda and I can’t cover all of them. I have walked you through the basics and given you my recommendations. For official walkthrough go to <a href="https://bit.ly/tryconda">https://bit.ly/tryconda</a>. For conda cheat sheet, go to <a href="https://tinyurl.com/y49fjnoj">https://tinyurl.com/y49fjnoj</a>.</p><p>For the next blog, I will go over git , a version control system. This is a very useful tool for your data journey 👍</p><p>If you have any questions or comments, please don’t hesitate to contact me at <a href="/service/mailto:landung.setiawan@gmail.com">landung.setiawan@gmail.com</a>. 😃 Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8111bbb1132f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Start working with data using Python (Part 0: The Setup)]]></title>
            <link>https://donsetiawan.medium.com/start-working-with-data-using-python-part-0-the-setup-ac1b7c87df8f?source=rss-74a79b40da98------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac1b7c87df8f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[setup]]></category>
            <dc:creator><![CDATA[Landung "Don" Setiawan]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 16:33:36 GMT</pubDate>
            <atom:updated>2021-02-05T04:54:43.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uc7HSDsZwxAuXLW1GqmFPg.jpeg" /><figcaption>Sunrise at the southern most point of USA (Hawaii). Photo credit: <a href="https://www.2dvisionsphotography.com/">2dvisionsphotography</a>.</figcaption></figure><p>Hello! Welcome. 👋</p><p>There are a lot of resources out there in learning Python or Data Science, however, it can be overwhelming to really start diving in. This was definitely my experience in the beginning of my career. I graduated with an Oceanography degree 5 years ago, and now I am working as a Software Engineer. I am a self-taught engineer with a lot left to learn 😄. I’d love to learn from you too!</p><p>In this series of blogs, I will be sharing what I’ve learned over the years and share resources/techniques/perspectives in the world of Data Science and Software Engineering.</p><h3>The Setup (Miniconda) 🐍</h3><p>Preparing my laptop to have the correct software installed was difficult. I started with Windows, moved on to Mac OS, and now I work with Linux. Among all of those operating systems, one piece of technology that works between them is <strong>conda</strong>.</p><p><a href="https://conda.io/en/latest/"><strong>conda</strong></a> is an <strong>open source </strong><strong>package and </strong><strong>environment management system for any programming language</strong>; though it is quite popular in the python community.</p><p>There are 2 distribution of conda: <a href="https://www.anaconda.com/products/individual"><strong>Anaconda</strong></a> and <a href="https://docs.conda.io/en/latest/miniconda.html"><strong>Miniconda</strong></a>. I have learned that since conda is able to create separate environments with whatever python packages you want, I use <em>Miniconda</em> since it’s much more lightweight and easier to install. I think that this is a good distribution to get started on, especially if you are still learning about all the various tools for data science.</p><p>You can find the installer for various operating systems by clicking on the links: <a href="https://docs.conda.io/en/latest/miniconda.html#windows-installers">Windows</a>, <a href="https://docs.conda.io/en/latest/miniconda.html#macosx-installers">MacOS</a>, <a href="https://docs.conda.io/en/latest/miniconda.html#linux-installers">Linux</a>. <em>I suggest installing the Python 3.8 Miniconda 3</em>.</p><p><strong>Installation instruction can be found </strong><a href="https://conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation"><strong>here</strong></a><strong>.</strong></p><p><strong>NOTE</strong>: If you already have python installed in your system please read <a href="https://conda.io/projects/conda/en/latest/user-guide/install/index.html#installing-conda-on-a-system-that-has-other-python-installations-or-packages">this</a> to make sure that you’re using python from conda.</p><p>For the rest of this series of blogs, I am going to demonstrate working with conda in the command line interface using <strong>bash</strong>. If you are on windows, I suggest installing <a href="https://gitforwindows.org/">git</a> for windows to have access to <em>git bash</em>. For MacOS or Linux, you can use the terminal application.</p><p>To check whether you successfully installed conda, simply run conda --version in the command line. This will output the current version of conda that you just installed 👍</p><h3>Jargon Glossary</h3><p><a href="https://docs.conda.io/en/latest/">conda</a>: An open source package and environment management system.</p><p><a href="https://www.anaconda.com/products/individual">Anaconda</a>: A distribution of conda that comes with a lot of data science packages. <em>“Your data science toolkit”.</em></p><p><a href="https://docs.conda.io/en/latest/miniconda.html">Miniconda</a>: A distribution of conda that’s lightweight and only comes with the minimal amount of packages for working with conda.</p><p><a href="https://git-scm.com/">git</a>: A version control system. It keeps track of changes to a piece of document. (More to come on this …)</p><p><a href="https://en.wikipedia.org/wiki/Command-line_interface">command line interface</a>: A piece of software application that allows you to execute commands.</p><p><a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">bash</a>: A command language interpreter, it’s sort of like python but for the command line. At the end of the day, you can run a set of commands with bash.</p><p>If you have any questions or comments, please don’t hesitate to contact me at <a href="/service/mailto:landung.setiawan@gmail.com">landung.setiawan@gmail.com</a>. 😃 Thanks for reading!</p><p>Next blog I continued with conda: (<a href="https://donsetiawan.medium.com/start-working-with-data-using-python-part-1-conda-stuff-8111bbb1132f">Part 1: Conda Stuff</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac1b7c87df8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>