Nintorac commited on
Commit
e90ece6
·
1 Parent(s): 441b1d6

improve model card documentation

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -1
  2. README.md +49 -40
  3. assets/ntrc_lakh_schema_silver.png +3 -0
.gitattributes CHANGED
@@ -1,3 +1,3 @@
1
  **/*.parquet filter=lfs diff=lfs merge=lfs -text
2
  *.duckdb filter=lfs diff=lfs merge=lfs -text
3
- lakh_local.duckdb filter=lfs diff=lfs merge=lfs -text
 
1
  **/*.parquet filter=lfs diff=lfs merge=lfs -text
2
  *.duckdb filter=lfs diff=lfs merge=lfs -text
3
+ assets/* filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -12,12 +12,12 @@ tags:
12
  - million-song-dataset
13
  - data-vault
14
  configs:
15
- - config_name: mart_track_analytics_sample
16
- data_files:
17
- - "gold_lakh_midi/mart_track_analytics_sample.parquet"
18
  - config_name: mart_artist_profile_sample
19
  data_files:
20
  - "gold_lakh_midi/mart_artist_profile_sample.parquet"
 
 
 
21
  - config_name: mart_musical_features_sample
22
  data_files:
23
  - "gold_lakh_midi/mart_musical_features_sample.parquet"
@@ -91,24 +91,61 @@ size_categories:
91
  - 100K<n<1M
92
  ---
93
 
94
- # Processed Lakh MIDI Dataset
 
 
 
95
 
96
- This dataset contains a structured, processed version of the [Lakh MIDI Dataset](https://colinraffel.com/projects/lmd/) by Colin Raffel, transformed using modern data engineering practices into a Data Vault 2.0 model.
97
 
98
  ## Dataset Description
99
 
100
  The original Lakh MIDI Dataset is a collection of 176,581 unique MIDI files, 45,129 of which have been matched and aligned to entries in the Million Song Dataset. This processed version transforms the raw data into a structured format suitable for music information retrieval research and analysis.
101
 
102
- **Key improvements in this processed version:**
103
  - **Structured Data Vault 2.0 model** with hubs, links, and satellites
104
- - **Bronze layer** with raw extracted data in Parquet format (not distributed, see https://github.com/Nintorac/lakh_midi_dataset to build it)
105
  - **Silver layer** with cleaned, deduplicated, and structured data
106
  - **Gold layer** with clean derormalized views ready for ML pipelines and other downstream usecases
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  ## Data Structure
109
 
110
  To understand the schema of the silver layer check out the [schema_silver.dbml](https://github.com/Nintorac/lakh_midi_dataset/blob/main/schema_silver.dbml) - load it in [dbdiagram.io](https://dbdiagram.io/d) for an interactive view.
111
 
 
 
 
 
112
  ### Silver Layer (`silver_lakh_midi/`)
113
  Structured using Data Vault 2.0 methodology:
114
 
@@ -140,36 +177,6 @@ Structured using Data Vault 2.0 methodology:
140
  - **`sat_key_signature.parquet`** - Human-readable key signature names
141
  - **`sat_mode.parquet`** - Human-readable mode names
142
 
143
- ## Usage Examples
144
-
145
- ### Connecting to the Remote Database
146
-
147
- You can attach to the remote Lakh MIDI database using DuckDB and query the processed data directly:
148
-
149
- ```sql
150
- -- Attach the remote database
151
- ATTACH 'hf://datasets/nintorac/ntrc_lakh_midi/lakh_remote.duckdb' AS lakh_remote;
152
-
153
- -- Sample the artist profile mart table
154
- CREATE TABLE my_artist_sample AS
155
- SELECT * FROM lakh_remote.mart_artist_profile
156
- WHERE artist_profile_tier = 'High Profile'
157
- LIMIT 100;
158
-
159
-
160
- -- Query the sample
161
- SELECT
162
- artist_name,
163
- total_tracks,
164
- avg_tempo,
165
- most_common_key,
166
- top_terms[1:3] as top_3_terms
167
- FROM my_artist_sample
168
- ORDER BY total_tracks DESC;
169
- ```
170
-
171
- This approach allows you to fetch data from the gold layer, without having to manage the full silver layer locally.
172
-
173
  ## Data Quality Features
174
 
175
  - **Deduplication**: Consistent handling of duplicate entities
@@ -234,8 +241,10 @@ This dataset was processed using:
234
  - **DuckDB** as the analytics database engine
235
  - **Data Vault 2.0 methodology** for scalable data modeling
236
 
237
- For more information about the processing pipeline, see the [original project repository](https://github.com/nintorac/lakh_midi_dataset).
238
 
239
- ## Contact
240
 
241
- For questions about this processed version of the dataset, please refer to the original project repository. For questions about the original Lakh MIDI Dataset, please refer to [Colin Raffel's project page](https://colinraffel.com/projects/lmd/).
 
 
 
12
  - million-song-dataset
13
  - data-vault
14
  configs:
 
 
 
15
  - config_name: mart_artist_profile_sample
16
  data_files:
17
  - "gold_lakh_midi/mart_artist_profile_sample.parquet"
18
+ - config_name: mart_track_analytics_sample
19
+ data_files:
20
+ - "gold_lakh_midi/mart_track_analytics_sample.parquet"
21
  - config_name: mart_musical_features_sample
22
  data_files:
23
  - "gold_lakh_midi/mart_musical_features_sample.parquet"
 
91
  - 100K<n<1M
92
  ---
93
 
94
+ # NTRC Lakh MIDI Dataset
95
+
96
+ > [!NOTE]
97
+ > Check out the tables prefixed with `mart_*` to get started for some easy to understand and interesting data
98
 
99
+ This dataset contains an opionated, structured and lightly cleaned release of the [Lakh MIDI Dataset](https://colinraffel.com/projects/lmd/) by Colin Raffel, transformed using modern data engineering practices into a Data Vault 2.0 model.
100
 
101
  ## Dataset Description
102
 
103
  The original Lakh MIDI Dataset is a collection of 176,581 unique MIDI files, 45,129 of which have been matched and aligned to entries in the Million Song Dataset. This processed version transforms the raw data into a structured format suitable for music information retrieval research and analysis.
104
 
105
+ **Key ideas in this release:**
106
  - **Structured Data Vault 2.0 model** with hubs, links, and satellites
107
+ - **Bronze layer** with raw extracted data in Parquet format (not part of this distribution, see https://github.com/Nintorac/lakh_midi_dataset to build it)
108
  - **Silver layer** with cleaned, deduplicated, and structured data
109
  - **Gold layer** with clean derormalized views ready for ML pipelines and other downstream usecases
110
 
111
+ ## Usage Examples
112
+
113
+ ### Connecting to the Remote Database
114
+
115
+ You can attach to the remote Lakh MIDI database using DuckDB and query the processed data directly:
116
+
117
+ ```sql
118
+ -- Attach the remote database
119
+ ATTACH 'hf://datasets/nintorac/ntrc_lakh_midi/lakh_remote.duckdb' AS lakh_remote;
120
+
121
+ -- Sample the artist profile mart table
122
+ CREATE TABLE my_artist_sample AS
123
+ SELECT * FROM lakh_remote.mart_artist_profile
124
+ WHERE artist_profile_tier = 'High Profile'
125
+ LIMIT 100;
126
+
127
+
128
+ -- Query the sample
129
+ SELECT
130
+ artist_name,
131
+ total_tracks,
132
+ avg_tempo,
133
+ most_common_key,
134
+ top_terms[1:3] as top_3_terms
135
+ FROM my_artist_sample
136
+ ORDER BY total_tracks DESC;
137
+ ```
138
+
139
+ This approach allows you to fetch data from the gold layer, without having to manage the full silver layer locally. It's pretty slow though so it would be best to follow the above pattern to save a table locally before running analysis.
140
+
141
  ## Data Structure
142
 
143
  To understand the schema of the silver layer check out the [schema_silver.dbml](https://github.com/Nintorac/lakh_midi_dataset/blob/main/schema_silver.dbml) - load it in [dbdiagram.io](https://dbdiagram.io/d) for an interactive view.
144
 
145
+ Below is a high level overview of how the tables fit together.
146
+
147
+ ![high level silver schema diagram](assets/ntrc_lakh_schema_silver.png)
148
+
149
  ### Silver Layer (`silver_lakh_midi/`)
150
  Structured using Data Vault 2.0 methodology:
151
 
 
177
  - **`sat_key_signature.parquet`** - Human-readable key signature names
178
  - **`sat_mode.parquet`** - Human-readable mode names
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  ## Data Quality Features
181
 
182
  - **Deduplication**: Consistent handling of duplicate entities
 
241
  - **DuckDB** as the analytics database engine
242
  - **Data Vault 2.0 methodology** for scalable data modeling
243
 
244
+ For more information about the processing pipeline, see the [project repository](https://github.com/nintorac/lakh_midi_dataset).
245
 
246
+ ## Resources
247
 
248
+ - [Colin Raffel's project page](https://colinraffel.com/projects/lmd/).
249
+ - [Million Song Dataset](http://millionsongdataset.com/)
250
+ - [Echo Nest Schema](https://developer.spotify.com/documentation/web-api/reference/get-audio-analysis)
assets/ntrc_lakh_schema_silver.png ADDED

Git LFS Details

  • SHA256: 239c7ec532f7a11fb4ae4a78fb517863db6866ac6d8ff8d29d8f9fa071da2ba9
  • Pointer size: 131 Bytes
  • Size of remote file: 119 kB