Commit e85c1765 authored by 35V LG84's avatar 35V LG84

site: geo location example

Signed-off-by: 35V LG84's avatar35V LG84 <35vlg84-x4e6b92@e257.fi>
parent 9bfc971c
Pipeline #60809878 passed with stage
in 5 minutes and 34 seconds
......@@ -38,6 +38,7 @@
- title: Examples
docs:
- link: /docs/examples/trimix-filling-station/
- link: /docs/gis/example/
- title: Embedding Tackler
docs:
......
= Travel Journal with Geo Location
:page-date: 2019-05-05 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
:page-layout: page
This is a travel journal example how to utilize plaintext accounting with
geographic location data.
See xref:txn-geo-location.adoc[Transaction Geo Location] and
xref:txn-geo-filters.adoc[Transaction Geo Filters]
for full documentation of tackler's GIS features.
== Journal with GIS data
Below is an example travel journal from ice cream spree around the world.
Four transactions in total, with one transaction missing geo location.
....
2019-05-01 'Ice cream at Helsinki's market square
# location: geo:60.167,24.955,5
Expenses:Ice_cream 2.50 €
Assets:Cash
2019-05-02 'Surreal ice cream at Miro Museum
# location: geo:41.368611,2.16
Expenses:Ice_cream 5 €
Assets:Cash
2019-05-03 'Matcha ice cream!
# location: geo:35.7101,139.8107
Expenses:Ice_cream 800 ¥
Assets:Cash
2019-05-04 'I am so lost, but I have ice cream
Expenses:Ice_cream 2 €
Assets:Cash
....
== Reports based on GIS features
=== Basic Balance and Register reports without any filter
....
bin/report.sh
Txns size: 4
BALANCE
-------
0.00 800.00 ¥ Expenses
800.00 800.00 ¥ Expenses:Ice_cream
0.00 9.50 € Expenses
9.50 9.50 € Expenses:Ice_cream
=======================
800.00 ¥
9.50 €
REGISTER
--------
2019-05-01Z 'Ice cream at Helsinki's market square
# location: geo:60.167,24.955,5
Expenses:Ice_cream 2.50 2.50 €
------------------------------------------------------------------------------------
2019-05-02Z 'Surreal ice cream at Miro Museum
# location: geo:41.368611,2.16
Expenses:Ice_cream 5.00 7.50 €
------------------------------------------------------------------------------------
2019-05-03Z 'Matcha ice cream!
# location: geo:35.7101,139.8107
Expenses:Ice_cream 800.00 800.00 ¥
------------------------------------------------------------------------------------
2019-05-04Z 'I am so lost, but I have ice cream!
Expenses:Ice_cream 2.00 9.50 €
------------------------------------------------------------------------------------
....
=== Any ice cream in Europe?
....
bin/report.sh --api-filter-def \
'{ "txnFilter" : { "TxnFilterBBoxLatLon" : { "south" : 34, "west": -28, "north": 72, "east": 56 } } }'
Txns size: 2
Filter:
Txn Bounding Box 2D
North, East: geo:72,56
South, West: geo:34,-28
BALANCE
-------
0.00 7.50 € Expenses
7.50 7.50 € Expenses:Ice_cream
=======================
7.50 €
Filter:
Txn Bounding Box 2D
North, East: geo:72,56
South, West: geo:34,-28
REGISTER
--------
2019-05-01Z 'Ice cream at Helsinki's market square
# location: geo:60.167,24.955,5
Expenses:Ice_cream 2.50 2.50 €
------------------------------------------------------------------------------------
2019-05-02Z 'Surreal ice cream at Miro Museum
# location: geo:41.368611,2.16
Expenses:Ice_cream 5.00 7.50 €
------------------------------------------------------------------------------------
....
=== Any ice cream in Japan?
....
bin/report.sh --api-filter-def \
'{ "txnFilter" : { "TxnFilterBBoxLatLon" : { "south" : 25, "west": 126, "north": 47, "east": 151 } } }'
Txns size: 1
Filter:
Txn Bounding Box 2D
North, East: geo:47,151
South, West: geo:25,126
BALANCE
-------
0.00 800.00 ¥ Expenses
800.00 800.00 ¥ Expenses:Ice_cream
=======================
800.00 ¥
Filter:
Txn Bounding Box 2D
North, East: geo:47,151
South, West: geo:25,126
REGISTER
--------
2019-05-03Z 'Matcha ice cream!
# location: geo:35.7101,139.8107
Expenses:Ice_cream 800.00 800.00 ¥
------------------------------------------------------------------------------------
....
=== All transactions with geo location
Last of our queries is a special one. Bounding box is defined covering whole Earth
so that all geo location transactions are included into reports.
Transactions without geo location are left outside of these reports.
....
bin/report.sh --api-filter-def \
'{ "txnFilter" : { "TxnFilterBBoxLatLon" : { "south" : -90, "west": -180, "north": 90, "east": 180 } } }'
Txns size: 3
Filter:
Txn Bounding Box 2D
North, East: geo:90,180
South, West: geo:-90,-180
BALANCE
-------
0.00 800.00 ¥ Expenses
800.00 800.00 ¥ Expenses:Ice_cream
0.00 7.50 € Expenses
7.50 7.50 € Expenses:Ice_cream
=======================
800.00 ¥
7.50 €
Filter:
Txn Bounding Box 2D
North, East: geo:90,180
South, West: geo:-90,-180
REGISTER
--------
2019-05-01Z 'Ice cream at Helsinki's market square
# location: geo:60.167,24.955,5
Expenses:Ice_cream 2.50 2.50 €
------------------------------------------------------------------------------------
2019-05-02Z 'Surreal ice cream at Miro Museum
# location: geo:41.368611,2.16
Expenses:Ice_cream 5.00 7.50 €
------------------------------------------------------------------------------------
2019-05-03Z 'Matcha ice cream!
# location: geo:35.7101,139.8107
Expenses:Ice_cream 800.00 800.00 ¥
------------------------------------------------------------------------------------
....
Usage guide has xref:../usage.adoc#txn-filters-shell[multiple examples] how to use more conveniently
xref:../txn-filters.adoc[transaction filters] from shell with `base64` ascii armor.
= Plaintext accounting with GIS
:page-date: 2019-05-05 00:00:00 Z
:page-last_modified_at: 2019-05-07 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
:page-permalink: /docs/gis/
Tackler supports geographic location with accounting journal and it can use transaction GIS data
for generating accounting reports.
See xref:./gis/txn-geo-location.adoc[Transaction Geo Location] for how to store geographic location with
accounting transactions, and xref:./gis/txn-geo-filters.adoc[Transaction Geo Filter] how to select transactions based
accounting transactions, and xref:./gis/txn-geo-filters.adoc[Transaction Geo Filters] how to select transactions based
on that information. Together these two features make it possible to do
accounting and reporting based on area and place.
......@@ -22,3 +22,9 @@ to account farming related information or record forestry data.
There is no need to account only monetary things, so possibilities are pretty much endless what to do with GIS data
and plaintext accounting.
[[example]]
== Travel journal example
See xref:./gis/example.adoc[Travel Journal with Geo Location] example how to utilize plaintext accounting with
geographic location data and reports.
= Transaction Geo Filters
:page-date: 2019-05-05 00:00:00 Z
:page-last_modified_at: 2019-05-07 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
Transaction Geo Filters selects transactions which geographic location is inside Bounding Box defined by the filter.
Using location based transaction filters makes it possible to generate reports for certain geographic areas.
Currently supported filter geometry is bounding box.
See xref:txn-geo-location.adoc[Transaction Geo Location] how to record location data.
See xref:txn-geo-location.adoc[Transaction Geo Location] how to record location data
and xref:example.adoc[Travel Journal with Geo Location] for full example of GIS data and reports.
== Bounding Box
......
......@@ -9,7 +9,8 @@ for reports or plot transactions on map. link:/docs/gis/#use-cases[Plaintext acc
has ideas for some use cases.
See xref:txn-geo-filters.adoc[Transaction Geo Filters]
for information how to select transactions based on location data.
for information how to select transactions based on location data
and xref:example.adoc[Travel Journal with Geo Location] for full example of GIS data and reports.
== Geo Location Syntax
......
= Installation Manual
:page-date: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
This is installation manual for tackler command line.
......@@ -12,7 +12,7 @@ To use tackler cli you will need
== Minimal setup
For minimal initial installation you should follow xref:/docs/[Quickstart Guide].
Minimal initial installation and setup is described in xref:quickstart.adoc[Quickstart Guide].
=== Minimal setup with account name validation (Chart of Accounts)
......
= Quickstart
:page-date: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
:page-permalink: /docs/quickstart/
The minimum steps to create usable tackler setup is:
Minimal tackler setup can be created by following four steps:
.1. Create directory structure for demo setup
----
# Create demo-setup
mkdir -p tackler/txns
mkdir tackler
mkdir tackler/txns
# Change current working directory to tackler demo folder
cd tackler
......@@ -20,8 +21,8 @@ cp /path/to/tackler-cli-x.y.z.jar ./tackler-cli.jar
The journal data file (`txns/journal.txn`) can not be empty,
hence we have to create some transactions to play with it.
.2. Create some transactions
----
# Create some transactions
cat > txns/journal.txn << EOF
2018-06-01 'First transaction
Expenses:Ice_cream 2
......@@ -36,17 +37,19 @@ EOF
After these steps, content of tackler demo folder should be:
.3. Verify setup
----
./tackler-cli.jar
./txns/
./txns/journal.txn
----
With above setup, following command will generate balance and register reports
by using default embedded configuration.
With above setup we are ready to generate default reports based
on tackler's embedded configuration.
.4. Generate default Balance and Register reports
----
# run inside tackler demo folder
# This command must be run inside 'tackler' folder, which was created abobe
java -jar ./tackler-cli.jar --accounts.strict=false
# ... Log lines suppressed ...
......@@ -81,8 +84,10 @@ REGISTER
Total processing time: 1284, parse: 464, reporting: 80
----
This minimal setup is based on default embedded configuration
and tackler's auto-discovery mechanism for journal data.
See xref:./journal/format.adoc[Journal Format],
xref:./installation.adoc[Installation Manual]
and xref:./usage.adoc[Usage Guide] how to
configure and use tackler.
further configure tackler and use it with more production like setup.
= Tour of Tackler
:page-date: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-03-29 00:00:00 Z
:page-last_modified_at: 2019-05-09 00:00:00 Z
:page-permalink: /docs/
......@@ -31,6 +31,7 @@ See following documents to get up and speed with Tackler.
== Examples
* xref:docs/examples/trimix-filling-station.adoc[Trimix Filling Station]
* xref:docs/gis/example.adoc[Travel Journal with Geographic location]
== Embedding Tackler
......
= Travel journal with Geo Location
:page-date: 2019-05-09 00:00:00 +0300
:page-author: 35vlg84
:page-category: examples
There is a new example how to combine plaintext accounting with geographic location information.
Check out link:/docs/gis/example/[Travel journal and accounting statements of Ice Cream Spree] around the World.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment