https://github.com/chendaniely/synthea-csv-sqlite
Code to download the Synthea (Synthetic Patient Generation) into a SQLite file
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.5%) to scientific vocabulary
Repository
Code to download the Synthea (Synthetic Patient Generation) into a SQLite file
Basic Info
- Host: GitHub
- Owner: chendaniely
- License: mit
- Language: R
- Default Branch: main
- Size: 12.1 MB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Synthea CSV data to SQLite
Code to download the Synthea (Synthetic Patient Generation) into a SQLite file.
Synthea(TM) is an open-source, synthetic patient generator that models the medical history of synthetic patients
You can learn more about Synthea here: https://synthetichealth.github.io/synthea/
Setup and Download Data
If you have R installed, you will need the following packages to get the data
and create the sqlite file
r
install.packages(c("DBI", "RSQLite"))
From there, you can run all the code in the 01-create_sqlite.R file to download
the data and create the synthea.sqlite file.
It will be saved into the data/ directory.
Rscript 01-create_sqlite.R
Example queries
The 02-query_data.R file provides code on how you can connect to the sqlite database,
and write SQL to query the database.
```r library(DBI) library(RSQLite)
mydb <- dbConnect(RSQLite::SQLite(), "data/synthea.sqlite")
dbGetQuery(mydb, 'SELECT * FROM patients LIMIT 5')
dbDisconnect(mydb) ```
You can also opt to use the tidyverse packages to query the data.
Make sure you have tidyverse installed.
r
install.packages('tidyverse')
Then you can use the following code in the 03-querty_tidyverse.R file to
query the data.
```r library(tidyverse) library(RSQLite)
con <- DBI::dbConnect(RSQLite::SQLite(), "data/synthea.sqlite")
patients <- tbl(con, "patients")
patients |> count(STATE)
patients |> count(CITY)
patients |> count(RACE, ETHNICITY) ```
Owner
- Name: Daniel Chen
- Login: chendaniely
- Kind: user
- Location: JFK -> DCA -> ROA -> JFK -> YVR
- Company: @rstudio @UBC-DSCI @UBC-MDS
- Website: http://chendaniely.github.io
- Twitter: chendaniely
- Repositories: 460
- Profile: https://github.com/chendaniely
bow ties are cool
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0