Jekyll2023-02-01T13:30:35+00:00https://www.chipoglesby.com/feed.xmlChip OglesbyData Engineer in Canton, NC | Taking it one day at a timeDialing in my workflow: Markdown2022-03-25T00:00:00+00:002022-03-25T00:00:00+00:00https://www.chipoglesby.com/2022/03/markdown-is-awesome<p>Part of what I’ve been doing more of lately is writing documentation for
various projects.
It’s interesting all of the various different formats that files can be stored
in. The most common are
probably word document files (Google & Microsoft), XLS (Microsoft Excel &
Google Sheets) and
PDF files.</p>
<p>For example, writing tech specs for clients usually involves writing them in Google Sheets or
Microsoft Word files, but the formatting for these are usually terrible.</p>
<p>But lately I’ve started using Markdown for just about everything. Even though
there are many flavors of markdown, I’m trying to stick to the
<a href="https://github.github.com/gfm/">Github Flavored Markdown</a>.</p>
<p>I really like taking notes and writing documentation in Markdown because it can
easily be created and written in any text editor or IDE. There’s no special
software that requires vendor lock-in like Google or Microsoft.</p>
<p>Even the blog that I’m writing in right now supports writing posts in Markdown
and rendering them with Jekyll.</p>
<p>If you’re a windows or Mac user there’s also plenty of apps like Inkdrop
that make note-taking, etc super simple on these platforms.</p>
<h2 id="so-why-do-you-prefer-markdown">So Why Do You Prefer Markdown?</h2>
<p>I like Markdown because of the simplicity. For example, using
<a href="https://github.github.com/gfm/">Github Flavored Markdown</a>, you can open
Notepad and just start writing. You don’t have to worry about the graphic
display of text, you can just focus on writing.</p>
<p>Markdown isn’t the only format out there, but it’s what’s most commonly
accepted for version control tools like BitBucket, Gitlab and Github. I’m
sure that there are others that can do things differently, but for right now,
this is okay.</p>
<p>Markdown is also easy to use. Publishing documentation to Github pages is very
straightforward because Github handles all of the heavy-lifting for you. If you
need to save your Markdown files as PDF, there are also plenty of tools for
that.</p>
<p>Using free tools like VSCode makes working with Markdown even easier to use.
I personally prefer writing in plain-text but there are extensions for VSCode
that let you preview what your Markdown will look like, if that’s your thing.</p>
<p>Since Markdown files are plain-text with markup in them, it’s great if you’re
using version control software. The plain text files also make them more
human and machine readable.</p>
<p>When I’m writing documentation, Markdown lets you easily enter codeblocks
with just a little formmating.</p>
<p>Markdown doesn’t replace everything though. There are still specific needs
for things like Spreadsheets and Word Documents, but you always want to be
careful to choose the right tool for the job.</p>Chip Oglesbychip@creativesparkcolumbia.comThere are so many advantages of Markdown I'm surprised everyone isn't using it.Apple’s product strategy is really confusing2022-03-16T00:00:00+00:002022-03-16T00:00:00+00:00https://www.chipoglesby.com/2022/03/what-is-apple-doing<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>TL;DR:
Apple should:
1. End the iPad and iPad Air, 13" Macbook Pro, 14" Macbook Pro, 24" iMac and Mac Mini.
2. Since the iPad Pro has the M1 chipset, upgrade the operating system to the full Apple OS.
3. Rebrand the remaining iPads as entry level computers for consuming content.
4. Upgrade the iPad Pro the M1 Pro and the iPad Mini the M1 chip.
5. Include the iPad Mini with every Mac Studio and Mac Pro as an On The Go content management device.
6. Add cellular connectivity to the 16" Macbook Pro.
Also:
Before I begin, here's the point of view that I'm approaching this from: Most of Apple's
current devices are overkill for 90% of its current audience. The M1 chip and future
iterations are overkill for what most people use their computers for, consuming content.
</code></pre></div></div>
<p>My first Apple computer was the Powerbook G4 that I purchased in 2006. Just a few months after
buying it, Apple announced that they were moving away from the Power PC proccessors to Intel Chips.
14 years later they’ve done it again by introducing the ARM based M1 chip designed by Apple.</p>
<p>Since I’ve purchase my Pixelbook Go, I’ve been more interested in Apple’s computers than I have
in a long time. This past week Apple had an unveiling event where they released the new iPad Air,
Mac Studio and some other devices.</p>
<p>I’ve spent some time browsing Apple’s website and I will admit that I’m pretty confused about what
they’re doing with all of their products.</p>
<p>In 2020 after years of research and development, Apple has unveiled their new M1 computer chips which is leaps
and bounds ahead of what a lot of the competition is doing. Their current chips are the M1, M1 Pro, M1 Max
and M1 Ultra. Their device lineup is also multiple iPad models, Mac Mini, Mac Studio, Macbook Air, Macbook Pro,
iMac, and Mac Pro.</p>
<p>This is where it gets interesting. Their iPad Pro that’s completely built out is just as powerful as the
top of the line Macbook Air AND 13” Macbook Pro.</p>
<p>The M1 chip in all three of these computers have an 8-core CPU with 4 performance cores and 4 efficiency cores,
8-core GPU and a 16-core Neural Engine. In laymen terms, this chip has A LOT of power, more than most other
chips from the past.</p>
<p>So why does Apple have four devices that are almost the same? I don’t understand why Apple has put such a powerful
chip in the iPad Pro and iPad Air when it is so limited by the iPad operating software.</p>
<p>Apple could clear up a lot of decision fatigue by removing a lot of their overlapping products. I also hope that if
they ultimately replace all the iPad chips with the M1, they’ll replace the iPad OS with the full version of Apple’s
OS to make them truly capable computers.</p>
<p>Imagine an Apple lineup of devices that is just:</p>
<ul>
<li>iPad Mini</li>
<li>iPad Pro</li>
<li>16” Macbook Pro</li>
<li>Mac Studio</li>
<li>Mac Pro</li>
</ul>
<p>Now the iPad Pro with the M1 or whatever chip comes next has the full Apple OS and replaces the Macbook Air and the
13” and 14” Macbook Pro. The new Mac Studio replaces the Mac Mini and iMac 24” (which I really love the look of and the
all in one form factor). Then rounding out the lineup is the top of the line Mac Pro.</p>
<p>At this point, the iPad Pro becomes your entry level “computer” even though it’s technically a “tablet”. You get all of
the benefits of a tablet, but you can run apps like terminal for web development and lightroom/photoshop and final cut
pro for photo and video editing. For people who want more power, they can upgrade to the 16” Macbook Pro for the M1 Max
or M1 Pro chip. Then for really heavy lifting you can choose between the Mac Studio and the Mac Pro.</p>
<p>The top of the line fully spec’d out Mac Pro (which still has the Intel Xeon chip) will run you $51,799 without FCP
or any other software pre-loaded.</p>Chip Oglesbychip@creativesparkcolumbia.comApple keeps making things bigger and better, but who are they building them for?Initial thoughts on switching from a Mac to a Pixelbook Go.2022-02-20T00:00:00+00:002022-02-20T00:00:00+00:00https://www.chipoglesby.com/2022/02/google-pixelbook-go-first-thoughts<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>TL;DR (Too Long Don't Read):
A Google Pixelbook Go or Chromebook might be right for you if:
1. You exclusively use Google for Gmail, Drive, Calendar, Photos and other apps.
2. You own an Android phone.
3. You don't currently have a tablet and you're looking for something lightweight to travel with.
4. You mainly browse the web and don't need a heavy duty computer/laptop for a specific purpose.
5. You're a developer who can do most of their work with cloud based tools.
</code></pre></div></div>
<p>11 years ago my friend Rick purchased the original
<a href="https://en.wikipedia.org/wiki/Chromebook">Google Chromebook</a>. On the surface,
it didn’t look like much. It was plastic and bulky, not sleek and sexy like my
Powerbook G4 (lol, man how our tastes change). But I could feel like there
was something about what this computer was trying to do. I remember this feeling
the first time I saw the original iPhone. The iPhone would go on to be a
game-changer, Chromebooks? I guess the jury is still out on that one.</p>
<p>It took me 11 years to finally decide to purchase a Chromebook, I chose the base
model Pixelbook Go. I’ve owned three Apple computers in my life, a Powerbook G4,
an iMac and a Macbook Air. I had the iMac and the Macbook Air at the same time, one
for heavy duty lifting and one for meeting with clients and traveling. The hardest
part was making sure they stayed in sync with each other. Fortunately I had Google Drive
to help me with that.</p>
<p>A few weeks after buying my Powerbook G4, Apple announced that they were moving away
from PowerPC based chips to Intel based chips. That meant that eventually my computer
would stop being supported by Apple. Well, a few days after purchasing my Pixelbook Go,
Google has announced the new <a href="https://chromeenterprise.google/os/chromeosflex/">Google Chrome OS Flex</a>
which runs on older Windows and Apple computers essentially making them Chromebooks.
I guess this was not the time to buy the Pixelbook Go? Oh well, no worries.</p>
<p>After using a Mac computer for 20 years, I felt like maybe it was time to try
something new. The context switching going from a Mac to a PC was too difficult
so I knew I didn’t want to do that. I had to use a PC a few years ago and
using keyboard shortcuts was a nightmare!</p>
<h2 id="very-first-thoughts">Very first thoughts</h2>
<p>Fortunately, on Chromebooks, you can remap the keys to change the CTRL and ALT
keys which are helpful, but you cannot currently change the shortcut keys in
Chrome. This makes things like switching between tabs, switching between programs
and closing programs hard because I’ve memorized so many Apple keyboard shortcuts.</p>
<p>I’m also really impressed with the cold boot time of the Pixelbook Go, it’s much
faster than my old Macbook Air.</p>
<p>If you’ve used Google Chrome in the past, everything is pretty much where you expect, no change there.</p>
<p>I do like the hardware on the computer. I find the keys very quiet to type on
and I like that the body is magnesium instead of plastic, it has a much
sturdier feel to it.</p>
<p>The screen is also nice, I don’t expect to have a 4K screen, but so far it’s
easy to read and also works as a touchscreen, but honestly, who wants fingerprints
on their screen???? BLECH.</p>
<p>The biggest rebuff of using a Chromebook that I’ve heard over the years is
“What if you don’t have Internet access?” Honestly, I don’t think that matters
anymore. There’s hardly anywhere that I go where I have zero internet access.
Even our cell phones sometimes have better Internet than some WIFI. If I’m
somewhere that doesn’t have Internet, I either didn’t plan properly or probably
didn’t need to be on the Internet anyway. The last time that I needed Internet
I was in Red Feather Lakes Colorado and I had to drive to their library and use
their WIFI.</p>
<h2 id="dev-priorities">Dev Priorities</h2>
<p>I do like that the Pixelbook Go supports running Linux now. My experience with
Linux has always been Apple based, so I’m figuring out how to run <code class="language-plaintext highlighter-rouge">apt</code> instead
of <code class="language-plaintext highlighter-rouge">brew</code> for a lot of my missing packages, but that’s okay.</p>
<p>With the addition of Linux, I can run Terminal. This alows me to run <code class="language-plaintext highlighter-rouge">ssh</code>
and <code class="language-plaintext highlighter-rouge">git</code> so that I can update this blog
(which I can also do on github.com, so why run it locally?). I’m also running
VS Code on Linux for my IDE, which I have come to love using more than Atom.</p>
<p>The main question I’ve had so far: “Can the Pixelbook Go replace my current machine?”
The answer is maybe. Let me explain.</p>
<h2 id="when-i-can-use-the-pixelbook-go-as-my-main-machine">When I can use the Pixelbook Go as my main machine:</h2>
<ol>
<li>When I’m working with marketing analytics. I have VS Code for any
Javascript that I need to write. Google Tag Manager does a decent job of
formatting it for you, so there’s that. I also have Developer Tools for testing
any Javascript in the browser.</li>
<li>I need to do any documentation based work. With VS Code and git, I’m set.</li>
<li>If I need to do any Data Science or Analysis work, I have Google Cloud
Platform for all of my needs there. I can run Rstudio on Compute Engine and
with their flexible billing, I can spin up very powerful instances to run and
tear them down as soon as I’m done, saving me a lot of money.</li>
<li>GCP also has Google Cloud Shell, Cloud Shell Editor and Cloud Source Repos
so I can do all of my work there, if I want.</li>
<li>GCP also supports running Docker images, so that’s one more thing I can
check off of my list.</li>
<li>If I want to run Python locally I can do that, I can also do that on GCP.
There’s also <a href="https://colab.research.google.com/">Colabratory</a> so that’s a win
for Python data science users!</li>
<li>Github has Codespaces and there’s even an online version of <a href="https://vscode.dev/">VS Code</a>.
So I’m also covered there if I need to test code online.</li>
</ol>
<h2 id="when-i-cannot-use-the-pixelbook-go-as-my-main-machine">When I cannot use the Pixelbook Go as my main machine:</h2>
<ol>
<li>The Pixelbook Go isn’t going to be used to train neural nets, let’s be honest.
It’s limited to the processor, RAM and SSD of these machines, so I doubt that will
happen.</li>
<li>If my only option for some reason is to run RStudio locally, it can be done,
but it’s not my first choice. Again, you’re limited by the specs of the machine.</li>
<li>If you want to edit videos. I don’t do any video editing but if I did, I’m
not sure it can be done on a Chromebook. I’m guessing you could use Youtube Studio
or WeVideo.</li>
<li>No Photoshop on Linux. First, I should mention that I’m aware of Adobe Creative
Cloud, but I haven’t used it yet. If it works, I probably would just use that and
take this one off the list.</li>
<li>Gaming. I don’t play games and don’t know squat about what makes a good gaming machine.</li>
<li>I also can’t do any app development in XCode on my Pixelbook, but working in Android Studio
may be possible.</li>
</ol>
<h2 id="final-thoughts">Final thoughts</h2>
<p>Computers and web-based apps are quickly moving us back to
the <a href="https://en.wikipedia.org/wiki/Thin_client">thin client</a> model of computing
where everything is cloud based.</p>
<p>11 years ago when the first Chromebook was released we didn’t have the
online options or apps we have now. With the rise of even faster Internet speeds with 5G
it will be really exciting to see where we are 11 years from now.</p>
<p>There are some people who will need very specific operating systems for their work needs that
Chromebooks may never be able to solve for, hopefully it won’t be that way
forever.</p>Chip Oglesbychip@creativesparkcolumbia.comAfter almost twenty years, I've decided to switch from macs to a Pixelbook Go. Is it going to work for all of my needs?I Don’t Write On My Blog Much Anymore. That Probably Won’t Change.2020-05-27T00:00:00+00:002020-05-27T00:00:00+00:00https://www.chipoglesby.com/2020/05/i-dont-blog-much-now<p>I use to love to write. It was one of my favorite things to do.
Looking at my site recently I realized I haven’t written anything in one year
and seven months. But that’s okay with me. I give myself not to write anything
on my website.</p>
<p>I’ve always felt like I need to publish something as much as possible, photos,
text or whatever and I’ve realized that’s not what being creative is all about.
Working in newspapers, social media and websites have conditioned me to believe
that if you’re not publishing daily you’re irrelevant and that’s just not true.
<a href="http://photography.chipoglesby.com">I did create a subdomain of my photography, which you can find here.</a></p>
<p>I’ll always have my website and I’ll always continue to publish things that I
think are interesting or may help someone solve the same problems I came across
in the future, but now I will do it without deadlines or time constraints.</p>
<p>The other thing that I want to share with you is that I’ve been fighting a
battle with cancer this year. I was diagnosed with breast cancer,
something that is not very common for men. <a href="https://www.breastcancer.org/symptoms/types/male_bc">It affects about 1 in every 833 men
annually.</a> I’ve been
undergoing chemotherapy recently and I will continue to do that through the
summer.</p>Chip Oglesbychip@creativesparkcolumbia.comI don't blog much anymore and that's okay with me.Questions for Google Analytics: How many users were on my site?2018-10-26T00:00:00+00:002018-10-26T00:00:00+00:00https://www.chipoglesby.com/2018/10/google-analytics-questions-users<p>There are a lot of really neat things that you can do with your Google Analytics
data if you’re a Google Analytics Premium customer.</p>
<p>There are also times when you just want to ask your data questions without
having a full-blown analysis in mind.</p>
<p>Recently I wanted to know “How many users are on my site at any given minute?”</p>
<p>Google Analytics does provide a real-time dashboard that you can monitor during
special events, but since you can’t watch it 24/7/365, I thought it would be
fun to run an analysis in BigQuery.</p>
<p>The
<a href="https://support.google.com/analytics/answer/3437719?hl=en">GA export schema</a>
doesn’t provide you with a timestamp for each hit, so it’s something that
we’ll need to calculate in our SQL query.</p>
<p>To calculate the timestamp for each hit, we’ll use <code class="language-plaintext highlighter-rouge">visitStartTime</code> and
<code class="language-plaintext highlighter-rouge">hits.time</code>. The <code class="language-plaintext highlighter-rouge">visitStartTime</code> tell us the start time of each users session
and <code class="language-plaintext highlighter-rouge">hits.time</code> will tell us the number of seconds after the visit start time
when that hit occurs. Our formula will be: <code class="language-plaintext highlighter-rouge">visitStartTime+hits.time/1000</code>.
This will convert our output to seconds which we will cast as an <code class="language-plaintext highlighter-rouge">INT64</code> using
<code class="language-plaintext highlighter-rouge">SAFE_CAST</code>, we’ll then convert that to <code class="language-plaintext highlighter-rouge">TIMESTAMP_SECONDS</code> and format it to
minute using <code class="language-plaintext highlighter-rouge">FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M')</code>.</p>
<p>With this calculation done, we can then do a count distinct of the
<code class="language-plaintext highlighter-rouge">fullVisitorId</code>, grouping by the minuteTimestamp. If you want to scan all of
your partitioned tables in bigQuery, we can simply use a wildcard operator <code class="language-plaintext highlighter-rouge">*</code>.</p>
<p>For faster results you could also order by <code class="language-plaintext highlighter-rouge">userCount DESC</code> and limit the
results to 10.</p>
<p>The full query is below, you’ll just need to change the <code class="language-plaintext highlighter-rouge">xxx</code> values for your
own table.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SELECT
FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M',
TIMESTAMP_SECONDS(SAFE_CAST(visitStartTime+hits.time/1000 AS INT64))) minuteTimestamp,
COUNT(DISTINCT fullVisitorId) userCount
FROM
`xxx.xxx.ga_sessions_2018*`,
UNNEST(hits) hits
GROUP BY
minuteTimestamp
ORDER BY
userCount DESC
LIMIT
10
</code></pre></div></div>
<p>If you want to take this further in <code class="language-plaintext highlighter-rouge">R</code> you could create a line chart of users
by minute using <code class="language-plaintext highlighter-rouge">tidyverse</code> and <code class="language-plaintext highlighter-rouge">lubridate</code> to visualize your results.</p>
<p><strong>How is this information useful?</strong> This information might be helpful to someone
who is trying to figure out how many users your website could handle at any
minute before it crashes from being overloaded.</p>Chip Oglesbychip@creativesparkcolumbia.comIf you have Google Analytics data in BigQuery, sometimes its fun just to ask questions.Running Google Search Console Scripts in Docker on Google Compute Engine2018-10-13T00:00:00+00:002018-10-13T00:00:00+00:00https://www.chipoglesby.com/2018/10/what-if-newspapers-use-git<p>If you’ve read my blog before, then you know I’m a Google fan. Google has a
great <a href="https://cloud.google.com/free/">free tier</a> that you can check out if
you’d like to learn more about how you can use Google Cloud for your data
science projects.</p>
<p>The code for this project are here:</p>
<ol>
<li><a href="https://github.com/chipoglesby/rbaseplus">rbaseplus</a></li>
<li><a href="https://github.com/chipoglesby/searchconsole">searchconsole</a></li>
</ol>
<p>This post will cover the following tools:</p>
<ol>
<li>Google Cloud Build</li>
<li>Google Container Registry</li>
<li>Google Source Repos</li>
<li>Google Service Accounts</li>
<li>Docker Images and Containers</li>
<li>Google Cloud</li>
</ol>
<p>Over the past few years I’ve been using <code class="language-plaintext highlighter-rouge">R</code> to pull data from Google Webmaster
Tools Search Console and storing the data in Google BigQuery so that it can
be analyzed or visualized at a later data.</p>
<p>Normally I would run the script locally with a cronjob on my computer. Recently
I’ve been working more with Docker images to make some of my data analysis
more reproducible.</p>
<p>I thought that it would be a great opportunity to take a task like this and
automate it in the cloud.</p>
<p>What I’ll present is how to setup the project and run it in the cloud so you can
do the same thing.</p>
<p>To begin with you’ll need a working knowledge of <code class="language-plaintext highlighter-rouge">R</code> and Docker. If you don’t,
go read up on them and come back when you’re ready. You’ll also need to have
your Google Cloud project ready. There’s a
<a href="https://cloud.google.com/free/">free tier</a> that’s great for this.</p>
<p>Right now the code for this project has been mirrored on Github. We’ll begin
with a base image of the rocker image for R. Let’s take a look at our Dockerfile:</p>
<script src="https://gist-it.appspot.com/github/chipoglesby/rbaseplus/blob/master/Dockerfile"></script>
<p>If you want to run this image locally on your machine, it’s available here:
<a href="https://hub.docker.com/r/chipoglesby/rbaseplus/">hub.docker.com/r/chipogelsby/rbaseplus</a>
or use <code class="language-plaintext highlighter-rouge">docker pull chipoglesby/rbaseplus</code>.</p>
<p>We’re going to use
<a href="https://source.cloud.google.com/repo/new">Google Cloud’s Source Repo</a> to store
our Dockerfile so it can be built using
<a href="https://cloud.google.com/cloud-build/">Google Cloud Build</a>.</p>
<p>Let’s create a new
<a href="https://source.cloud.google.com/repo/new">source repository called rbaseplus</a>.</p>
<p>Next let’s create a <a href="https://cloud.google.com/cloud-build/docs/running-builds/automate-builds">Cloud Build Trigger.</a></p>
<p>This trigger will automatically build a new Docker image based on our previous
Dockerfile. This base image includes R, various Linux files and all of the
packages for our next project.</p>
<p>Next, let’s clone the
<a href="https://github.com/chipoglesby/searchconsole">searchconsole project from Github</a>
and upload it to a new google source repo in our project. You should update the
Dockerfile with your own project id.</p>
<script src="https://gist-it.appspot.com/github/chipoglesby/searchconsole/blob/master/Dockerfile"></script>
<p>You should also update <code class="language-plaintext highlighter-rouge">search.R</code> with your own information. The <code class="language-plaintext highlighter-rouge">search.R</code>
script pulls data from Webmaser Tools and uploads it into BigQuery. Before you
run the script, make sure you’ve created a dataset in BigQuery to store your
data. Give the dataset and tables descriptive names.</p>
<script src="https://gist-it.appspot.com/github/chipoglesby/searchconsole/blob/master/r/searchConsole/code/search.R"></script>
<p>Now let’s create a new
<a href="https://cloud.google.com/iam/docs/understanding-service-accounts">service account in our Google Cloud project</a>.
Give it a memorable name and create a <code class="language-plaintext highlighter-rouge">json</code> key. You’ll also want to add the
service account email as a full user in the webmaster tools project that you
want to pull data from.</p>
<p>We also want to build a create a <a href="https://cloud.google.com/cloud-build/docs/running-builds/automate-builds">Cloud Build Trigger.</a>
for this repo as well, but this time we are going to use Google’s <code class="language-plaintext highlighter-rouge">cloudbuild.yaml</code>
to build the docker image.</p>
<p>Once this is done building, you will be able to deploy this image to Google
Compute Engine from the Google Container Registry. Google also launched
<a href="https://cloud.google.com/shielded-vm/">Shielded VM’s</a> which you should take
advantage of. You can also deploy your image from within the
<a href="https://cloud.google.com/container-registry/">Google Container Registry</a>.</p>
<p>If you run a <code class="language-plaintext highlighter-rouge">f1-micro (1 vCPU, 0.6 GB memory)</code> VM, you can run this for free
every month on Google Cloud. This will be enough to get you started.</p>
<p>Once your VM is up and running, you can SSH into it using
<a href="https://cloud.google.com/shell/docs/">Google Cloud Shell</a> and checkout your
Docker image. You can also set up a cronjob to run the script automatically
at any given time, if you’d like.</p>Chip Oglesbychip@creativesparkcolumbia.comRunning a Docker image on Google Compute Engine that pulls Google Webmaster Tools data and stores it in BigQuery.What if newspapers and reporters used Git & GitHub?2018-05-30T00:00:00+00:002018-05-30T00:00:00+00:00https://www.chipoglesby.com/2018/05/what-if-newspapers-use-git<p>I’ve been reading more about <a href="https://bookdown.org/"><code class="language-plaintext highlighter-rouge">bookdown</code></a> the past
few days which is a really interesting concept using <code class="language-plaintext highlighter-rouge">R</code> to publish statistics
books. That led me to think more about how newspapers operate.</p>
<p>I started thinking this morning back to my days at a newspaper and the workflow
that we used to publish our articles. This was in 2010 before most people had
thought about reverse publishing a newspaper, online first and then reflowing
the xml to indesign to be published in print.</p>
<p>That got me thinking. Would it be possible for a newspaper website to work
exclusively using the open collaborative nature of <code class="language-plaintext highlighter-rouge">git</code> and host it on a site
like <a href="https://github.com">GitHub</a>?</p>
<p>Then I started thinking about it. Github has:</p>
<ul>
<li><strong>Projects:</strong> Which are good for working on daily stories</li>
<li><strong>Issues:</strong> Which the public could use to request coverage of a particular
topic.</li>
<li><strong>Pull Requests:</strong> Which could be used for building the daily site/issue</li>
<li><strong>GitHub Pages:</strong> Which can be used for special projects and even hosting a
static version of the site.</li>
</ul>
<p>Reporters would be able to create branches for their stories, Editors could use
<a href="https://blog.github.com/2016-12-07-introducing-review-requests/">review requests</a>
to request changes. Since you can version control almost anything you could host
data, visualizations, code for analysis and images here as well.</p>
<p>Special projects and exposés could be stored in an individual private repo
and then pushed upstream when being published to ensure others won’t get the
scoop that you’re working on.</p>
<p>If the size of repo became an issue, you could also house images on Google Cloud
or Amazon buckets, or you could create an organization on
<a href="https://data.world/">data.world</a> and version control you data files there,
giving the public access to everything you publish.</p>
<p>By using an open-source model like <a href="https://git-scm.com/"><code class="language-plaintext highlighter-rouge">Git</code></a> it may cut down on
the perceived bias in news because it would give people insight to how newspapers
operate. For analyses, it would give experts the chance to weigh in on
visualizations and analyses.</p>
<p>By using Git, you would be able to see the entire change history of an article
from beginning to end.</p>
<p>I have seen some newsrooms do this. <a href="https://github.com/fivethirtyeight">Fivethirtyeight for example publishes
their data and and code behind their graphics on github</a>.</p>Chip Oglesbychip@creativesparkcolumbia.comWhat if newspapers used a version control system to author, collaborate and publish all of their work? Would that be possible?#chiptip: Launch RStudio from the command line2018-05-07T00:00:00+00:002018-05-07T00:00:00+00:00https://www.chipoglesby.com/2018/05/rstudio-terminal<p>Preface: Sorry Windows users, you’re out of luck on this one!</p>
<p>I figured out a quick tip over the weekend to help me launch <code class="language-plaintext highlighter-rouge">RStudio</code>
directly from the command line for Mac and Linux.</p>
<p>Simply add this line of code to your <code class="language-plaintext highlighter-rouge">.bash_profile</code> and restart it and you’ll
be all set:</p>
<p><code class="language-plaintext highlighter-rouge">alias rstudio='open -a Rstudio *.Rproj'</code></p>
<p>You can edit your <code class="language-plaintext highlighter-rouge">bash_profile</code> in your editor of choice, the most simple being
nano. The command to do that is: <code class="language-plaintext highlighter-rouge">nano ~/.bash_profile</code>.</p>
<p>If the folder you’re in has a <code class="language-plaintext highlighter-rouge">.Rproj</code> file, simply type <code class="language-plaintext highlighter-rouge">rstudio</code> into
the terminal and it will open the project in RStudio. I find myself doing this
a lot when I clone other people’s analysis to my local drive and want to take a
look at what they’re doing.</p>
<p>If you work in terminal or with the command line a lot, you can set up all
types of helpful aliases to be more efficient. I’m not an expert, but I have a
few good aliases that I think are helpful.</p>
<p>Happy analyzing!</p>Chip Oglesbychip@creativesparkcolumbia.comA quick tip on how to launch RStudio from the command line by adding an alias to your bash_profile.In my other life, I was a cook2018-05-05T00:00:00+00:002018-05-05T00:00:00+00:00https://www.chipoglesby.com/2018/05/i-was-a-cook<p>I’ve always loved food. Is ‘food love’ a word? If not, it should be. I’ve been
doing a lot more cooking lately and I’m not going to lie, it’s been really great.</p>
<p>Maybe in another life, I could have been a cook? For right now, I’ll just stick
to cooking for my friends and family.</p>
<p>Shrimp & Grits</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/shrimpAndGrits.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/shrimpAndGrits.jpg" alt="Shrimp & Grits" /></a></p>
<p>Paletas de fresca con crema</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/paletasDeFresasConCrema.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/paletasDeFresasConCrema.jpg" alt="Paletas de fresca con crema" /></a></p>
<p>Roasted veggies</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/roasted.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/roasted.jpg" alt="Roasted veggies" /></a></p>
<p>Taco Fried Rice</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/tacoFriedRice.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/tacoFriedRice.jpg" alt="Taco Fried Rice" /></a></p>
<p>Brinner (Breakfast for Dinner)</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/brinner.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/brinner.jpg" alt="Brinner" /></a></p>Chip Oglesbychip@creativesparkcolumbia.comI'm not saying I love food, but yeah, I really do.Our recent trip to Colorado2018-05-03T00:00:00+00:002018-05-03T00:00:00+00:00https://www.chipoglesby.com/2018/05/colorado-visit<p><a href="https://storage.googleapis.com/www.chipoglesby.com/flight.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/flight.jpg" alt="Early Morning Flight on Southwest" /></a></p>
<p>We had the very fortunate opportunity to go back to Colorado for a few days
to attend a wedding with our best friends. It was such a great chance to get
back to the place that has such a huge place in our hearts.</p>
<p>Our trip was short, but we did take some time for ourselves, which included a
stay in downtown Denver with dinner at Earl’s Kitchen, a stay at The Magnolia
and a visit to the Denver Art Museum to the see the Degas exhibit.</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/denver.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/denver.jpg" alt="In Denver: 3AM" /></a></p>
<p>I’m always struck by the rugged beauty of Colorado. Our friends live in Nunn,
which is close-ish to the front range, but I could spend forever out there just
exploring the area.</p>
<p>The Degas exhibit at the Denver Art Museum was also amazing. I only knew of
Degas from the TV show White Collar, don’t worry, we didn’t pull a Neal Caffery
on anything though. :)</p>
<p>Degas was fascinating because he was self-taught and always pursued perfection
with his work.</p>
<p><a href="https://storage.googleapis.com/www.chipoglesby.com/degas.jpg"><img src="https://storage.googleapis.com/www.chipoglesby.com/degas.jpg" alt="Degas: Dancing Lessons" /></a></p>Chip Oglesbychip@creativesparkcolumbia.comWe finally got to visit Colorado again!