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 to subscribe. For market insights and additional subscription options, check out our newsletter at blog.sov.ai.
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 — Government Traffic Analysis Tutorial
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
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")
.png)
Dataset Contents
- Agency Traffic (df_agencies)
- Provides traffic data aggregated at the agency level.
- Allows for high-level analysis of government agency website usage.
- 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
Plotting agency-level traffic:
df_agencies.plot()Analyzing embassy website traffic:
df_embassy = df_domains.loc[:, df_domains.columns.str.contains('embassy', case=False)] df_embassy.plot()Correlation analysis:
df_embassy.corr()Advanced statistics (e.g., coefficient of variation):
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.