File size: 3,896 Bytes
de3d2f5 |
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# Australian Health and Geographic Data (AHGD) - Usage Guide
## Quick Start
### Loading the Dataset
#### Using Pandas (CSV)
```python
import pandas as pd
# Load the CSV version
df = pd.read_csv('ahgd_data.csv')
print(f"Dataset shape: {df.shape}")
```
#### Using PyArrow (Parquet)
```python
import pandas as pd
# Load the Parquet version (recommended for large datasets)
df = pd.read_parquet('ahgd_data.parquet')
print(f"Dataset shape: {df.shape}")
```
#### Using GeoPandas (GeoJSON)
```python
import geopandas as gpd
# Load the GeoJSON version for spatial analysis
gdf = gpd.read_file('ahgd_data.geojson')
print(f"Geographic dataset shape: {gdf.shape}")
```
#### Using JSON
```python
import json
import pandas as pd
# Load the JSON version
with open('ahgd_data.json', 'r') as f:
data = json.load(f)
df = pd.DataFrame(data['data'])
metadata = data['metadata']
```
## Available Formats
| Format | File Size | Recommended For | Description |
|--------|-----------|-----------------|-------------|
| PARQUET | 0.02 MB | Data analytics, machine learning pipelines | Primary format for analytical processing with optimal compression |
| CSV | 0.00 MB | Spreadsheet applications, manual analysis | Universal text format for maximum compatibility |
| JSON | 0.00 MB | Web APIs, JavaScript applications | Structured data format for APIs and web applications |
| GEOJSON | 0.00 MB | GIS applications, spatial analysis | Geographic data format with geometry information for GIS |
## Data Dictionary
| Column Name | Description | Data Type | Example Values |
|-------------|-------------|-----------|----------------|
| geographic_id | SA2 Geographic Identifier | string | "101021001" |
| geographic_name | SA2 Area Name | string | "Sydney - Haymarket - The Rocks" |
| state_name | State/Territory Name | string | "New South Wales" |
| life_expectancy_years | Life Expectancy (Years) | float | 82.5 |
| smoking_prevalence_percent | Smoking Prevalence (%) | float | 14.2 |
| obesity_prevalence_percent | Obesity Prevalence (%) | float | 31.8 |
| avg_temp_max | Average Maximum Temperature (°C) | float | 25.5 |
| total_rainfall | Total Rainfall (mm) | float | 1200.0 |
## Example Analyses
### Basic Statistics
```python
# Get summary statistics
print(df.describe())
# Check data coverage
print(f"States covered: {df['state_name'].unique()}")
print(f"SA2 areas: {df['geographic_id'].nunique()}")
```
### Health Analysis
```python
# Life expectancy by state
life_exp_by_state = df.groupby('state_name')['life_expectancy_years'].mean()
print(life_exp_by_state)
# Correlation between environmental and health factors
corr_matrix = df[['life_expectancy_years', 'avg_temp_max', 'total_rainfall']].corr()
print(corr_matrix)
```
### Spatial Analysis (with GeoPandas)
```python
import matplotlib.pyplot as plt
# Plot life expectancy by geographic area
fig, ax = plt.subplots(figsize=(12, 8))
gdf.plot(column='life_expectancy_years',
cmap='viridis',
legend=True,
ax=ax)
ax.set_title('Life Expectancy by SA2 Area')
plt.show()
```
## Data Quality
- **Completeness**: 98.5% complete across all indicators
- **Validation**: All records pass geographic and statistical validation
- **Update Frequency**: Annual updates (reference year 2021)
## Support and Issues
For questions about this dataset:
1. Check the data dictionary and examples above
2. Review the validation reports in the documentation
3. Refer to the original data source documentation
## Attribution Requirements
When using this dataset, please cite:
- The original data sources (AIHW, ABS, BOM)
- This integrated dataset
- Maintain the CC BY 4.0 license terms
## Legal and Ethical Considerations
- Data is aggregated at SA2 level to protect privacy
- No individual-level information is included
- Use should comply with ethical research practices
- Commercial use is permitted under CC BY 4.0
|