diff --git a/README.md b/README.md index d885aa281..1eb73a4cc 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ Are you using multiple data frames or database tables in R? Organize them with dm. - - Use it today (if only like a list of tables). - - Build data models tomorrow. - - Deploy the data models to your organization’s RDBMS the day after. +- Use it today (if only like a list of tables). +- Build data models tomorrow. +- Deploy the data models to your organization’s RDBMS the day after. ## Overview @@ -26,9 +26,9 @@ dm objects encapsulate relational data models constructed from local data frames dm makes it easy to bring an existing relational data model into your R session. As the dm object behaves like a named list of tables it requires little change to incorporate it within existing workflows. The dm interface and behavior is modeled after dplyr, so you may already be familiar with many of its verbs. dm also offers: - - visualization to help you understand relationships between entities represented by the tables - - simpler joins that “know” how tables are related, including a “flatten” operation that automatically follows keys and performs column name disambiguation - - consistency and constraint checks to help you understand (and fix) the limitations of your data +- visualization to help you understand relationships between entities represented by the tables +- simpler joins that “know” how tables are related, including a “flatten” operation that automatically follows keys and performs column name disambiguation +- consistency and constraint checks to help you understand (and fix) the limitations of your data That’s just the tip of the iceberg. See [Getting started](https://krlmlr.github.io/dm/articles/dm.html) to hit the ground running and explore all the features. @@ -37,62 +37,56 @@ That’s just the tip of the iceberg. See [Getting started](https://krlmlr.githu The latest stable version of the {dm} package can be obtained from [CRAN](https://CRAN.R-project.org/package=dm) with the command
-install.packages("dm")
-
+install.packages("dm") The latest development version of {dm} can be installed from GitHub.
 # install.packages("devtools")
-devtools::install_github("krlmlr/dm")
-
+devtools::install_github("krlmlr/dm") ## Usage Create a dm object (see [Getting started](https://krlmlr.github.io/dm/articles/dm.html) for details).
-library(dm)
-dm <- dm_nycflights13()
-dm
-#> ── Metadata ───────────────────────────────────────
+library(dm)
+dm <- dm_nycflights13()
+dm
+#> ── Metadata ────────────────────────────────────────────────────────────────────
 #> Tables: `airlines`, `airports`, `flights`, `planes`, `weather`
 #> Columns: 53
 #> Primary keys: 3
-#> Foreign keys: 3
-
+#> Foreign keys: 3 dm is a named list of tables:
-names(dm)
+names(dm)
 #> [1] "airlines" "airports" "flights"  "planes"   "weather"
-nrow(dm$airports)
+nrow(dm$airports)
 #> [1] 1458
-dm$flights %>%
-  count(origin)
+dm$flights %>%
+  count(origin)
 #> # A tibble: 3 x 2
 #>   origin     n
-#>   <chr>  <int>
+#> * <chr>  <int>
 #> 1 EWR     4043
 #> 2 JFK     3661
-#> 3 LGA     3523
-
+#> 3 LGA 3523 Visualize relationships at any time:
-dm %>%
-  dm_draw()
-
- +dm %>% + dm_draw() Simple joins:
-dm %>%
-  dm_flatten_to_tbl(flights)
+dm %>%
+  dm_flatten_to_tbl(flights)
 #> Renamed columns:
 #> * year -> flights.year, planes.year
 #> * name -> airlines.name, airports.name
@@ -115,17 +109,15 @@ Simple joins:
 #> #   time_hour <dttm>, airlines.name <chr>, airports.name <chr>, lat <dbl>,
 #> #   lon <dbl>, alt <dbl>, tz <dbl>, dst <chr>, tzone <chr>, planes.year <int>,
 #> #   type <chr>, manufacturer <chr>, model <chr>, engines <int>, seats <int>,
-#> #   speed <int>, engine <chr>
-
+#> # speed <int>, engine <chr> Check consistency:
-dm %>%
-  dm_examine_constraints()
+dm %>%
+  dm_examine_constraints()
 #> ! Unsatisfied constraints:
-#>  Table `flights`: foreign key tailnum into table `planes`: 1640 entries (14.6%) of `flights$tailnum` not in `planes$tailnum`: N722MQ (27), N725MQ (20), N520MQ (19), N723MQ (19), N508MQ (16), …
-
+#> Table `flights`: foreign key tailnum into table `planes`: 1640 entries (14.6%) of `flights$tailnum` not in `planes$tailnum`: N722MQ (27), N725MQ (20), N520MQ (19), N723MQ (19), N508MQ (16), … Learn more in the [Getting started](https://krlmlr.github.io/dm/articles/dm.html) article. @@ -133,7 +125,7 @@ Learn more in the [Getting started](https://krlmlr.github.io/dm/articles/dm.html If you encounter a clear bug, please file an issue with a minimal reproducible example on [GitHub](https://github.com/krlmlr/dm/issues). For questions and other discussion, please use [community.rstudio.com](https://community.rstudio.com/). ------ +------------------------------------------------------------------------ License: MIT © cynkra GmbH. @@ -141,6 +133,6 @@ Funded by: [![energie360°](man/figures/energie-72.png)](https://www.energie360.ch/de/) [![cynkra](man/figures/cynkra-72.png)](https://www.cynkra.com/) ------ +------------------------------------------------------------------------ Please note that the ‘dm’ project is released with a [Contributor Code of Conduct](https://krlmlr.github.io/dm/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.