File size: 2,953 Bytes
afbd93c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
icon: traffic-light-slow
description: >-
  This dataset provides insights into web traffic patterns for various U.S.
  government agencies and domains.
---

# Government Traffic

> **Data Notice**: This dataset provides academic research access with a 6-month data lag. 
> For real-time data access, please visit [sov.ai](https://sov.ai) to subscribe. 
> For market insights and additional subscription options, check out our newsletter at [blog.sov.ai](https://blog.sov.ai).

```python
from datasets import load_dataset
df_agencies = load_dataset("sovai/government/traffic/agencies", split="train").to_pandas().set_index(["date"])
```
    

`Tutorials` are the best documentation — [<mark style="color:blue;">`Government Traffic Analysis Tutorial`</mark>](https://colab.research.google.com/github/sovai-research/sovai-public/blob/main/notebooks/datasets/Government%20Internet.ipynb)

## Description

This dataset provides web traffic data for U.S. government agencies and domains, offering insights into public engagement with government websites.

It enables analysis of traffic trends, inter-agency comparisons, and patterns of citizen interaction with government online resources.

## Data Access

```python
import sovai as sov
sov.token_auth(token="your_token_here")

# Agency-level traffic data
df_agencies = sov.data("government/traffic/agencies")

# Domain-level traffic data
df_domains = sov.data("government/traffic/domains")
```

<figure><img src="https://raw.githubusercontent.com/sovai-research/sovai-documentation/main/.gitbook/assets/government_traffic_1 (2).png" alt=""><figcaption></figcaption></figure>

### Dataset Contents

1. **Agency Traffic (df\_agencies)**
   * Provides traffic data aggregated at the agency level.
   * Allows for high-level analysis of government agency website usage.
2. **Domain Traffic (df\_domains)**
   * Offers more granular data on traffic to specific government domains.
   * Enables analysis of individual website performance within agencies.

### Analysis Capabilities

* Time series analysis of traffic patterns
* Correlation analysis between different domains or agencies
* Calculation of statistical measures like coefficient of variation
* Filtering for specific types of domains (e.g., embassies)

### Example Analyses

1.  Plotting agency-level traffic:

    ```python
    df_agencies.plot()
    ```
2.  Analyzing embassy website traffic:

    ```python
    df_embassy = df_domains.loc[:, df_domains.columns.str.contains('embassy', case=False)]
    df_embassy.plot()
    ```
3.  Correlation analysis:

    ```python
    df_embassy.corr()
    ```
4.  Advanced statistics (e.g., coefficient of variation):

    ```python
    cv = df_embassy.std().div(df_embassy.mean()).sort_values()
    ```

This dataset is valuable for understanding government web presence, analyzing public engagement with government resources, and identifying trends in how citizens interact with government websites.