Skip to content

Instantly share code, notes, and snippets.

#
# This constraints file was automatically generated on 2023-01-18T18:46:04Z
# via "eager-upgrade" mechanism of PIP. For the "v2-5-test" branch of Airflow.
# This variant of constraints install uses the HEAD of the branch version for 'apache-airflow' but installs
# the providers from PIP-released packages at the moment of the constraint generation.
#
# Those constraints are actually those that regular users use to install released version of Airflow.
# We also use those constraints after "apache-airflow" is released and the constraints are tagged with
# "constraints-X.Y.Z" tag to build the production image for that version.
#
@joshgel
joshgel / jq_fhir.md
Last active December 22, 2020 16:47
Using jq to work with FHIR data

Working with FHIR from the command line using jq

I've recently started working with FHIR data. FHIR is a standardized JSON format for transmitting electronic health data.

jq is "a lightweight and flexible command-line JSON processor", which is the best tool I've been able to find for rapidly working with JSON data. Sure, there are lots of converters that allow you to convert FHIR JSON data to other formats, but for answering quick questions of the data, there probably isn't a better tool to help understand FHIR.

Unfortunately, after some googling, I haven't found much that describes how to use jq to manipulate FHIR data. So, this document will help me keep track of my findings and allow others to utilize what I have learned.

I will use this fake patient data to report results so that you can replicate my results exactly: https://github.com/sync-for-science/discovery-FHIR-data/blob/master/DSTU3/data/1396-Ledner.json

Keybase proof

I hereby claim:

  • I am joshgel on github.
  • I am joshgeleris (https://keybase.io/joshgeleris) on keybase.
  • I have a public key ASAeBw74oF77STRiyKbynVQ0Ooe5aZs1PYeLLLWh3VR5xQo

To claim this, I am signing this object:

# I struggled to find the best way to iteratively create a matplotlib figure with multiple subplots
# based on columns within the dataframe itself. Leaving this here in case it helps anyone.
df = vizdf
fig, axes = plt.subplots(len(df.Department.unique()),len(df.Role.unique()), figsize=(20, 20))
for i,dept in enumerate(list(df.Department.unique())):
for j,rl in enumerate(list(df.Role.unique())):
zdf = df[(df.Department==dept)&(df.Role==rl)]
if not zdf.empty:
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
.bar { fill: steelblue; }
</style>
<body>
<!-- load the d3.js library -->

Keybase proof

I hereby claim:

  • I am joshgel on github.
  • I am joshygel (https://keybase.io/joshygel) on keybase.
  • I have a public key ASA5OxTS0O8oxTK-3VqfeQj4L-dRMgCaMmMQnqmzEy9gSwo

To claim this, I am signing this object: