massomo commited on
Commit
de3d2f5
·
verified ·
1 Parent(s): 6e92c4a

Upload USAGE_GUIDE.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. USAGE_GUIDE.md +132 -0
USAGE_GUIDE.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Australian Health and Geographic Data (AHGD) - Usage Guide
2
+
3
+ ## Quick Start
4
+
5
+ ### Loading the Dataset
6
+
7
+ #### Using Pandas (CSV)
8
+ ```python
9
+ import pandas as pd
10
+
11
+ # Load the CSV version
12
+ df = pd.read_csv('ahgd_data.csv')
13
+ print(f"Dataset shape: {df.shape}")
14
+ ```
15
+
16
+ #### Using PyArrow (Parquet)
17
+ ```python
18
+ import pandas as pd
19
+
20
+ # Load the Parquet version (recommended for large datasets)
21
+ df = pd.read_parquet('ahgd_data.parquet')
22
+ print(f"Dataset shape: {df.shape}")
23
+ ```
24
+
25
+ #### Using GeoPandas (GeoJSON)
26
+ ```python
27
+ import geopandas as gpd
28
+
29
+ # Load the GeoJSON version for spatial analysis
30
+ gdf = gpd.read_file('ahgd_data.geojson')
31
+ print(f"Geographic dataset shape: {gdf.shape}")
32
+ ```
33
+
34
+ #### Using JSON
35
+ ```python
36
+ import json
37
+ import pandas as pd
38
+
39
+ # Load the JSON version
40
+ with open('ahgd_data.json', 'r') as f:
41
+ data = json.load(f)
42
+
43
+ df = pd.DataFrame(data['data'])
44
+ metadata = data['metadata']
45
+ ```
46
+
47
+ ## Available Formats
48
+
49
+ | Format | File Size | Recommended For | Description |
50
+ |--------|-----------|-----------------|-------------|
51
+ | PARQUET | 0.02 MB | Data analytics, machine learning pipelines | Primary format for analytical processing with optimal compression |
52
+ | CSV | 0.00 MB | Spreadsheet applications, manual analysis | Universal text format for maximum compatibility |
53
+ | JSON | 0.00 MB | Web APIs, JavaScript applications | Structured data format for APIs and web applications |
54
+ | GEOJSON | 0.00 MB | GIS applications, spatial analysis | Geographic data format with geometry information for GIS |
55
+
56
+
57
+ ## Data Dictionary
58
+
59
+ | Column Name | Description | Data Type | Example Values |
60
+ |-------------|-------------|-----------|----------------|
61
+ | geographic_id | SA2 Geographic Identifier | string | "101021001" |
62
+ | geographic_name | SA2 Area Name | string | "Sydney - Haymarket - The Rocks" |
63
+ | state_name | State/Territory Name | string | "New South Wales" |
64
+ | life_expectancy_years | Life Expectancy (Years) | float | 82.5 |
65
+ | smoking_prevalence_percent | Smoking Prevalence (%) | float | 14.2 |
66
+ | obesity_prevalence_percent | Obesity Prevalence (%) | float | 31.8 |
67
+ | avg_temp_max | Average Maximum Temperature (°C) | float | 25.5 |
68
+ | total_rainfall | Total Rainfall (mm) | float | 1200.0 |
69
+
70
+ ## Example Analyses
71
+
72
+ ### Basic Statistics
73
+ ```python
74
+ # Get summary statistics
75
+ print(df.describe())
76
+
77
+ # Check data coverage
78
+ print(f"States covered: {df['state_name'].unique()}")
79
+ print(f"SA2 areas: {df['geographic_id'].nunique()}")
80
+ ```
81
+
82
+ ### Health Analysis
83
+ ```python
84
+ # Life expectancy by state
85
+ life_exp_by_state = df.groupby('state_name')['life_expectancy_years'].mean()
86
+ print(life_exp_by_state)
87
+
88
+ # Correlation between environmental and health factors
89
+ corr_matrix = df[['life_expectancy_years', 'avg_temp_max', 'total_rainfall']].corr()
90
+ print(corr_matrix)
91
+ ```
92
+
93
+ ### Spatial Analysis (with GeoPandas)
94
+ ```python
95
+ import matplotlib.pyplot as plt
96
+
97
+ # Plot life expectancy by geographic area
98
+ fig, ax = plt.subplots(figsize=(12, 8))
99
+ gdf.plot(column='life_expectancy_years',
100
+ cmap='viridis',
101
+ legend=True,
102
+ ax=ax)
103
+ ax.set_title('Life Expectancy by SA2 Area')
104
+ plt.show()
105
+ ```
106
+
107
+ ## Data Quality
108
+
109
+ - **Completeness**: 98.5% complete across all indicators
110
+ - **Validation**: All records pass geographic and statistical validation
111
+ - **Update Frequency**: Annual updates (reference year 2021)
112
+
113
+ ## Support and Issues
114
+
115
+ For questions about this dataset:
116
+ 1. Check the data dictionary and examples above
117
+ 2. Review the validation reports in the documentation
118
+ 3. Refer to the original data source documentation
119
+
120
+ ## Attribution Requirements
121
+
122
+ When using this dataset, please cite:
123
+ - The original data sources (AIHW, ABS, BOM)
124
+ - This integrated dataset
125
+ - Maintain the CC BY 4.0 license terms
126
+
127
+ ## Legal and Ethical Considerations
128
+
129
+ - Data is aggregated at SA2 level to protect privacy
130
+ - No individual-level information is included
131
+ - Use should comply with ethical research practices
132
+ - Commercial use is permitted under CC BY 4.0