<?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[qri.io - Medium]]></title>
        <description><![CDATA[Qri (pronounced “query”) is a distributed version control system for datasets - Medium]]></description>
        <link>https://medium.com/qri-io?source=rss----c8725b5a8089---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>qri.io - Medium</title>
            <link>https://medium.com/qri-io?source=rss----c8725b5a8089---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 15:37:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/qri-io" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Crowdsourcing Civic Data — A Playbook of Tools and Techniques]]></title>
            <link>https://medium.com/qri-io/crowdsourcing-civic-data-a-playbook-of-tools-and-techniques-171c5e4dc092?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/171c5e4dc092</guid>
            <category><![CDATA[crowdsourcing]]></category>
            <category><![CDATA[civic-hacking]]></category>
            <category><![CDATA[capital-budget]]></category>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[qris]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Thu, 17 Dec 2020 14:28:23 GMT</pubDate>
            <atom:updated>2020-12-17T14:28:23.737Z</atom:updated>
            <content:encoded><![CDATA[<h3>Crowdsourcing Civic Data — A Playbook of Tools and Techniques</h3><p>At <a href="https://qri.io/">Qri,</a> we’ve been organizing a volunteer effort to manually geocode records in a 5000-row dataset. Each record is a mini research project. Some have a discrete address, others are found through local knowledge or google sleuthing. In this blog, we’ll cover why we had to call on the crowd to accomplish this task, and share some of the tools and techniques we employ to keep things organized.</p><h3>JavaScript is not available.</h3><p>We need volunteers to manually look up projects and add lat/lon coordinates. If interested I will assign you a community district to research. Each has several dozen and should take a couple of hours to geocode. Can you help? @qri_io #crowdsourcing pic.twitter.com/ksb9rySqmg</p><p><strong>The Data White Whale: Mapping New York City Capital Projects</strong></p><p>I recently had the opportunity to <a href="https://medium.com/qri-io/mapping-billions-in-nyc-capital-spending-97a23af250c2">scrape and do some simple analysis</a> of a fascinating dataset, <a href="https://qri.cloud/chriswhong/nyc_capital_project_detail_data">NYC Capital Project Detail Data</a>. In this dataset are details of the billions of dollars my city is spending on capital improvements. This includes water and sewer mains, park improvements, building construction and renovation, etc. For a city this large, it’s a lot to take in (there are over 5000 projects happening simultaneously at the moment and <a href="https://www1.nyc.gov/site/omb/publications/fy20-accp.page">the source PDFs are published as 5 volumes</a>), but this dataset, and the PDFs it was scraped from, represent the best comprehensive project-level data available to the public.</p><p><em>One big problem: The projects aren’t mappable.</em> Not yet anyway. The information system these projects are tracked in does not keep track of spatial data (a point, line, or polygon geometry). Rather, projects are associated with one or more of New York’s 59 community districts, giving some idea of the applicable geographic benefits, but not allowing for precise “mapping of the budget”. Furthermore, some projects are deemed to have borough-wide or citywide geographic impact (think computer systems, fleets of vehicles, or other less construction-y investments).</p><p>“Everything happens somewhere” is an old saying in GIS circles, along with “all data are spatial”. In <a href="https://medium.com/qri-io/mapping-billions-in-nyc-capital-spending-97a23af250c2?source=collection_home---6------1-----------------------">the prior blog post </a>about scraping the data and the possibilities it could unlock, I attempted to manually assign point geometries to every project I could research in a single community district. To make this dataset spatial, I literally added two more columns, latitudeand<em> </em>longitude , and then literally googled keywords in the project descriptions to see if I could figure out where a project was happening. This is easy for libraries and public housing projects with discrete names, not so much with sewer projects that may have obscure acronyms or other jargon-y descriptions (<a href="https://www.flowermoundpoolservice.com/concrete-and-gunite/">But now I know what “guniting” is</a>)</p><p>The result is this bubble map showing the location and approximate total cost (dollars spent + next 5 years of planned spend) for a few dozen projects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*VHZLMPZxT5h0x4f3B-CKIw.png" /><figcaption>A map of capital projects in Brooklyn Community District 6</figcaption></figure><p>This is a <em>fascinating</em> overview of projects that the system of record says will benefit my local community. All it took was a couple of hours of research, looking for clues in the project descriptions to figure out where they were located. Google, Google Maps, Community News Sites, Blogs, and whatever else I could pull up on the internet were the tools of the trade.</p><p>So… what would it take to do this for the whole city? We’re not talking millions of rows. There’s only 5000 projects, and only 4000 or so of them are non-citywide. Once we have the entire dataset geocoded, this opens up the door to more thorough analysis, along with a proper web application for anyone to search and explore every capital project. Someday…</p><h4>Divide &amp; C̶o̶n̶q̶u̶e̶r̶ Geocode</h4><p>The new dataset contains a column community_boards_served, making it easy to filter for each of the 59 districts. Community districts are a known geography in NYC, and are a simple way to assign a subset of projects to a volunteer. I did two myself, so now all I need is 57 more civic data nerds to repeat the process!</p><p><strong>Airtable — Data Editing</strong></p><p>Airtable is an extremely useful way to make little filtered views of a larger dataset. It takes some clicking, but after uploading the original dataset and adding two numeric columns for the latitude and longitude, I just need to make a view for each volunteer to work through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQQWhAo74nDmBMmqeYm40A.png" /><figcaption>Airtable views are a great way to divide up this large dataset into digestible lists for each volunteer to work on</figcaption></figure><p>On the left we have a big list of views, one for each community district, and a few more to track overall progress. When a volunteer claims a district, it’s easy for them to drop into the airtable, find their view, and get to work!</p><p>One caveat: Everyone working in this dataset has “Editor” access, which could be chaotic. It’s not really a controlled environment, and in theory users could mess up other people’s records, modify fields from the source data, etc. It hasn’t been a problem at all yet, as the task at hand is pretty simple and people are only really editing two fields for each row. I don’t share the link for this airtable publicly, it is only shared with people who have committed to working on the project.</p><p><strong>Google Docs — Instructions</strong></p><p><a href="https://docs.google.com/document/d/1gWxCRQ8ELPVOcpt0beamWEwedHHlrrU6jBShMO-Dsj4/edit?usp=sharing">We use a google doc for instructions</a>. This effort doesn’t have a website (yet!), so a google doc serves as easy-to-edit and easy-to-share content. I have it sitting ready in my bookmarks bar, and the instant someone expresses interest in helping out, I fire off this URL.</p><p>Inside are a quickly digestible background of the project, and a step-by-step guide for communicating with the organizer (me) and geocoding. We even have a notes section with tips from other volunteers that may come in handy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQehCOptzjdg4vSltaeKzg.png" /><figcaption>A google doc serves as “home base” for people who want to contribute to the project</figcaption></figure><h3></h3><p>Bumping some great tools to use when looking for latlngs. - https://t.co/yWaP2Ui5NA for facilities owned by agency- https://t.co/oCbCb0qFpX for pin pointing park improvements- https://t.co/eqj05605iF for any DEP sewage inf. such as pumps, treatment, and CSOs pic.twitter.com/b8iopmEom6</p><p><strong>Google Sheets- Assignment Tracking</strong></p><p>I could have just as easily used another Airtable for this (and probably will). For now, I use a sheet to keep track of who has claimed or been assigned to each community district. It’s a bit chaotic, but I use background color to track what is in progress/done, and can get a good idea of how many districts are yet to be claimed. This sheet is also easily embeddable into the instructions doc, and lets new volunteers know what is still available and how much is left to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*anuWyUDKsqP4YHTc5gmtOA.png" /><figcaption>A google sheet helps keep track of who has claimed which district to work on, and how much progress they have made. Keeping this up to date takes meticulous attention!</figcaption></figure><p><strong>Twitter, Linkedin, Facebook, Medium — Recruiting</strong></p><p>The original blog post about the data scraping included a call to action at the end that dreamed big about a crowdsourced effort to map the whole dataset. This one will include the same. Aside from that, we regularly post on social media asking for volunteers to take off a bite-size chunk of the dataset. (We even <a href="https://www.youtube.com/watch?v=UrRmdj5LVlo">discussed this effort in a recent community call and put it on YouTube</a>)</p><p>I like to frame it as a great way to get involved in a community data project without much skill or time commitment. Literally anyone can look up these projects. A bit of local knowledge of NYC helps, but isn’t required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*88No0tvlxMWcYsXqVW-AqQ.png" /><figcaption>Ask for help with small, manageable tasks, performed in the open… the community will show up!</figcaption></figure><p>It’s also a lot of fun to look up projects. You can learn a lot about various entities that improve the infrastructure (I am talking about Business Improvement Districts (BIDs) and Local Development Corporations (LDCs) as well as myriad cultural institutions that get capital funding.</p><h3></h3><p>Look at all those capital projects in Queens Community District 7, mapped by @zhi_keng. We need volunteers to geocode projects in other parts of the city. If you&#39;re interested, let me know and you can claim a district! @qri_io pic.twitter.com/lMO4bzJOyt</p><p><strong>qri.cloud — Archival and Publishing</strong></p><p>Managing data in airtable can be chaotic, especially with many cooks in the kitchen. Qri is a version control system for datasets, and is well-suited for creating snapshots of the data from time to time.</p><p>I’ve created a node.js script that pulls the data from the airtable API, transforms it into a CSV and saves it to disk, then executes a commit on the qri dataset chriswhong/nyc_capital_project_data_geom. If the commit is successful (meaning there was some change from the last version), it then pushes the dataset to qri.cloud, which you can see <a href="https://qri.cloud/chriswhong/nyc_capital_project_detail_data_geom">here</a>. The dataset, along with its version history, is published and available to all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0oHcYxfpWCcHsX9CCJ_TPg.png" /><figcaption>qri.cloud profile page for the in-progress capital project geometry edits</figcaption></figure><p>You can download it, pull it if you have Qri Desktop, or connect to it via our API. You can also explore older versions and will soon be able to get a report of what changed from version to version. It’s easy and free to start publishing your own data on qri.cloud. If you have a CSV that’s tired of being hidden from the world on your computer, consider publishing it with Qri.</p><p><strong>Next Steps</strong></p><p>At the time of writing, we have just over 1,000 projects geocoded! This is tremendous progress for this low-tech distributed effort we’ve thrown together over the past week. The recipe we’ve outlined here appears to be working out, and we’re always looking for additional hands. If you’d like to help out, <a href="https://docs.google.com/document/d/1gWxCRQ8ELPVOcpt0beamWEwedHHlrrU6jBShMO-Dsj4/edit?usp=sharing">take a look at the instructions</a> and reach out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=171c5e4dc092" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/crowdsourcing-civic-data-a-playbook-of-tools-and-techniques-171c5e4dc092">Crowdsourcing Civic Data — A Playbook of Tools and Techniques</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing the Recovery of the NYC Subway during COVID-19]]></title>
            <link>https://medium.com/qri-io/analyzing-the-recovery-of-the-nyc-subway-during-covid-19-8063da411bf1?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/8063da411bf1</guid>
            <category><![CDATA[new-york-times]]></category>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[transit]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[nyc-subway]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Tue, 08 Dec 2020 19:49:11 GMT</pubDate>
            <atom:updated>2020-12-08T19:49:10.935Z</atom:updated>
            <content:encoded><![CDATA[<p>We recently had the opportunity to provide data analysis in support of <a href="https://www.nytimes.com/2020/12/02/nyregion/subway-ridership-mta.html?searchResultPosition=1">a New York Times article</a> about the recovery of the Subway. More specifically, we did an analysis of “percent of usual” ridership by station for October 2020 to get an idea of where we are still seeing depressed numbers, and where things are getting back to normal. In this post, we’ll provide some supporting tables, charts, and maps for the analysis presented in the NYT, for those who want to go a bit deeper. Naturally, the <a href="https://qri.cloud/nyc-transit-data/turnstile_daily_counts_2020">data</a> and <a href="https://github.com/qri-io/data-stories-scripts/tree/master/nyt-transit-analysis">code</a> are also available for anyone who would like to reproduce or build on our analysis.</p><p>First, take a look at the article:</p><p><a href="https://www.nytimes.com/2020/12/02/nyregion/subway-ridership-mta.html?searchResultPosition=1">Crowded Subways? Yes, in Neighborhoods Where People Have to Go to Work</a></p><p>The article refers to “percent of usual” ridership in several places which was our attempt to come up with a normalized measurement for comparing the recovery of individual stations, boroughs, and the system as a whole. It’s important to understand how we calculated the “usual” ridership which we compared October ridership to.</p><h4><strong>What is usual, anyway?</strong></h4><p>For our analysis, “usual” was the average monthly ridership for a given station in 2019. We add up all of the subway entries for a given station for the entire year and divide by 12. Why an average? In earlier iterations of this analysis we would compare a station/month to the same station/month during the previous year, but this led to some anomalies as there were stations with skewed ridership due to construction and other abnormal events. Using an average gives us a more consistent and reliable denominator for calculating the percentage.</p><blockquote><em>“Even as Manhattan stations remain eerily empty, a surge of commuters in other boroughs has pushed overall ridership to </em><strong><em>30 percent</em></strong><em> of normal levels.”</em></blockquote><p>What are the numbers behind this 30% figure? <strong>45.1 million</strong> <strong>/ 143.0 million = .3155</strong> (systemwide entries in October 2020 / average monthly entries in 2019)</p><p>We can use the same math to calculate the percent of usual for each borough:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*865ZyAaKZHrHxURm9RpiiA.png" /><figcaption>Percent of usual ridership for October 2020 by New York City Borough</figcaption></figure><p>We can see that though Manhattan has the largest numbers, percentage-wise it is the only borough that is below the citywide average (31.55%). Brooklyn and Queens approached 40% of normal ridership, and the Bronx had the largest resurgence of activity at 45%.</p><blockquote><em>“Even as stations in Manhattan that were once the busiest in the city remain eerily quiet — with as few as one-fifth of typical passenger levels — ridership at some stops in the other boroughs has surpassed 50 percent of pre-pandemic levels.”</em></blockquote><p>When we do the same calculation as above for individual stations, we can see a broad range of percentages. Here are the top 15 and bottom 15, but most are in the middle somewhere:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*rGQUE5VfCUoTLY55zsKBCw.png" /></figure><p>A quick histogram of the percentages shows the distribution more clearly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*bNv1jthJT2tR1sqQjIQt_w.png" /></figure><h4>Borough Breakdown</h4><p>Creating the same histogram for each of the four boroughs served by the subway shows clearly distinct patterns. In the Bronx we see a much smaller range pushed toward the higher end of the scale around the 40% mark. In Manhattan the pattern is more erratic, but skews to the lower percentages. We can also see that all three of the outliers are stations in Queens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SBNBKKUy7fJ4xj6BZhicw.png" /></figure><blockquote><em>“In the months since, the system’s revival has been similarly skewed: Ridership has returned to about 40 percent of normal in Brooklyn and 45 percent in the Bronx. In Manhattan, ridership is still just 25 percent of what it was before the outbreak.”</em></blockquote><p>Here’s the same data in the table above, as a chart, showing the four boroughs served by the subway along with the citywide percentage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ISolDmd4Fqa2TlxWDjueOQ.png" /></figure><p>Finally, a map allows us to see individual stations and observe the overall patterns. The stations in Manhattan with low ridership are mostly clustered in midtown and below, and we can see the small selection of stations throughout the city where ridership has surpassed 50% of usual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_G8DEwfphvnvzlpErSoCQ.png" /></figure><p>Thanks for reading!</p><p>The code used in this analysis is available <a href="https://github.com/qri-io/data-stories-scripts/tree/master/nyt-transit-analysis">on github</a>.</p><p>The dataset, <a href="https://qri.cloud/nyc-transit-data/turnstile_daily_counts_2020">NYC Turnstile Daily Counts 2020 is available on qri.cloud</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8063da411bf1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/analyzing-the-recovery-of-the-nyc-subway-during-covid-19-8063da411bf1">Analyzing the Recovery of the NYC Subway during COVID-19</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mapping Billions in NYC Capital Spending]]></title>
            <link>https://medium.com/qri-io/mapping-billions-in-nyc-capital-spending-97a23af250c2?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/97a23af250c2</guid>
            <category><![CDATA[capital-budget]]></category>
            <category><![CDATA[urban-planning]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[data-scraping]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Fri, 04 Dec 2020 14:45:05 GMT</pubDate>
            <atom:updated>2020-12-04T21:21:04.482Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Update: 2:26pm EST on December 4th. We noticed an error in the scraper code that resulted in a major issues with the total spending amounts used in this analysis. We are currently working to fix these errors and update the visualizations and numbers used in this blog post.</em></p><p><em>Update: 4:19pm EST on December 4th. The errors have been corrected, and all all numbers and visuals in this blog post have been updated. An update to the dataset has also been pushed to qri.cloud, and an update to the scraper code has been pushed to github.</em></p><p>If you follow the exciting world of municipal budgets, you may know that New York City’s operating budget is close to $90 Billion for the current fiscal year. This is fairly cut and dry, money is raised from taxes and other sources, and spent on salaries, rent, and other operating costs. Repeat annually.</p><p>The <em>capital budget</em>, however, is a more elusive beast. Capital projects may span years or even decades, and the enormity of the numbers and the complexity of the process make it quite difficult to figure out where the money goes, and when.</p><p><strong>A Quick Primer on Capital Budget Information</strong></p><p>If you want to inspect the capital budget, <a href="https://www1.nyc.gov/assets/omb/downloads/pdf/cb6-20.pdf">here’s the official capital budget document for Fiscal Year 2021 approved by the city council and mayor</a>. It’s 604 pages long, and is mostly screen dumps from a government computer system. If you scan these pages, which are already cryptic and confusing, you may see some specific project-related descriptions for major projects like bridges, but most of the lines have something like:</p><p>CONSTRUCTION, RECONSTRUCTION, ACQUISITION OR INSTALLATION OF A NON-CITY OWNED PHYSICAL PUBLIC BETTERMENT OR IMPROVEMENT WITH A CITY PURPOSE, WHICH WOULD BE CLASSIFIED AS A CAPITAL ASSET UNDER GENERALLY ACCEPTED ACCOUNTING PRINCIPLES FOR MUNICIPALITIES; FOR THE GRAND STREET SETTLEMENT.</p><p>Sounds pretty vague, right? This is because the Capital Budget deals in appropriations to “budget lines”, <em>not projects</em>. These can be thought of as buckets of money reserved for a specific type of use. To get down to the project level, where money turns into real things that humans need or use, we must look to the <em>Capital Commitment Plan.</em></p><p>The Capital Commitment Plan is a 4000 page document of more computer system screen dumps, and is so large, <a href="https://www1.nyc.gov/site/omb/publications/fy20-accp.page">it has to be published in 4 parts.</a> Take a look at one of the pdfs over at <a href="https://www1.nyc.gov/site/omb/publications/fy20-accp.page">https://www1.nyc.gov/site/omb/publications/fy20-accp.page</a>, and you will find screens that list projects under each budget line, along with cryptic information about milestones, planned completion dates, and expected costs over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spGMfmAnXwZNdriioE1afA.png" /><figcaption>A page from the capital commitment plan, detailing several projects that receive funding from a single budget line.</figcaption></figure><p>So, we’ve got thousands of pages of PDFs to pore over, or we can go look at high-level numbers, but how am I as a citizen supposed to figure out what is happening in my neighborhood? How is an analyst supposed to figure out if these funds are being allocated in a fair and equitable way? There’s hope in a new set of publications that the Office of Management and Budget recently started publishing.</p><h4>A New Hope: Capital Project Detail Data PDFs</h4><p>Recently, a new set of budget publications appeared on the OMB website, immediately following the capital commitment plan PDFs. They are known as <strong>Capital Project Detail Data</strong>, and are a wonderful improvement on making all of the above information more digestible by normal humans.</p><p>They include a nicer layout with a single page of detailed information for <em>every capital project in the city. </em>Here’s the page for the carousel improvement in Prospect Park, Brooklyn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1rAR-58DCRYf5Z2K6vOOdQ.png" /><figcaption>A page from the new “Capital Project Detail Data” pdfs, where each capital project gets its own full page of details</figcaption></figure><p>From this page, we can see:</p><ul><li>They have spent <strong>$90,000</strong> on this project so far</li><li>They plan to spend <strong>$78k in FY 2020</strong>, and <strong>$422k in 2021</strong></li><li>The total spent +planned is <strong>$590k</strong>, which is higher than the original budget of <strong>$500k</strong></li><li>There’s actually an error in this PDF where the community districts are prefixed with the wrong borough code. It should be “3” for Brooklyn.</li><li>This project will serve Brooklyn Community Districts 6, 7, 8, 9, and 14 (aka 306, 307, 309, and 314 in the data)</li></ul><p>We also have milestones with original vs current start and end dates, to get an idea of the timeliness/delays of the project. There are also some goodies in here that are not included in any of the other PDFs, such as “Project Location” and “Scope Summary”, all of which help to move this project out of paper and into the real world of things that New Yorkers need and use.</p><h4>PDFs Are Where Data Goes to Die</h4><p>This is an old saying in the circles I run in (civic open data nerd circles, to be precise). There’s a ton of data in these pdfs that’s been turned into page layouts for human eyes, but in the process is made non-machine-readable, so we cannot use it for analysis purposes. Wouldn’t it be great to do a simple sum() on the total spend on all projects in my community district, or to group all projects in Brooklyn by their category and get a simple run-down of how we’re spending all this money?</p><p>Better yet, can we <em>map</em> where these projects are happening and <em>see</em> where we’re spending all this money?</p><p>OMB has actually published two datasets that represent the Capital Project Detail Data PDFs <a href="https://data.cityofnewyork.us/City-Government/Capital-Project-Detail-Data-Dollars/wa2y-rh4b">Capital Project Detail Data — Dollars</a>, and <a href="https://data.cityofnewyork.us/City-Government/Capital-Project-Detail-Data-Milestones/s7yh-frbm">Capital Project Detail Data — Milestones</a>.</p><p>A noble effort and an excellent commitment to transparency, but unfortunately at the moment they are both <em>stale</em> and <em>incomplete</em>. Specifically, I wanted to do analysis of the community_districts_served for all these projects, so had to take matters into my own hands. The data from these pdfs can be scraped!</p><h4>Scraping the Data</h4><p>I won’t bore you with the details (<a href="https://github.com/qri-io/data-stories-scripts/tree/master/nyc-capital-projects/scraper">the code is on github</a>), but we scraped the Capital Project Detail Data PDFs and published the data on qri.cloud, so anyone can have access to granular NYC Capital Project Data. We also published two tables:</p><ul><li><a href="https://qri.cloud/chriswhong/nyc_capital_project_detail_data">NYC Capital Project Detail Data | Dataset Published on qri.cloud</a></li><li><a href="https://qri.cloud/chriswhong/nyc_capital_project_detail_data_milestones">NYC Capital Project Detail Data - Milestones | Dataset Published on qri.cloud</a></li></ul><p>The meat is in the first table, where we have one row for each of the <strong>5,200 discrete capital projects</strong> currently happening in New York City! The second table contains the milestones, which have a many-to-one relationship with projects.</p><p>Some top-level highlights:</p><ul><li>The sum of combined_total for all rows is <strong>$105.8B</strong> ($40.9B prior actual spending/$64.9B planned spending)</li><li>While many projects are assignable to one the five boroughs, we see that the largest chunk of this spending ($36.4 B) is for citywide projects . We can also see a detailed borough breakdown of the non-citywide projects.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*OJXRa22eH8hiJF3NYznX2A.png" /><figcaption>Every project is assigned to a borough, or is designated as citywide.</figcaption></figure><h4>Citywide vs. Boroughwide vs. Local Projects</h4><p>Below the borough level, things get trickier. As we saw in the PDFs, a single project can serve multiple community districts (for example, it looks like most of the projects in Prospect Park are listed as serving all of the surrounding districts. The data also includes some nonexistent community district ids meant to describe projects with borough-wide benefit. Community districts ids usually contain a single digit for the borough and two more for the district number, so Bronx Community District 4 = ‘204’. The data include district ids such as 200 and 299 which are inferred to mean the benefits are borough-wide (someone please correct me if I am wrong on this and 00 and 99 have different implications).</p><p>To get a basic understanding of how many projects have “local” benefits, I did some simple grouping, treating projects with at least one real community district listed as local, all others are considered borough-wide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aJIn4b4-Fi1QVnI8PpAmzA.png" /></figure><p>We can see that the ratio varies quite a bit from borough to borough, with Brooklyn having nearly double the amount of local spending for boroughwide projects. Collectively, about 48% of all borough-specific project spending is local under this definition.</p><h4>Local Projects by Category</h4><p>Now, the moment you’ve been waiting for and the reason you came to read this blog post. With community district and categories assigned to each project, we can map out where local projects for each category are happening around the city! A few caveats and notes before we dive in:</p><ul><li>The categories shown come from the ten_year_plan_category field in the dataset</li><li>Projects attributable to more than one community district are represented more than once in the calculations used to generate the maps</li><li>All of the spending shown below represents only non-citywide and non-boroughwide, or about <strong>40%</strong> of the <strong>$105.8B </strong>total spending outlined in the dataset</li></ul><p>Drumroll, please 🥁…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6lKO2fq7w7MyGLI4wWdgw.png" /></figure><p>Right off the bat, several categories stand out as having wide coverage around the city:</p><ul><li>Large, major, and regional park reconstruction</li><li>Neighborhood parks and playgrounds</li><li>Essential reconstruction of facilities</li><li>Garages and facilities</li></ul><p>Parks, as we might expect, are spread throughout the city and need plenty of capital investment for improvements. “Facilities” is vague, and there are may other categories that also describe facilities, so it’s not really clear what we’re seeing here. Each tiny map on this grid could probably be its own blog post. As a viewer, I immediately want to drill down into each category and see the individual projects. An interactive UI for exploring Capital Spending would go a long way, and I’d love to build one someday (again)!</p><h4>Mapping a Single Community District’s Local Projects</h4><p>Another useful application of this rich, project-level data is discrete mapping of individual projects. Of course, we don’t have latitude/longitude coordinates in the data, but we can’t let that stop us.</p><p>I manually looked up each of the 46 projects that serve my home community district, Brooklyn 6, assigning a point coordinate to each one. The location, combined with the total spending and project description makes for a fascinating visual of what’s going on with the in my area ($480.9M of actual + planned spending).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flfai8jis3tONBMNae_HTQ.png" /><figcaption>Manual Geocoding of Local Capital Projects makes it possible to visualize the spending of hundreds millions of dollars on a map</figcaption></figure><p>The big ones include water and sewer reconstruction along with reconstruction of the drawbridge over the Gowanus Canal. It’s also interesting to see the taxpayers contribute to the cruise terminal. The projects in Prospect Park generally list all of the surrounding districts as served, so we can see some interesting projects like renovations to the carousel, a comfort station, and the LeFrak Center (I thought this was complete but I guess it’s still an active project)</p><p>What does $3.7M for ADA accessibility at Brooklyn’s smallest library branch (Pacific Street) entail?</p><p>Why does HVAC replacement at the Carroll Gardens Library cost $4M?</p><p>What does $15.9M of ball field improvements in Red Hook actually look like?</p><p>This dataset probably raises more questions than it answers, but I think that’s the point. <strong>Now we can see, sum, map, chart, and otherwise have more visibility and informed discussions about how we spend our capital dollars.</strong></p><h4><strong>Next Steps</strong></h4><p>Mapping capital spending has been a white whale of mine for a while (I actually worked on this during my time at the Department of City Planning but the project never saw the light of day). Obviously, we need to assign latitude/longitude coordinates to the other 4000 or so capital projects that serve local community districts, so we can expand the map above to the whole city. On top of that, there’s so much rich data about each project that static visuals don’t do it justice. An interactive tool where we can combine the mappable projects with the citywide projects and allow the user to “surf the budget” is in order, and would go a long way towards making this information useful and actionable to community groups, politicians, and anyone else with a stake in how we invest in our city.</p><p>If you’d like to help out with this effort, we’d love to hear from you. Of course, we’ll be managing the data in <a href="http://qri.io/">qri, our cutting-edge version control system for datasets</a>, so every contribution will be trackable and public for the world to see.</p><p>Thanks for reading! Let us know what you found exploring the maps on this blog post by <a href="https://twitter.com/qri_io">giving us a yell on twitter</a>.</p><p><a href="https://github.com/qri-io/data-stories-scripts/tree/master/nyc-capital-projects/scraper">Data scraping code</a> (node/javascript)<br><a href="https://github.com/qri-io/data-stories-scripts/tree/master/nyc-capital-projects/analysis">Code for the analysis and graphics used in this post</a> (RStudio)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*3VNO3ccTlI-wTBaVb2T76g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97a23af250c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/mapping-billions-in-nyc-capital-spending-97a23af250c2">Mapping Billions in NYC Capital Spending</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Daily Aggregate Dataset from Raw Citibike Trip Data]]></title>
            <link>https://medium.com/qri-io/building-a-daily-aggregate-dataset-from-raw-citibike-trip-data-2b6502009871?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b6502009871</guid>
            <category><![CDATA[urban-planning]]></category>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[citi-bike]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[transportation]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 15:23:24 GMT</pubDate>
            <atom:updated>2020-11-19T16:28:02.091Z</atom:updated>
            <content:encoded><![CDATA[<p>This post describes the creation of nyc-transit-data/citibie_daily_counts_2020 , a Qri dataset which includes station-level trip start and end counts for the New York City bike share system. While this is a simple aggregation that any reasonable data analyst should be able to perform, the value add here is sharing it as its own product, so others can use it immediately without having to download several large CSV files and write the code on their own. We’re saving the world disk space and time!</p><p>tl;dr just give me the data please: <a href="https://qri.cloud/nyc-transit-data/citibike_daily_counts_2020">https://qri.cloud/nyc-transit-data/citibike_daily_counts_2020</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*JCWhtn2A_PcsYIAQUdlOJA.jpeg" /><figcaption>Photo: Flickr user Nestor Galina <a href="https://www.flickr.com/photos/nestorgalina/49545245067/in/photolist-2iu9kee-fuAJiv-fuR2xE-eyVzjM-vYaeRU-2gefYPV-eLe3WF-ectWNa-n96E2Q-2hA3thm-APJJkh-ecD1Hj-i8Nqte-284umUn-hN6PUs-rHiU6L-ejZyuZ-mDR828-mDR85V-eSpeat-rU7bFY-eSz7Lf-eSqCCg-rKBHrs-D5stWm-kgNhst-kgNnp2-kXjY2L-ehpefq-rUetuM-rBM4Dx-opw76d-A3wMC7-GMgfXF-LbWDzq-s3ac8K-rquPA2-284uLir-rAKVFz-2icxDyc-fnbw2D-2agTUfV-2k5Ufys-H92jaM-rBEKgy-iavGJU-rzWrir-rZWfmm-r6dZaG-weqBxA">https://www.flickr.com/photos/nestorgalina</a></figcaption></figure><p><strong>The Status Quo</strong></p><p>Citibike does a great job publishing archival trip data on their website at <a href="https://citibikenyc/system-data">https://citibikenyc/system-data</a>. When you click “<a href="https://s3.amazonaws.com/tripdata/index.html"><strong>Download Citi Bike trip history data</strong></a>”, you land on the index page of an S3 bucket, where a zip file for each month of data awaits you. The archives go back to 2013!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpZy1EvG3XSszs84NZlu2g.png" /><figcaption>Raw monthly citibike trip data lives in well-named ZIP files in an S3 bucket</figcaption></figure><p>So what’s in the data? Here’s a glimpse of what’s inside the dataset for October 2020 (101MB zipped, 427MB unzipped!). This is already becoming a substantial disk space commitment if you want to look at multiple months worth of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JnMXKC58Ah_ywcA8Zzu8Q.png" /><figcaption>The raw data contains a row for each trip, with a lot of duplicate data about each station</figcaption></figure><p>We can see that each row is a single trip, with the duration, start time, end time, start station details (and location), end station details, etc. There’s even a birth year and gender. There’s also a bike id, meaning it is possible to track a single bike in its travels around the city. Someday it might be fun to animate a bike’s journey, similar to <a href="http://chriswhong.github.io/nyctaxi/">the way I did with Taxis back in 2014</a>, but I digress.</p><p><strong>The Code</strong></p><p>I chose to do this aggregation in R Studio, but it could just as easily have been done in Python/Jupyter or even Javascript. <a href="https://github.com/qri-io/data-stories-scripts/tree/master/citibike-dailies">The full code is on github if you want to take a look</a>.</p><p>First, I manually downloaded each of the monthly zips for 2020 and unzipped them. This can be scripted too, but I already had them on disk from an earlier analysis.</p><p>Next, I wrote a function called processMonth which, as the name suggests:</p><ul><li>reads a single months’s csv</li><li>pulls out the calendar date from the trip start timestamp</li><li>creates a lookup table for each unique station</li><li>counts the trip starts for each day/station</li><li>counts the trip ends for each day/station</li><li>joins the start counts, end counts, and station info</li></ul><pre>processMonth &lt;- function(month) {<br>  raw &lt;- read_csv(paste(&quot;/Users/chriswhong/Sites/citibike-daily/raw/&quot;, month, &#39;-citibike-tripdata.csv&#39;, sep=&#39;&#39;))<br>  <br>  # clean names, extract the date from the timestamp<br>  daily &lt;- clean_names(raw) %&gt;% mutate(date = as.Date(starttime))<br>  <br>  startstations &lt;- distinct(daily, start_station_id, .keep_all = TRUE) %&gt;%<br>    select(start_station_id, start_station_name, start_station_longitude, start_station_latitude) %&gt;%<br>    rename(station_id = start_station_id, station_name = start_station_name, station_longitude=start_station_longitude, station_latitude = start_station_latitude)<br>  <br>  endstations &lt;- distinct(daily, end_station_id, .keep_all = TRUE) %&gt;%<br>    select(end_station_id, end_station_name, end_station_longitude, end_station_latitude) %&gt;%<br>    rename(station_id = end_station_id, station_name = end_station_name, station_longitude=end_station_longitude, station_latitude = end_station_latitude)<br>  <br>  station_lookup &lt;- bind_rows(startstations, endstations) %&gt;% distinct(station_id, .keep_all = TRUE)<br>  <br>  <br>  # count daily trip starts for each station/date<br>  daily_starts &lt;- group_by(daily, date, start_station_id) %&gt;%<br>    summarize(startcount = n()) %&gt;%<br>    rename(station_id = start_station_id)<br>  <br>  # count daily trip ends for each station/date<br>  daily_ends &lt;- group_by(daily, date, end_station_id) %&gt;%<br>    summarize(endcount = n()) %&gt;%<br>    rename(station_id = end_station_id)<br>  <br>  # full join them so we don&#39;t lose any where there were starts but not ends and vice versa<br>  combined &lt;- full_join(daily_starts, daily_ends, by = c(&#39;date&#39;, &#39;station_id&#39;))<br>  <br>  with_station_info &lt;- left_join(combined, station_lookup, by=&#39;station_id&#39;)<br>  <br>  return with_station_info<br>  <br>}</pre><p>Once I had this function working correctly for one month, all I had to do was run it for each month, combine the results together, and a new CSV is born!</p><pre>dailies &lt;- list()</pre><pre>months &lt;- c(&#39;202001&#39;, &#39;202002&#39;, &#39;202003&#39;, &#39;202004&#39;, &#39;202005&#39;, &#39;202006&#39;, &#39;202007&#39;, &#39;202008&#39;, &#39;202009&#39;, &#39;202010&#39;)<br>for (i in months) {<br>  dailies[[i]] &lt;- processMonth(i)<br>}</pre><pre># combine all of the months into a single table<br>for (i in seq_along(months)) {<br>  if (i == 1) {<br>    combined &lt;- dailies[[months[1]]]<br>  } else {<br>    combined &lt;- bind_rows(combined, dailies[[months[i]]])<br>  }<br>}</pre><pre># write to CSV<br>write_csv(combined, &#39;/Users/chriswhong/Sites/citibike-daily/citibike-daily-counts-2020.csv&#39;)</pre><p>Here’s what citibike-daily-counts-2020.csvlooks like (now just 20MB!):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IAMzfTM6Ow2IiPNFMg09kg.png" /><figcaption>A new dataset is born! Daily starts and ends for each station for 2020 is easy to use, and is only 20MB in size</figcaption></figure><p>At the top of the dataset are all the aggregates for January 1, 2020, each row is a station with a count of starts, count of ends, a human-friendly station name, and lat/lon coordinates for mapping.</p><p>The 2020 dataset has been pushed to qri.cloud, where it’s hosted for all to find. If you find it useful, we’d love to hear about it!</p><p><a href="https://qri.cloud/nyc-transit-data/citibike_daily_counts_2020">Citibike Daily Counts 2020 | Dataset Published on qri.cloud</a></p><p><strong>A Quick Chart</strong></p><p>The original prompt for the creation of this dataset came from a Qri user and fellow urban data analyst, <a href="https://twitter.com/benoldenburg?lang=en">Ben Oldenburg</a>. He’s been <a href="https://observablehq.com/@benoldenburg/nyc-subway-turnstile-counts-on-qri">making use of the 2020 NYC Subway Turnstile Counts dataset in some projects</a>, and wondered if a similar “daily aggregates” dataset existed for Citibike. The answer was no, so we decided to make one.</p><p>This is the chart we were after, a quick visual of the effects of the arrival of coronavirus on Citibike traffic in March, followed by what looks like a recovery. We would need to compare this to previous years or ask a citibike expert (I am not one) to get a better feel for “normal”, but the curve is clearly quite different from what we see in the subway data.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2F5k6eP%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2F5k6eP%2F1%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d8cbf251fcbd1a0fcb8cd7cee2a0ba5/href">https://medium.com/media/9d8cbf251fcbd1a0fcb8cd7cee2a0ba5/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FRK9Fh%2F3%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FRK9Fh%2F3%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="350" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cfc26bb9cc64b933883c414173f4f0e/href">https://medium.com/media/6cfc26bb9cc64b933883c414173f4f0e/href</a></iframe><p>Is this dataset helpful to you? Is anything missing? Do you *really* want us to make the same dataset for 2013–2019 and Jersey City? <a href="https://twitter.com/qri_io">Give us a yell on twitter</a> or <a href="https://discordapp.com/invite/thkJHKj">drop into our Discord</a> and let us know what features you’d find helpful. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b6502009871" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/building-a-daily-aggregate-dataset-from-raw-citibike-trip-data-2b6502009871">Building a Daily Aggregate Dataset from Raw Citibike Trip Data</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Happy Birthday, Mr. President-Elect]]></title>
            <link>https://medium.com/qri-io/happy-birthday-mr-president-elect-cb1ffdd88f6b?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/cb1ffdd88f6b</guid>
            <category><![CDATA[scorpio]]></category>
            <category><![CDATA[birthday]]></category>
            <category><![CDATA[us-president]]></category>
            <category><![CDATA[joe-biden]]></category>
            <category><![CDATA[astrology]]></category>
            <dc:creator><![CDATA[Rico Gardaphe]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 14:25:10 GMT</pubDate>
            <atom:updated>2020-11-19T14:25:17.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OzvjGePIlYViOhUi.jpg" /><figcaption>Source: Click Americana</figcaption></figure><p>November 20th is President-Elect Joe Biden’s 78th Birthday.</p><p>When he becomes President on January 20, 2021, he will have had the most birthdays of any President assuming the office. To celebrate, here’s a rundown of our 46 Presidents* and their birthdays. Happy Birthday, Mr. President-Elect!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GJg3-Je4yBexi6a1RmAJg.png" /></figure><h4>Useless Trivia:</h4><ul><li>Only two Presidents share a birthday (11/2): Warren G. Harding and James Polk. *<em>Grover Cleveland was both the 22nd and 24th President. I’m not sure that counts.</em></li><li>We’ve yet to have a President born on the following dates of any given month (3rd, 17th, 21st, 25th, 26th &amp; 31st).</li><li>October &amp; November are tied for the most popular presidential birth month (6 Presidents born in each month).</li><li>May is the least popular presidential birth month with only 2 (Truman and Kennedy).</li></ul><h4>What’s Written in the Stars (&amp; Stripes)</h4><p>If you’re into Astrological signs, Joe Biden’s ascension to the Presidency puts Scorpios ahead (breaking the tie with Aquarius) in the lead among US Presidents at 6:</p><p><strong>Scorpio (6): </strong>John Adams, James K. Polk, James A. Garfield, Theodore Roosevelt ,Warren G. Harding, Joseph Biden</p><p><strong>Aquarius (5): </strong>William Henry Harrison, Abraham Lincoln, William McKinley, Franklin Roosevelt, Ronald Reagan</p><p><strong>Taurus (4): </strong>James Monroe, James Buchanan, Ulysses S. Grant, Harry S Truman</p><p><strong>Capricorn (4): </strong>Millard Fillmore, Andrew Johnson, Woodrow Wilson, Richard Nixon</p><p><strong>Libra (4): </strong>Rutherford B. Hayes, Chester Arthur, Dwight Eisenhower, Jimmy Carter</p><p><strong>Pisces (4): </strong>George Washington, James Madison, Andrew Jackson, Grover Cleveland</p><p><strong>Leo (4): </strong>Benjamin Harrison, Herbert Hoover, Bill Clinton, Barack Obama</p><p><strong>Cancer (4): </strong>John Quincy Adams, Calvin Coolidge, Gerald Ford, George W. Bush</p><p><strong>Gemini (3):</strong> John F. Kennedy, George H.W. Bush, Donald Trump</p><p><strong>Sagittarius (3): </strong>Martin Van Buren, Zachary Taylor, Franklin Pierce</p><p><strong>Aries (2): </strong>Thomas Jefferson, John Tyler</p><p><strong>Virgo (2): </strong>William Howard Taft, Lyndon B. Johnson</p><h4>Get the data!</h4><p>The data is free for you to take and play with. Consider adding more interesting data (age on Inauguration day, party affiliation, VP(s) and their birthdays, and on and on….), or generating more useless (or perhaps useful) trivia with what’s already in there!</p><p><a href="https://qri.cloud/rico/potus_bdays">Birthdays &amp; Astrological Signs of US Presidents | Dataset Published on qri.cloud</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb1ffdd88f6b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/happy-birthday-mr-president-elect-cb1ffdd88f6b">Happy Birthday, Mr. President-Elect</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You’re probably underrepresented in the U.S. Senate.]]></title>
            <link>https://medium.com/qri-io/youre-probably-underrepresented-in-the-u-s-senate-a2c1f7068b06?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/a2c1f7068b06</guid>
            <dc:creator><![CDATA[Rico Gardaphe]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 18:36:47 GMT</pubDate>
            <atom:updated>2020-11-16T19:36:33.064Z</atom:updated>
            <content:encoded><![CDATA[<p>…but how badly?</p><p>This post is a follow-up to my first piece e<a href="https://medium.com/qri-io/the-electoral-college-is-the-tail-the-senate-is-the-dog-d7c0755d6fcb">xploring the disparities of power and representation across U.S. states in the Electoral College and the U.S. Senate</a>. The stars of that post were the cases of Wyoming v. California, and Vermont v. Texas (pairings intended to show the most dramatic disparities). In this post, I thought I’d zoom out a bit and offer a view on the full landscape of states.</p><h3>“The Virtue of a Proportional Response”</h3><p>First, I’d like to acknowledge that I understand the U.S. Senate never was proportional, was not designed to be proportional, will likely never be proportional, and perhaps should not be proportional. I offer this analysis principally to explore an interesting question (how far off are various states’ representation in the US senate today from a proportional arrangement?), and to educate myself and others on the current state of affairs.</p><p>To that end, I built the table below showing each U.S. state and the percentage of representation/power it has today compared to what each might under a perfectly proportional system.</p><p>If a proportional allocation of power is the goal, then 100% would be the goal for each state. States below 100% are ‘underrepresented’ today, and states above 100% are ‘overrepresented.’</p><p>For example, North Dakota has 860% of the representation or power it ‘should’ have in the Senate (Should is in quotes, again presuming proportionality is the goal). It is 760% over-represented.</p><p>Here’s how I calculated those percentages:</p><p><strong>Proportional Ratio: </strong>Under a perfectly proportional system, America’s 327 million residents would be represented by 100 senators at a ratio of 3.27M per Senator.</p><p><strong>Present-Day Ratio: </strong>I calculated this ratio (population per Senator) by dividing each state’s current population by its count of Senators (2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*urPCuE_fpP5aGjSEpOOU7Q.png" /></figure><p>I then divided each state’s Present-Day Ratio by its Proportional Ratio and built this table. If a state is proportionally well-represented today, that ratio should be close to 1, or 100%. States below 100% are ‘under-represented’ (in red), states above 100% are over-represented (in green).</p><p>Finally, I graphed the results.</p><h3>Plot the Dots</h3><p>The graph below shows U.S. states along the X-axis, and their relative percentages of their populations’ under or over-representation in the Senate along the Y-axis. If a state is below the green dotted line, set at the now familiar 100%, it is underrepresented, and if the state is above it, it is overrepresented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOz0gmoIcxtgRXRZCoFnWQ.png" /></figure><p>The graph above tells a dramatic story about the states in the upper right-hand corner, but it leaves the false impression that the states crowded near the dotted green line (from California to Kentucky) are in the same ‘representation ballpark.’</p><p>I assure you, they are not.</p><h3>The Population Price (Per Senator)</h3><p>Here’s essentially the same information presented above, but more simply. Below is a graph sorted by each state’s ratio of its population per Senator. I simply took each state’s population and divided it by two. I also coded each bar (red, blue, purple or grey) with the political party breakdown of its Senate delegation in the 117th Congress (the next Congress).</p><p>If we allow for the idea of paying a ‘population price’ per Senator, the states above the dotted green line pay too much (their populations are above the average of 6.55M of perfectly proportional system), the states below the dotted green line are getting a deal on representation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DoMfVLCX-Tkn6SYCbIh7BQ.png" /><figcaption>The US has 327m residents and 100 Senators, giving us a ratio of 3.275m residents per Senator under a proportional system. The green line in the graph above is set to that ratio, showing which states’ ratios fall above or below it.</figcaption></figure><p>It’s worth noting that the first (and most populous) nine states from the left (California, Texas, Florida, New York, Pennsylvania, Illinois, Ohio, Georgia, &amp; North Carolina) represent over half of the total US population. <strong>Yes, 50% of the population are represented by just 18% of the Senators.</strong></p><p>From <a href="https://qri.cloud/rico/electoral_college_and_senate_disparities">this data alone</a> it’d be inaccurate to conclude that ‘blue’ states are disadvantaged in the Senate and red states are advantaged, <a href="https://fivethirtyeight.com/features/the-senate-has-always-favored-smaller-states-it-just-didnt-help-republicans-until-now/">although that’s probably true today</a>. First, a state’s Senate delegation is only one way to define its ‘redness’ or ‘blueness,’ and the binary nature of the two colors betray the competitiveness of any given race in any given year. Second, Congressional (House) delegations are more nuanced (ignoring the warping that happens via gerrymandering) and are determined 3 times as often (every two years vs. every six years). There are more reasons. I’m just saying, you can’t ONLY use this analysis to say one party or the other suffers more or less because of the structural design of the Senate.</p><h3>Solutions</h3><p>I don’t have them. Sorry. My only goal here was to crunch the data (linked below) in an effort to educate myself and anyone else about the existing disparities in representation. For now, there seems to be enough work just convincing folks that this is a problem (in my circles anyway). You may think Vermont’s 46x advantage over Texas in the Senate is not a problem, but at least now you know the scale of the advantage.</p><p>I’ll close out this two-part series of Senate bashing by directing you to some articles that explore this issue further. Some even lay out interesting scenarios for resolving the problems that arise from the wacky system we’ve designed for ourselves.</p><ul><li><a href="https://www.theatlantic.com/ideas/archive/2019/01/heres-how-fix-senate/579172/">The Path to Give California 12 Senators, and Vermont Just One</a></li><li><a href="https://www.vox.com/mischiefs-of-faction/2019/4/9/18300749/senate-problem-electoral-college">The Senate is a much bigger problem than the Electoral College</a></li><li><a href="https://harvardlawreview.org/2020/01/pack-the-union-a-proposal-to-admit-new-states-for-the-purpose-of-amending-the-constitution-to-ensure-equal-representation/">Pack the Union: A Proposal to Admit New States for the Purpose of Amending the Constitution to Ensure Equal Representation</a></li><li><a href="https://www.cnn.com/2018/07/10/politics/small-states-supreme-court/index.html">Small states are getting a much bigger say in who gets on Supreme Court</a></li><li><a href="https://medium.com/qri-io/the-electoral-college-is-the-tail-the-senate-is-the-dog-d7c0755d6fcb">The Electoral College is the Tail. The Senate is the Dog.</a></li></ul><h3>Get the data</h3><p>Surely there are other interesting factors aside from gross population (GDP contributions by state, income data, age distribution, population density, etc.) you can use to say something interesting about our states and how they’re represented.</p><p>I encourage you to play with the data I’ve made available and run some comparisons of your own. I’ve published the dataset I built &amp; used on qri cloud — a platform for publishing and discovering open data projects:</p><p><a href="https://qri.cloud/rico/electoral_college_and_senate_disparities">Electoral College &amp; Senate Disparities | Dataset Published on qri.cloud</a></p><p>You’re free to download my data, subscribe to updates (as I publish new versions), or continue the conversation there by filing an issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2c1f7068b06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/youre-probably-underrepresented-in-the-u-s-senate-a2c1f7068b06">You’re probably underrepresented in the U.S. Senate.</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Electoral College is the Tail. The Senate is the Dog.]]></title>
            <link>https://medium.com/qri-io/the-electoral-college-is-the-tail-the-senate-is-the-dog-d7c0755d6fcb?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/d7c0755d6fcb</guid>
            <category><![CDATA[election-2020]]></category>
            <category><![CDATA[senate]]></category>
            <category><![CDATA[gerrymandering]]></category>
            <category><![CDATA[electoral-college]]></category>
            <category><![CDATA[electoral-college-reform]]></category>
            <dc:creator><![CDATA[Rico Gardaphe]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 16:21:14 GMT</pubDate>
            <atom:updated>2020-11-12T02:24:02.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZJ8KbROdirPga_ya.jpg" /><figcaption>Pueblo Lith. Co., <em>THE SILVER DOG WITH THE GOLDEN TAIL. Will the Tail Wag the Dog, or the Dog Wag the Tail?</em> Pueblo: Nuckolls Packing Co., [1896?] Source: <a href="https://bostonraremaps.com/inventory/silver-dog-with-golden-tail/">https://bostonraremaps.com/inventory/silver-dog-with-golden-tail/</a></figcaption></figure><p>As another presidential election comes and goes, calls for Electoral College reform, too, come and go. The Electoral College is an easy, popular, and worthy punching bag… to me anyway.</p><p>In recent weeks, I’ve engaged in vigorous discussions with friends about the Electoral College. I tried to make the case that it is 1) <a href="https://www.vox.com/21142223/electoral-college-2020-election-jesse-wegman">antiquated</a> 2) <a href="https://www.nytimes.com/2020/09/08/opinion/electoral-college-trump-biden.html">undemocratic &amp; unfair</a> and 3) <a href="https://www.hks.harvard.edu/more/policycast/if-electoral-college-relic">racist</a>. I’ve also made the far simpler case: the electoral college distorts the will of voters.</p><p><em>Isn’t that obvious? Isn’t that, by definition, true? Isn’t that… really easy to prove? </em>I was frustrated by the resistance I got to accepting that as fact. So, I pivoted:</p><blockquote><strong>“At least it’s not as undemocratic as the U.S. Senate!”</strong></blockquote><p>As most Americans ought to know, each state is delegated electors based on its count of seats in the House of Representatives (allocated based on population, with each house district representing roughly 700,000 people — <em>kind of democratic!</em>), and its count of seats in the Senate (two per state, regardless of population—<em>democratic for states, but not for people!</em>).</p><p>Because there are 100 electors apportioned based on the count of Senate seats, and 438 electors apportioned based on the count of House seats (Washington, D.C. gets three electors despite not having Senators, and only one, non-voting Congressperson), the electoral college outcome is more heavily weighted by votes that come from a proportional-by-population system (House). The <a href="https://www.npr.org/2020/03/18/817506054/electoral-college-not-carved-in-stone-author-advocates-rethinking-how-we-vote">winner-take-all nature</a> of the way electoral votes are won on in the presidential election essentially erases the value this proportionality provides. This is another issue worthy of scrutiny, but not the target of this humble blog post.</p><h3>The Electoral College is the tail.</h3><p>Let’s compare the power our most and least populous states, California and Wyoming respectively, have in the electoral college.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*g540C3r3I5ZtoVCMCNqBeg.png" /></figure><ul><li>California’s 55 electoral votes are determined by the voters among its <a href="https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States_by_population">population of 39,512,223</a>, giving us a ratio of 718,404 people per electoral vote.</li><li>Wyoming’s 3 electoral votes are determined by the voters among its <a href="https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States_by_population">population of 578,</a>759, giving us a ratio of 192,920 people per electoral vote.</li></ul><p><strong>Wyoming voters have 3.7 times the power Californians have in the Electoral College.</strong></p><p>When you average out the entire US population per electoral vote and compare each state, California voters have 85% of the power they would under a perfectly proportional electoral college, and Wyoming voters today have 317% of the power they would have under the same system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbSe9018i15pdef_2FZV3Q.png" /></figure><p>A 3.7x disparity is alarming enough to justify reform. However, my beef is less with the Electoral College than it is with the U.S. Senate.</p><h3>The Senate is the dog.</h3><p>The undemocratic nature of the Electoral College does its damage one day every four years (obviously ignoring <a href="https://twitter.com/jonathanchait/status/1317807945376288768?s=20">how it shapes campaigns</a>, candidates, priorities, messaging, policy agendas etc., which we really shouldn’t do...). The undemocratic nature of the Senate, however, is at work every day of every year, or 1459 days every four years.</p><p>While the House of Representatives was designed to be proportional, the Senate was <a href="https://avalon.law.yale.edu/18th_century/fed62.asp">designed to be “equal”</a>:</p><blockquote><em>“The equality of representation in the Senate is another point, which, being evidently the result of compromise between the opposite pretensions of the large and the small States, does not call for much discussion. If indeed it be right, that among a people thoroughly incorporated into one nation, every district ought to have a PROPORTIONAL share in the government, and that among independent and sovereign States, bound together by a simple league, the parties, however unequal in size, ought to have an EQUAL share in the common councils, it does not appear to be without some reason that in a compound republic, partaking both of the national and federal character, the government ought to be founded on a mixture of the principles of proportional and equal representation.”</em></blockquote><blockquote><em>— James Madison, The Federalist Papers №62</em></blockquote><p>The distortion of the public will generated by that design, however, has only <a href="https://www.vox.com/policy-and-politics/2019/12/17/21011079/senate-bias-2020-data-for-progress">grown over time</a> as populations boom unevenly across our states over the last century.</p><p>In a country with 327 million residents (half of whom live in just 9 states), each U.S. Senator would represent 3.275 million residents in a perfectly proportional system. To show how far we’re off from that ratio, let’s look at California and Wyoming again.</p><ul><li>California’s ratio of population (39.5M) to U.S. Senator (2) is over 19.7 million.</li><li>Wyoming’s is 289,380.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*df7l6idwQTeg9fMvjrOI6g.png" /></figure><h4>Under a perfectly proportional system…</h4><ul><li>Californians are 12.06% of the U.S. population. They ‘should’ have 12.06 Senators representing them instead of 2.</li><li>Californians today have <strong>17% of the Senate representation they ‘should’ have </strong>in a perfectly proportional system.</li><li>Wyomingites are 0.18% of the U.S. population. They ‘should’ have 0.18 Senators representing them instead of 2.</li><li>Wyomingites today have over <strong>1,100% (11x) of the representation they ‘should’ have</strong> in a perfectly proportional system.</li></ul><p><strong>Put it together: Wyoming voters today have over 68x times the power Californians have in the U.S. Senate.</strong></p><p>In terms of disparities and warping the public will, the Electoral College is the tail, the Senate is the dog.</p><p>The dog wags the tail.</p><h3>So, what about the other states?</h3><p>I ran this same analysis (comparing their power disparities under the current Electoral College and Senate arrangement versus a more proportional one, and published the data on <a href="https://airtable.com/shrxYsRBQTptjCkRm">Airtable</a> &amp; <a href="https://qri.cloud/rico/electoral_college_and_senate_disparities">Qri Cloud</a>.</p><p>Here’s how to interpret the key columns:</p><ul><li>Any state with a percentage below/above 100% in the “Percent of EC Power they Should Have” column is under/over-represented in the Electoral College.</li><li>Any state with a percentage below/above 100% in the “Percent of the Senate Power they Should have” column is under/over-represented in the U.S. Senate.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FshrxYsRBQTptjCkRm&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FshrxYsRBQTptjCkRm&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/e93d188dcedf7e869990b2210cf2c5b9/href">https://medium.com/media/e93d188dcedf7e869990b2210cf2c5b9/href</a></iframe><h4>What about Vermont v. Texas?</h4><p>Successfully arguing for Electoral College and Senate reform hits an obvious wall when you fail to make the case bi-partisan. So, let’s do a quick analysis comparing Vermont (blue state, 49th in population) and Texas (red state, 2nd in population):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fBgOFmdSzr-Xs2BIZlj1g.png" /></figure><p><strong>The California vs. Wyoming case is quite comparable to Texas v. Vermont</strong></p><ul><li>Texas voters have 80% of the power in the Electoral College they ‘should’ have and 23% of the power in the Senate they ‘should’ have.</li><li>Vermont voters have 294% of the power in the Electoral College they ‘should’ have and 1,050% of the power in the Senate they ‘should’ have.</li></ul><p><strong>Vermonters have 3.7x the voting power in the Electoral College as Texans do, but 46.5x the voting power in the Senate!</strong></p><p>If you’d like to get your hands dirty with the data I used, I strongly recommend going to the version on <a href="https://qri.cloud/">Qri Cloud</a>, because there you’ll also have access to column descriptions, useful metadata, readme info, and structure/schema data, and any new versions, should I choose to update it (all of which ride together when you pull the dataset!).</p><p><a href="https://qri.cloud/rico/electoral_college_and_senate_disparities">Electoral College &amp; Senate Disparities | Dataset Published on qri.cloud</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c0755d6fcb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/the-electoral-college-is-the-tail-the-senate-is-the-dog-d7c0755d6fcb">The Electoral College is the Tail. The Senate is the Dog.</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Archiving your Google Sheets Data with Qri]]></title>
            <link>https://medium.com/qri-io/archiving-your-google-sheets-data-with-qri-f84efda4bf3f?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/f84efda4bf3f</guid>
            <category><![CDATA[google-sheets-api]]></category>
            <category><![CDATA[qris]]></category>
            <category><![CDATA[dataset-version-control]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[google-sheets]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Thu, 29 Oct 2020 15:23:31 GMT</pubDate>
            <atom:updated>2020-10-30T13:09:35.036Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past 15 years, Google Sheets have become a popular way to manage human-scale data for individuals and teams. While spreadsheets aren’t always the best approach to enforcing data quality standards, collaborative editing in the cloud beats emailing files back and forth, and teams everywhere are firing up google sheets and setting up data tables that can be easily exported to CSV.</p><p>Qri (pronounced “query”) is a version control system for datasets. Our software is designed to make datasets more robust, documented, portable, and trustworthy, in ways that file-based data and traditional databases cannot. When you create a Qri Dataset, each version is signed, hashed, timestamped, and immutable… a snapshot of the data that carries crucial metadata with it and is easy to move around.</p><p>So Google Sheets is great for editing data, and Qri is great for archiving and sharing data… I think maybe they should talk!</p><p><strong>The Setup</strong></p><p>I found <a href="https://www.mashed.com/245638/the-best-pizza-place-in-every-state/">a Mashed article about the best pizza place in each U.S</a>. state and figured it would make a wonderful 50-row dataset in Qri, but I wanted the convenience of Google Sheets to manually modify the data. I copied the state and pizza place name from the text on the website and created a simple table with two columns: state and pizza_joint . I then added a website column that would need to be manually filled in. <a href="https://docs.google.com/spreadsheets/d/1YiKHmeA6V8LvDYz-Ju1dw6RUEjWZjJPwIhan_3kJz-4/edit?usp=sharing">Here’s the sheet.</a> If you want to help fill in the data, request editor access!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*UO7sME2H4CijsLTrPxHpkQ.png" /></figure><p>For demonstration purposes, I’ve written a <a href="https://github.com/qri-io/data-stories-scripts/tree/master/qri-googlesheets">node.js script</a> that downloads the sheet as a CSV, then uses that CSV to run qri save on the Qri dataset chriswhong/best-pizza-place-in-every-state. Finally, the Qri dataset is published to <a href="https://qri.cloud/">qri.cloud</a> where anyone can see the version history and pull/download the latest version of the data!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*5QPlYzKWhwnQ8PYxvUeeJg.png" /><figcaption>A simple node script pulls a CSV from google sheets, then commits a new version of the Qri Dataset</figcaption></figure><p>The dataset now has a home on the web at <a href="https://qri.cloud/chriswhong/best-pizza-place-in-every-state">https://qri.cloud/chriswhong/best-pizza-place-in-every-state</a>. Qri.cloud is not just hosting my data, it’s making it discoverable in search engines and providing access to the readme, metadata, and schema information that lives along with my table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XRAxAWBa--LdfyWXlz6NSg.png" /><figcaption>qri.cloud gives each dataset a landing page, history, integration shortcuts, issue queues, etc. It’s like your own personal data publishing portal!</figcaption></figure><p>This dataset, and all of the different incremental versions are now available for pulling and downloading on qri.cloud. You can even follow the dataset to get an email notification each time I update it. If the dataset becomes more popular, I’ll have an incentive to make sure it’s more complete, and maybe add columns that will be helpful to other users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqsSCfgvXwDlVzbjiaaAFw.png" /><figcaption>The full history of each dataset can be inspected so users can see what changed and when. Each version is immutable, signed, and timestamped.</figcaption></figure><p><strong>Towards a Google Sheets Connector</strong></p><p>This example is a proof of concept for moving data between Google Sheets and Qri, and lays some of the groundwork for a proper connector between the two platforms. What could this look like? One idea is to use <a href="https://qri.io/desktop">Qri Desktop</a> as the jumping off point, allowing the user to quickly create a new dataset linked to a Google Sheet, and commit new versions with a click.</p><p>Another idea is to have the integration UI live in the Google Sheets UI (or as a browser plugin) which watches the sheet for changes and allows for a quick commit of a new Qri version.</p><p>What would you want in an Google Sheets/ Qri integration? <a href="https://twitter.com/qri_io">Give us a yell on twitter</a> or <a href="https://discordapp.com/invite/thkJHKj">drop into our Discord</a> and let us know what features you’d find helpful. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f84efda4bf3f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/archiving-your-google-sheets-data-with-qri-f84efda4bf3f">Archiving your Google Sheets Data with Qri</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Archiving your Airtable Data with Qri]]></title>
            <link>https://medium.com/qri-io/archiving-your-airtable-data-with-qri-12dbda8783c3?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/12dbda8783c3</guid>
            <category><![CDATA[qris]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[reef-tank]]></category>
            <category><![CDATA[dataset]]></category>
            <dc:creator><![CDATA[Chris Whong]]></dc:creator>
            <pubDate>Thu, 29 Oct 2020 15:22:50 GMT</pubDate>
            <atom:updated>2020-10-29T15:22:50.221Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past few years, Airtable has emerged as a popular way to manage human-scale data for individuals and teams. It lives somewhere between a spreadsheet and a database, and makes it really to set specific column types (strings, numbers, email addresses) to control inputs, manage joins and lookups to other tables, and do it all via an intuitive web UI and mobile app.</p><p>Qri (pronounced “query”) is a version control system for datasets. Our software is designed to make datasets more robust, documented, portable, and trustworthy, in ways that file-based data and traditional databases cannot. When you create a Qri Dataset, each version is signed, hashed, timestamped, and immutable… a snapshot of the data that carries crucial metadata with it and is easy to move around.</p><p>So Airtable is great for editing data, and Qri is great for archiving and sharing data… I think maybe they should talk!</p><p><strong>The Setup</strong></p><p>I actually use Airtable in the real world as a way to easily log water chemistry data for my reef aquarium. A few times a month I am measuring pH, alkalinity, salinity, nitrates, phosphates, etc, to make sure everything is within acceptable ranges. Here’s what the Airtable looks like:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2Fshr41hTHVr15cRKJx%2Ftbl6PqwDtsxbspPyp&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2Fshr41hTHVr15cRKJx%2Ftbl6PqwDtsxbspPyp&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/48b624e35456ff131349057cfec4db61/href">https://medium.com/media/48b624e35456ff131349057cfec4db61/href</a></iframe><p>For demonstration purposes, I’ve written <a href="https://github.com/qri-io/data-stories-scripts/tree/master/qri-airtable">a node.js script</a> that pulls the data from the Airtable API, transforms it to a CSV, then uses that CSV to run qri save on the Qri dataset chriswhong/reef-tank-water-testing. Finally, the Qri dataset is published to qri.cloud where anyone can see the version history and pull/download the latest version of the data!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*9o5siaDIYYcDfU8CaQmglA.png" /><figcaption>A simple node script pulls data from the Airtable API, saves a CSV, then commits a new version of the Qri Dataset</figcaption></figure><p>The dataset now has a home on the web at <a href="https://qri.cloud/chriswhong/reef-tank-water-testing">https://qri.cloud/chriswhong/reef-tank-water-testing</a>. Qri.cloud is not just hosting my data, it’s making it discoverable in search engines and providing access to the readme, metadata, and schema information that lives along with my table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4O6zk3AEth3JJXj76B0f9A.png" /><figcaption>qri.cloud gives each dataset a landing page, history, integration shortcuts, issue queues, etc. It’s like your own personal data publishing portal!</figcaption></figure><p>Each version is immutable, so if I try to go back and fudge the numbers to impress my fish tank friends, you’ll know how the table <em>really</em> looked in October 2020. :). You can even follow the dataset to get an email notification each time I update it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcoGaUlDdooi0KJu1SKC0Q.png" /><figcaption>The full history of each dataset can be inspected so users can see what changed and when. Each version is immutable, signed, and timestamped.</figcaption></figure><p><strong>Towards an Airtable Connector</strong></p><p>This example is a proof of concept for moving data between Airtable and Qri, and lays some of the groundwork for a proper connector between the two platforms. What could this look like? One idea is to use <a href="https://qri.io/desktop">Qri Desktop</a> as the jumping off point, allowing the user to quickly create a new dataset linked to an Airtable, and commit new versions with a click.</p><p>Another idea is to have the integration UI live in the Airtable UI (or as a browser plugin) which watches the Airtable for changes and allows for a quick commit of a new Qri version.</p><p>What would you want in an Airtable / Qri integration? <a href="https://twitter.com/qri_io">Give us a yell on twitter</a> or <a href="https://discordapp.com/invite/thkJHKj">drop into our Discord</a> and let us know what features you’d find helpful. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12dbda8783c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/archiving-your-airtable-data-with-qri-12dbda8783c3">Archiving your Airtable Data with Qri</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn more by doing less with spreadsheets]]></title>
            <link>https://medium.com/qri-io/learn-more-by-doing-less-with-spreadsheets-7d62e2176818?source=rss----c8725b5a8089---4</link>
            <guid isPermaLink="false">https://medium.com/p/7d62e2176818</guid>
            <category><![CDATA[versioning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[workplace]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[sheet]]></category>
            <dc:creator><![CDATA[Asmir Avdicevic]]></dc:creator>
            <pubDate>Fri, 23 Oct 2020 19:21:35 GMT</pubDate>
            <atom:updated>2020-11-16T14:25:51.045Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve all been there, generating a monthly report for our business, and doing 12 revisions to get to its final form. We finally turn it in and we’re then asked to get the previous month’s report, stored somewhere deep on our laptop. Once that’s turned that in (hopefully the correct version), we look at both side by side to see where and how things changed.</p><p>On the surface it seems simple, but for most businesses it’s vital to understand what’s happening month to month. How are our ads performing? How many customers did we gain? How loaded is our pipeline? And on and on.</p><h3>Spreadsheets at the workplace</h3><p>Spreadsheets are an invaluable tool at work and help us work with data on a daily basis and provide a human level interaction with it. Nearly every business depends on it, but managing templates and keeping track of files and revisions quickly gets cumbersome. Once those problems are dealt with, we still need to digest that data and get some insights from it.</p><p>To deal with it I’ve got a couple suggestions:</p><ul><li>Use versioning software to track changes instead of keeping track of filenames</li><li>Use some basic analysis tools to understand how the data is changing over time at a glance</li></ul><p>This becomes more important as the business grows and your operations become more complex. Eventually you may have to hire someone to do the reporting. And once you grow into it, tooling becomes your best friend to keep scaling with minimal overhead.</p><blockquote>Stop doing `Final_Rev_3_Final_Finalest.xlsx`</blockquote><p>Most popular spreadsheet tools now offer some sort of version control to highlight changes in a table so it’s easy to understand how data changed from version to version. Google Sheets allows you to browse changes by automatically generated snapshots or by explicitly named versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*auVhzeFs0sOGQTPvBtVZAQ.png" /></figure><p>Now that we use versioning of our data for more clarity and less error prone workflows, we need to gain some insights from the data. While in-depth reports, read-throughs and detailed analyses are mandatory to make big decisions, we often want to quickly understand what is happening without spending hours or days sifting through the spreadsheet.</p><h3>Understanding change</h3><p>Spreadsheets have magnificent tooling to generate some quick reports and plot data. Coupled with version control this means that we can easily glance at a summary of a table just by selecting the appropriate version. Yet, it still doesn’t highlight changes between the versions, and we have to keep clicking back and forth between the versions looking at the same graph and data points any number of times. This often results in us missing the bigger picture as we are so focused on the fine grained details. All we wanted to know is what’s new this month.</p><p>There’s a whole subset of analytics that deals with understanding data at a glance, namely descriptive statistics are a great starting point to quickly summarize some data columns.</p><p>Without getting into too much detail and math, the purpose of this is to show you some basic numbers on some data so you can understand what is going on and decide whether to dive deeper into it or move on. With the world revolving around numbers, a quick example would be viewing the sum, average, count and distribution of values.</p><p>I took some visitor stats from some of my pages to make a quick demonstration.</p><p>Here’s a quick summary of active users for August:</p><ul><li>31 rows (for 31 days)</li><li>Sum: 743</li><li>Average: 23.97</li><li>Std. deviation: 8.04</li><li>Median: 23</li><li>Top 10% days (90th percentile): 34</li><li>Bottom 10% days (10th percentile): 13</li></ul><p>Quick graph showing active users by day and distribution of days by count.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fp9Dnf4O44XnS4Y-LzLb5Q.png" /></figure><p>Now the same for September:</p><ul><li>30 rows (for 30 days)</li><li>Sum: 879</li><li>Average: 29.3</li><li>Std. deviation: 13.26</li><li>Median: 31.5</li><li>Top 10% days (90th percentile): 43.3</li><li>Bottom 10% days (10th percentile): 10.9</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfm5iidUTnk1grLXsR2e-w.png" /></figure><p>As you see, both give some very quick and meaningful info for the respective months. But how did we do with the months relative to each other?</p><p>A cursory view of the raw numbers shows some kind of improvement, but that’s neither quantitative, nor rigorous. We need more.</p><p>Setting the descriptive stats side by side offers plenty of insight without looking at the above two reports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jMx5Ek1m3FZWrZ-_x4Ivw.png" /></figure><p>From the first graph we can see a ~20% increase in traffic from August to September. On a daily basis we performed ~5 active users better on average, but we also had a lot more oscillation. In general, all metrics lean towards the right and show slight to moderate growth, though our worst days in September are worse than the worst days in August.</p><p>There’s no need to look at either of the tables individually or parse through their charts. Furthermore not even the comparison bar chart is required to understand the change, the simple delta chart tells plenty.</p><p>The purpose of the above analysis is not to say you can learn more by taking a shallower dive into the data, only that you can learn a lot at a glance and thus make more decisions in less time. This becomes increasingly more useful as there are more and more types of reports you are generating and consuming.</p><p>Phew, okay. So I got my answer, but that required some work.</p><h3>A Need for Better Tooling — A Data Differ</h3><p>Software developers have one tool at their disposal that I don’t (yet) have as a data analyst — <strong>a differ</strong>, or an interface that shows me the differences (what changed) from one version of a file (in my world, a dataset) to the next.</p><p>The good news is, I work at Qri to try and improve the world of data with better tooling. We already have version control as a core principle in evolving a dataset over time.</p><p>Recently we put descriptive statistics and diffing onto our near term roadmap to further aid day to day workflows with datasets. We’re kicking around a few ideas on what that differ (or change report), would look like, how it’d be used, what it should tell you, etc., and we’re looking for feedback. Here’s what we’ve dreamt up so far:</p><h3>A Data Differ Wires:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-Dtv1NqaQXn9EeQtRIo5g.png" /></figure><p>As you might recognize, this format is inspired by software code diff reports. However, there are MANY reasons data is different from code, and thus deserves its own considerations:</p><ul><li>Data files are MUCH bigger than code.</li><li>All code can be shown as text and be reasonably interpreted. Data is often best displayed with a visualization (bar charts, graphs, etc), or in columns and rows (a spreadsheet!).</li><li>Data can be organized &amp; sorted without truly ‘changing’</li><li>…and more.</li></ul><p>These variations add complexity to the discussion on what comparison tools (differ) should do and look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0mXnzMEkZ2GzXtTr_kTjA.png" /></figure><p><strong>Are there more considerations for a data differ? </strong>We’re inviting all data analysts, data engineers, data scientists &amp; statisticians to weigh in.</p><p>How would you use a data differ? What would you want it to tell you about how a one file differs from another? How granular or high-level do you get when inspecting changes?</p><p>This post will be one in a series on this emerging feature, so please follow up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d62e2176818" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qri-io/learn-more-by-doing-less-with-spreadsheets-7d62e2176818">Learn more by doing less with spreadsheets</a> was originally published in <a href="https://medium.com/qri-io">qri.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>