- Install DuckDB
brew install duckdb - To dynamically explore the data run
make dband write queries - To generate a report for the data in the
datafolder runmake report
System context overview - source
Data model using Crow's_foot_notation
---
title: Community Engagement Highlevel Model
---
erDiagram
USER ||--|| WALLET : owns
USER ||--|| PROPOSAL : rates
- users.csv (collections) - user in the voting portal
- wallet-links.csv - [join table] between user and wallet
- answers.csv (voting-portal) - [join table] contains answers (ratings) of questions
- questions.csv - proposal names
---
title: Community Engagement Model
---
erDiagram
USER {
int collection_id PK
bigint balance
decimal AGIX
}
ANSWER {
int collection_id FK
int question_id FK
varchar answer
bigint total_balance
decimal AGIX
}
QUESTION {
int question_id PK
varchar proposal
}
WALLET_LINK {
varchar address PK
int collection_id FK
bigint balance
decimal AGIX
}
WALLET ||--|{ WALLET_LINK : belongs_to
USER ||--|{ WALLET_LINK : owns
USER ||--|{ ANSWER : gives
QUESTION ||--|{ ANSWER : belongs_to
Where:
-
$tokens_i$ : Number of tokens held by user$i$ . -
$grade_i$ : Grade assigned by user$i$