Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created July 14, 2021 12:00
Show Gist options
  • Save hubgit/e586219a041ea8dd8e1a4cac62f78b54 to your computer and use it in GitHub Desktop.
Save hubgit/e586219a041ea8dd8e1a4cac62f78b54 to your computer and use it in GitHub Desktop.
curl -L https://data.usaid.gov/api/views/b6qu-bswt/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db event-dwellings - --csv --pk=PREDICT_EventID
curl -L https://data.usaid.gov/api/views/dsdz-699h/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db event-value-chain - --csv --pk=PREDICT_EventID
curl -L https://data.usaid.gov/api/views/ganm-umas/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db pcr-tests - --csv --pk=PREDICT_TestID --pk=PREDICT_SampleID
curl -L https://data.usaid.gov/api/views/y7ch-pxe8/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db site-event-characterization - --csv --pk=PREDICT_EventID
sqlite-utils create-index predict.db pcr-tests ViralFamilyTested
sqlite-utils create-index predict.db pcr-tests TestResult
sqlite-utils enable-fts predict.db pcr-tests Interpretation
datasette publish cloudrun predict.db --service=predict --memory=1Gi --metadata=metadata.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment