Better HN
topnewbestaskshowjobs
Log inSign up

data_dan_

34 karma · joined Aug 10, 2021 (5y ago) · 38 submissions

Dan is a data scientist at bit.io
Submissions

comment 3y ago · link · parent

https://www.danliden.com/

At the moment, I post fairly infrequently. The whole site is written using emacs org mode. Most of the posts have to do with emacs and data stuff (often doing data stuff in emacs).

2.

Pre-Classify Tasks for Better ChatGPT Completions(innerjoin.bit.io ↗)

2 points · by data_dan_ · 3y ago · discuss

3.

Vector Similarity Search in Postgres with bit.io and pgvector(innerjoin.bit.io ↗)

5 points · by data_dan_ · 3y ago · discuss

4.

Comparing ChatGPT to Codex for text-to-SQL translation(innerjoin.bit.io ↗)

4 points · by data_dan_ · 3y ago · discuss

5.

Make ChatGPT Stop Chatting and Start Writing SQL(innerjoin.bit.io ↗)

4 points · by data_dan_ · 3y ago · discuss

6.

Making a Production LLM Prompt for Text-to-SQL Translation(innerjoin.bit.io ↗)

3 points · by data_dan_ · 3y ago · discuss

7.

AI-Powered Text-to-SQL Translation in Bit.io(blog.bit.io ↗)

5 points · by data_dan_ · 3y ago · discuss

8.

Measuring and Mitigating Postgres Network Latency(innerjoin.bit.io ↗)

3 points · by data_dan_ · 3y ago · discuss

9.

Cities in the Southwest Decouple Growth from the Need for More Water(e360.yale.edu ↗)

2 points · by data_dan_ · 4y ago · 1 comment

10.

Literate Emacs Config with imenu-list(github.com ↗)

1 points · by data_dan_ · 4y ago · discuss

comment 4y ago · link · parent

I wrote this article. For some background—

In March, we published an article on Stock Trades by members of congressional committees: https://innerjoin.bit.io/data-cant-tell-us-whether-congressi...

To conduct this research, we needed to know: (1) which members of congress made which stock trades, and (2) which members of congress belonged to which congressional committees. The data for (1) was available from the the senate/house stock watchers sites; the data for (2) came from the ProPublica Congress API. There was no primary key available for linking the two datasets: the best we had to work with were the names of the members of congress.

This would be fine, if the names were represented uniquely and consistently. This was not the case. You can't join "Mitch McConnell" to "A. Mitchell McConnell, Jr." without a bit of work.

Manually matching every single name from the first data source to every single name in the second would be tedious, time consuming, and error prone. Instead, we used the Levenshtein distance to compute a similarity metric between each name in the first dataset and each name in the second. Simply using the best match according to this metric correctly matched more than 95% of the names, and made it incredibly simple to review the list and manually fix the few incorrect matches.

There's also an accompanying Deepnote dashboard where you can compare string distances between pairs of strings of your choosing: https://deepnote.com/@dliden-bitdotio/Whats-in-a-Name-28418c...

12.

Record Linkage on People's Names with Approximate String Matching(innerjoin.bit.io ↗)

2 points · by data_dan_ · 4y ago · 1 comment

13.

Using Telemedicine to Address the Access Gap for Opioid Treatment(knowablemagazine.org ↗)

2 points · by data_dan_ · 4y ago · discuss

14.

How Much Resource Use is Fair? National responsibility for ecological breakdown(blog.datawrapper.de ↗)

3 points · by data_dan_ · 4y ago · discuss

15.

Surveying SQL parser libraries in a few high-level languages(datastation.multiprocess.io ↗)

2 points · by data_dan_ · 4y ago · discuss

16.

Bayesian Data Analysis with Jags: A Dirichlet-Multinomial Model of Wordle Scores(innerjoin.bit.io ↗)

2 points · by data_dan_ · 4y ago · discuss

comment 4y ago · link · parent

I wrote this article after a colleague pointed out that the Pandas DataFrame.to_sql() method uses row-by-row INSERTs. There are plenty of good reasons for this, and the to_sql method works great with many different SQL database flavors, but it's not fast.

This article compares the performance of different methods for writing a Pandas DataFrame to a PostgreSQL database using the to_sql method on DataFrames ranging from 100 rows to 10,000,000 rows.

comment 4y ago · link · parent

To me it just looks like it's too early to tell. Did quits go up very quickly in 2021? Sure! But that comes on the heels of a massive spike in layoffs that occurred in 2020. It is at least a possibility that the current situation is a response to that.

One point I didn't go into is the fact that the labor force participation rate also dropped steeply in 2020 and hasn't recovered to pre-pandemic levels yet. So that could create labor shortages that are not necessarily represented in the quits rate.

comment 4y ago · link · parent

(I wrote this) I wish I had clearer answers to those questions! The conclusion is just a little unsatisfying from a writing perspective—it's just too early to tell exactly what's going on. The quits data through most of 2021 don't look all that different from what we'd expect based on the pre-pandemic trend, though there were definitely more than anticipated, especially later in the year. But this is following a massively-disruptive pandemic that put a lot of people out of work and in general had a dramatic impact on the employment situation.

I think the most interesting part is the decrease in layoffs that coincided with the increase in quits. People aren't leaving that much more than before, but when they leave, they're doing so on their own terms.

comment 4y ago · link · parent

Maybe I've been especially fortunate, or I'm just not understanding the question right, but I've felt respected pretty much from the beginning of my career (aside from grad school, which was not great, in many respects). Or at least I've felt "treated with respect" -- not sure if that's exactly the same thing. But I've always been given a fair amount of independence at work, and I've generally been able to solve whatever I'm assigned to solve, or clearly articulate the challenges, allowing those with different/more expertise to help out. And I've never been made to feel ashamed or inadequate because of either the work I've completed or the work I've needed to seek out additional help to complete.

comment 4y ago · link · parent

This perspective always bothers me. It's the same with the recent Don't Look Up. The people who will watch and and understand it aren't the people who actually need to get the message. They're both bland movies that present a point of view they know their viewers will agree with. They then get praised--undeservingly, in my opinion--for presenting a "bold" perspective.

comment 4y ago · link · parent

Meanwhile, the Nevada state legislature decided against extending the vaccination requirement for the Nevada System of Higher Education (https://lasvegassun.com/news/2021/dec/21/college-students-in...) and the NSHE board of regents may be on the verge of reversing their staff vaccine mandate instead of firing those who refuse to comply (https://www.reviewjournal.com/local/education/regents-to-rea...).

comment 4y ago · link · parent

I use a lot of U.S. government data sources (EPA climate data; BLS employment statistics; etc.). I also use a fair amount of international greenhouse gas emissions data, such as from the UNFCCC greenhouse gas inventory datasets.

Pain points: data disappearing, moving, or being updated without notice and without indication of a change. Numbers from the same API endpoints or URL changing unexpectedly and without explanation can be an unwelcome surprise.

I use bit.io (https://bit.io -- I work there) to deal with these problems. It's an online PostgreSQL database; very easy to use with e.g. psycopg2/SQLalchemy in Python or DBI+dbplyr in R. Before any analysis, I copy the necessary data over to a repo/schema in bit.io, fill in the documentation with the dates on which I obtained the data, and use that as the source of "ground truth" for the analysis.

comment 4y ago · link · parent

Testing and clinical trials!

comment 4y ago · link · parent

The Washington Post did some really great work on generating a variety of comparison datasets: https://www.washingtonpost.com/climate-environment/interacti.... You're right, though -- it's really hard to avoid the issue of political influence in climate data. None of the data can exist in a vacuum; it all has (geo)political implications.
12