Skip to content

Commit be5e1dd

Browse files
authored
Update atlas_format.md
minor edits to atlas format markdown
1 parent a54fbee commit be5e1dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

atlas_format.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# Atlas File Format
22

3-
The Atlas format is a JSONL (JSON Lines) format adapted hold district maps from redistricting efforts. The Atlas format is a simple extension of the JSONL format that allows for the storage of maps and their associated data in a single file. The [AtlasIO.jl Julia library](https://github.com/jonmjonm/AtlasIO.jl/) provides the ability to read and write Atlas files. The [AtlasIO.py Python library](https://github.com/jonmjonm/AtlasIO.jl/tree/main/PythonReader), from the same git repository, provides the read but not the ability to write files. This format was developed by the [Duke Quantifying Gerrymandering Group](https://sites.duke.edu/quantifyinggerrymandering/).
3+
The Atlas format is a JSONL (JSON Lines) format adapted hold district maps from redistricting efforts. The Atlas format is a simple extension of the JSONL format that allows for the storage of maps and their associated data in a single file. The [AtlasIO.jl Julia library](https://github.com/jonmjonm/AtlasIO.jl/) provides the ability to read and write Atlas files. The [AtlasIO.py Python library](https://github.com/jonmjonm/AtlasIO.jl/tree/main/PythonReader), from the same git repository, provides the ability to read but not the ability to write files. This format was developed by the [Duke Quantifying Gerrymandering Group](https://sites.duke.edu/quantifyinggerrymandering/).
44
## Structure of an Atlas File
55
Each individual line of an Atlas file is JSON object. As such they can be read line by line unlike a single JSON.
66
* This first line is a comment that identifies the file as an Atlas of maps and describes the Atlas format.
77
* The second line is a JSON object that describes the basic information of the collection of maps saved in this Atlas.
88
* The third line is a JSON object that describes the extra data assigned to each map. It can be adapted to the particular setting. In particular, it gives that data times and key names associated to the additional data.
9-
* Each of the following lines, starting with the 4th line, is a JSON object a JSON object that describes a map and its associated data.
9+
* Each of the following lines, starting with the 4th line, is a JSON object that describes a map and its associated data.
1010

1111
## File Extension and Compression
1212

13-
Atlas files the file extension `.jsonl` if the file in Atlas is plan, uncompressed text. If the Atlas is compressed it will either use the file extension `.jsonl.gz` or `.jsonl.bz2`.
13+
Atlas files use the file extension `.jsonl` if the file in Atlas is plain, uncompressed text. If the Atlas is compressed it will either use the file extension `.jsonl.gz` or `.jsonl.bz2`.
1414

1515
The `.gz` extension signifies the use of the standard [**Gnu Zip tools**](https://en.m.wikipedia.org/wiki/Gzip) (`gzip`, `gunzip`, `zcat`) and can be read by a number of libraries and command line tools. These tools use the standard Deflate algorithm to compress data.
1616

1717
The `.bz2` extension signifies the use of the standard
1818
[**BZip2 tools**](https://en.m.wikipedia.org/wiki/Bzip2) (`bzip2`, `bzcat`) and also can be read by a number of libraries and command line tools. These tools use the standard Burrows–Wheeler algorithm to compress data.
1919

20-
The Bzip2 compression format typically results is smaller file that the Gzip compression format. However, the Bzip2 compression is slower to compress and uncompressed. We also explored saving files by saving the incremental changes in the maps. However, it was decided that the advantage of using standard compression tools was significant in light of the very high compression rations they delivered out of the box.
20+
The Bzip2 compression format typically results in a smaller file than the Gzip compression format. However, the Bzip2 compression is slower to compress and uncompress. We also explored saving files by saving the incremental changes in the maps. However, it was decided that the advantage of using standard compression tools was significant in light of the very high compression ratios they delivered out of the box.
2121

22-
## Work Directly with Compress Files
22+
## Work Directly with Compressed Files
2323

2424
One nice feature of the AtlasIO libraries, both in Julia and Python, is that they can read and write compressed files directly. This both increase the speed of writing and decreases the size of the Atlas files significantly.
2525

0 commit comments

Comments
 (0)