Advanced Group-Based Habit Performance Dashboard
Last updated:
API:
Loading group analytics...
Spiritual and religious practices
No habits in this group yet.
Add habits to this group in your mobile app to see them here.
Professional development and work tasks
No habits in this group yet.
Add habits to this group in your mobile app to see them here.
Family time and social relationships
No habits in this group yet.
Add habits to this group in your mobile app to see them here.
Health, fitness, and self-development
No habits in this group yet.
Add habits to this group in your mobile app to see them here.
| Name | Group | Raw Category | Score | Priority |
|---|---|---|---|---|
Use this section to understand how categories are stored in AWS and fix them at the source.
# List DynamoDB tables
aws dynamodb list-tables --region eu-central-1
# Scan a table (replace TABLE_NAME)
aws dynamodb scan --table-name TABLE_NAME --region eu-central-1
# Query for habits (replace TABLE_NAME and USER_ID)
aws dynamodb query --table-name TABLE_NAME \
--key-condition-expression "userId = :uid" \
--expression-attribute-values '{":uid":{"S":"USER_ID"}}' \
--region eu-central-1
# Export S3 bucket data (replace BUCKET_NAME)
aws s3 sync s3://BUCKET_NAME ./exported-data --region eu-central-1
Use this section to understand how categories are stored in AWS and fix them at the source.
# List DynamoDB tables
aws dynamodb list-tables --region eu-central-1
# Scan a table (replace TABLE_NAME)
aws dynamodb scan --table-name TABLE_NAME --region eu-central-1
# Query for habits (replace TABLE_NAME and USER_ID)
aws dynamodb query --table-name TABLE_NAME \
--key-condition-expression "userId = :uid" \
--expression-attribute-values '{":uid":{"S":"USER_ID"}}' \
--region eu-central-1
# Export S3 bucket data (replace BUCKET_NAME)
aws s3 sync s3://BUCKET_NAME ./exported-data --region eu-central-1
Note: This is a temporary solution for testing. For permanent fixes, update categories in your Android app.
Follow these steps to permanently fix category issues at the source.
// Possible locations in Android code:
// 1. Habit model class
public class Habit {
private String category; // Check how this is defined
}
// 2. When saving habits
habit.setCategory("Personal"); // Check what values are used
// Define constants for categories public static final String CATEGORY_RELIGIOUS = "Religious"; public static final String CATEGORY_CAREER = "Career & Work"; public static final String CATEGORY_SOCIAL = "Social & Family"; public static final String CATEGORY_PERSONAL = "Personal Improvement"; // Use these constants when saving habits habit.setCategory(CATEGORY_RELIGIOUS);
# For DynamoDB aws dynamodb export-table-to-point-in-time \ --table-arn arn:aws:dynamodb:eu-central-1:ACCOUNT_ID:table/TABLE_NAME \ --s3-bucket BACKUP_BUCKET \ --s3-prefix "backups/habits" \ --export-format DYNAMODB_JSON
import boto3
import json
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('YOUR_TABLE_NAME')
# Category mapping
category_map = {
# Map existing categories to standard ones
'Personal': 'Personal Improvement',
'personal': 'Personal Improvement',
'PERSONAL': 'Personal Improvement',
# Add more mappings based on your data
}
# Scan the table for habits
response = table.scan()
items = response['Items']
# Update each item with standardized category
for item in items:
if 'category' in item:
old_category = item['category']
if old_category in category_map:
new_category = category_map[old_category]
# Update the item
table.update_item(
Key={'id': item['id']},
UpdateExpression='SET category = :cat',
ExpressionAttributeValues={':cat': new_category}
)
print(f"Updated {item['name']} from {old_category} to {new_category}")
If you need to analyze the data structure in more detail:
import boto3
import json
from collections import defaultdict
# Connect to DynamoDB
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('YOUR_TABLE_NAME')
# Analyze category field
response = table.scan()
items = response['Items']
# Analyze all fields that might contain category information
field_values = defaultdict(set)
field_types = {}
print(f"Analyzing {len(items)} records...")
# First pass - identify fields and their types
for item in items:
for field, value in item.items():
value_type = type(value).__name__
field_values[field].add(str(value))
field_types[field] = value_type
# Look for fields that might be categories
potential_category_fields = []
for field, values in field_values.items():
# If field has a small number of distinct values, it might be categorical
if 1 < len(values) < 10:
potential_category_fields.append(field)
# Or if the field name suggests it's a category
elif any(kw in field.lower() for kw in ['category', 'group', 'type']):
potential_category_fields.append(field)
print("\nPotential category fields:")
for field in potential_category_fields:
print(f"- {field} ({field_types.get(field, 'unknown')}): {', '.join(list(field_values[field])[:5])}")
# If you find the correct field, print detailed distribution
category_field = potential_category_fields[0] if potential_category_fields else None
if category_field:
category_counts = defaultdict(int)
for item in items:
if category_field in item:
category_counts[str(item[category_field])] += 1
print(f"\nCategory distribution for field '{category_field}':")
for category, count in sorted(category_counts.items(), key=lambda x: -x[1]):
print(f"- {category}: {count} items")
Follow these steps to permanently fix category issues at the source.
// Possible locations in Android code:
// 1. Habit model class
public class Habit {
private String category; // Check how this is defined
}
// 2. When saving habits
habit.setCategory("Personal"); // Check what values are used
// Define constants for categories public static final String CATEGORY_RELIGIOUS = "Religious"; public static final String CATEGORY_CAREER = "Career & Work"; public static final String CATEGORY_SOCIAL = "Social & Family"; public static final String CATEGORY_PERSONAL = "Personal Improvement"; // Use these constants when saving habits habit.setCategory(CATEGORY_RELIGIOUS);
# For DynamoDB aws dynamodb export-table-to-point-in-time \ --table-arn arn:aws:dynamodb:eu-central-1:ACCOUNT_ID:table/TABLE_NAME \ --s3-bucket BACKUP_BUCKET \ --s3-prefix "backups/habits" \ --export-format DYNAMODB_JSON
import boto3
import json
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('YOUR_TABLE_NAME')
# Category mapping
category_map = {
# Map existing categories to standard ones
'Personal': 'Personal Improvement',
'personal': 'Personal Improvement',
'PERSONAL': 'Personal Improvement',
# Add more mappings based on your data
}
# Scan the table for habits
response = table.scan()
items = response['Items']
# Update each item with standardized category
for item in items:
if 'category' in item:
old_category = item['category']
if old_category in category_map:
new_category = category_map[old_category]
# Update the item
table.update_item(
Key={'id': item['id']},
UpdateExpression='SET category = :cat',
ExpressionAttributeValues={':cat': new_category}
)
print(f"Updated {item['name']} from {old_category} to {new_category}")