An attempt towards a followthemoney query dsl.
https://docs.investigraph.dev/lib/ftmq โ HEALTH ? 99 / Healthy
An attempt towards a followthemoney query dsl.
https://docs.investigraph.dev/lib/ftmq โ// readme
ftmq queries and filters Follow The Money entities from json files / streams or from a statement-based nomenklatura store.
Its ftmq.Query is the backend-agnostic query object of the OpenAleph ecosystem: it filters FtM streams and stores, compiles to SQL, and converts to and from OpenAleph API params.
New to Follow The Money? See this introduction.
Minimum Python version: 3.11
pip install ftmq
cat entities.ftm.json | ftmq -q 'filter:schema=Company&filter:properties.country=de&filter:gte:properties.incorporationDate=2023' -o s3://data/entities-filtered.ftm.json
from ftmq import Query, M, P, G, smart_read_proxies
# legal entities in `companies` based in Germany, or in Austria and incorporated
# since 2020, not dissolved: the 5 most recently incorporated
q = Query().where(
M(dataset="companies"),
M(schemata="LegalEntity"),
G(countries="de") | (G(countries="at") & P(incorporationDate__gte=2020)),โฆ