Skip to content

Commit 52f3a06

Browse files
authored
Enterprise analytics: JSON -> CSV (#1474)
1 parent 79be22c commit 52f3a06

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

docs/hub/enterprise-hub-analytics.md

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,31 @@ Track all your repository activity with a detailed downloads overview that shows
1717

1818
Explore the metrics of individual repositories with the per-repository drill-down table. Utilize the built-in search feature to quickly locate specific repositories. Each row also features a time-series graph that illustrates the trend of downloads over time.
1919

20-
## Export Analytics as JSON
20+
## Export Analytics as CSV
2121

22-
Download a comprehensive JSON file containing analytics for all your repositories, including model and dataset download activity.
22+
Download a comprehensive CSV file containing analytics for all your repositories, including model and dataset download activity.
2323

2424
### Response Structure
2525

26-
```json
27-
[
28-
{
29-
"repoType": "model",
30-
"repoName": "huggingface/CodeBERTa-small-v1",
31-
"totalDownloads": 4362460,
32-
"records": [
33-
{
34-
"timestamp": "2021-01-22T00:00:00.000Z",
35-
"downloads": 4
36-
}
37-
// ... daily records
38-
]
39-
},
40-
{
41-
"repoType": "dataset",
42-
"repoName": "huggingface/documentation-images",
43-
"totalDownloads": 2167284,
44-
"records": [
45-
{
46-
"timestamp": "2021-11-27T00:00:00.000Z",
47-
"downloads": 4
48-
}
49-
// ... daily records
50-
]
51-
}
52-
]
26+
The CSV file is made of daily download records for each of your model and dataset.
27+
28+
```csv
29+
repoType,repoName,total,timestamp,downloads
30+
model,huggingface/CodeBERTa-small-v1,4362460,2021-01-22T00:00:00.000Z,4
31+
model,huggingface/CodeBERTa-small-v1,4362460,2021-01-23T00:00:00.000Z,7
32+
model,huggingface/CodeBERTa-small-v1,4362460,2021-01-24T00:00:00.000Z,2
33+
dataset,huggingface/documentation-images,2167284,2021-11-27T00:00:00.000Z,3
34+
dataset,huggingface/documentation-images,2167284,2021-11-28T00:00:00.000Z,18
35+
dataset,huggingface/documentation-images,2167284,2021-11-29T00:00:00.000Z,7
5336
```
5437

5538
### Repository Object Structure
5639

57-
Each repository object contains:
40+
Each record in the CSV contains:
5841

5942
- `repoType`: The type of repository (e.g., "model", "dataset")
6043
- `repoName`: Full repository name including organization (e.g., "huggingface/documentation-images")
61-
- `totalDownloads`: Cumulative number of downloads (can be 0 for repositories with no activity)
62-
- `records`: Array of daily download entries (can be empty for repositories with no activity)
63-
64-
### Download History
65-
66-
For repositories with download activity, each record in the `records` array includes:
67-
44+
- `total`: Cumulative number of downloads for this repository
6845
- `timestamp`: ISO 8601 formatted date (UTC)
6946
- `downloads`: Number of downloads for that day
7047

0 commit comments

Comments
 (0)