"Work in Progress" prototype of a platform for visualizing and relating climate action data. Aiming to display e.g. CO2 emissions (in all available granularities) and the corresponding CO2 reduction plans. Making it possible to qualify the current state of climate action and to find actionable insights:
- Get to know the most effective measures for any emission source
- Learn about dimensions and relations between emissions sources
- Identify missing measures on any granularity
- Compare, combine and enrich different sources of emission data
- Strategize a complete conclusion how to solve the climate crisis
A Flutter UI client prototype using this backend can be found here.
# install https://github.com/evilmartians/lefthook/blob/master/docs/install.md, then do:
lefthook install
Bridging from Datomic (reference, best practices, rules of schema growth) to GraphQL (spec):
- The source of truth for the Datomic schema and the GraphQL schema is the (production) database.
- When delivering entities via GraphQL, it should be possible to concretize semantically similar Datomic entities into different GraphQL types so that not all entities are delivered via a generic schema.
- Fields of GraphQL types should mimic single Datomic attributes and (for
:db.type/ref
) should also be able to target specific GraphQL types in either forward and backward direction. - Fields and Types should be able to get another alias. Each alias should be able to be deprecated.
tl;dr
- db is source of truth for schema
- typed entities, config stored in db
- typed attributes with custom names, config stored in db
- designed for future schema accretion
Adapted from https://docs.datomic.com/cloud/ions-tutorial/push-and-deploy.html
using https://github.com/borkdude/jet
# 1. make sure git status is clean
# 2. then do:
push_result=$(clojure -A:ion-dev '{:op :push}' | tail -6)
echo "$push_result"
deploy_command=$(echo "$push_result" | jet --query ':deploy-command println')
# 3. then use deploy command from push result, similar to this:
deploy_result=$(eval "$deploy_command" | tail -6)
echo "$deploy_result"
status_command=$(echo "$deploy_result" | jet --query ':status-command println')
# 4. monitor status with command from deploy result, similar to this:
while
state=$(eval "$status_command")
echo "$state" | jet --query ':code-deploy-status println' | grep -x -F 'RUNNING'
do
echo "running: $state"
sleep 1
done
echo "finished: $state"
cdk deploy