Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 40 additions & 24 deletions sample_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ Examples:
name.
Because the data are up-to-date at the time of writing, the year should be
stated as `since_2018`.

- `india_by_state_2000_to_2014`

Explanation:
Data in this directory refer to Chhattisgarh, Uttaranchal and Jharkhand (all
formed in 2000) as separate states.
However, Telangana (formed in 2014) does not appear as a separate state.

- `germany_by_electoral_district_2017`

Explanation:
Expand All @@ -48,7 +50,7 @@ Examples:

In each subdirectory, there should be:

- exactly one GeoJSON file, which should usually contain maximally 50,000
- exactly one **GeoJSON file**, which should usually contain maximally 50,000
points.
The number of points can be increased if the specific example requires it
(e.g. because there are more than 200 geographic divisions, such as counties
Expand All @@ -58,21 +60,33 @@ In each subdirectory, there should be:

`(geographic_region)_by_(division)_(optional_descrip)_(year[s]).geojson`
This file should thus have the same name as its parent directory.
- at least one CSV file for the population.

- at least one **CSV file** for the population.
CSV files for other statistics (e.g. GDP or members of parliament) can be
optionally added.

The minimal format of the CSV file should be:

| shapeName | Population |
| :--------- | :--------- |
| Brussels-Capital | 1208542 |
| Flanders | 6589069 |
| Wallonia | 3633795 |
| shapeName | Population (people) |
| :--------------- | :------------------ |
| Brussels-Capital | 1208542 |
| Flanders | 6589069 |
| Wallonia | 3633795 |

- **First column** — Contains the names of the divisions (e.g., _Wallonia_).
The values must exactly match those in the corresponding GeoJSON file.
The column header name can be anything; however, for compatibility with other repositories (such as `cartogram-web`), it should be set to match a property key in the GeoJSON. For this example, the GeoJSON should contain a `shapeName` property with the values _Brussels-Capital_, _Flanders_, and _Wallonia_.

- **Second column** — Contains the statistical data used as the target area for the cartogram.
The column header should include the name and unit of the statistic (e.g., `Population (people)`).
The unit must be enclosed in parentheses, but it may be left blank (e.g., `Population`).

Optional (case-sensitive) columns in the CSV file:

- **`Label` column** — Contains abbreviations for the divisions. While not necessary for cartogram generation, we **strongly recommend** including it for visualization at https://go-cart.io.

- **`DisplayName` column** — Contains a friendly name for the divisions. This is useful if the first column uses non-friendly identifiers, such as ISO-3 country codes, but you prefer to display readable country names in the visualization at https://go-cart.io.

The column header for the divisions (e.g. `shapeName`) must match a key in the
GeoJSON file.
The names of the divisions (e.g. Wallonia etc.) must match the corresponding values
in the GeoJSON.
There are additional examples available in the directory `sample_data`.

CSV file names should follow the pattern:
Expand All @@ -86,23 +100,25 @@ In each subdirectory, there should be:

Examples:

* `world_population_by_country_2018.csv`
* `india_agricultural_production_in_inr_by_state_2012.csv`
* `germany_votes_for_green_party_by_electoral_district_2017.csv`
- exactly one Markdown file with the name:
- `world_population_by_country_2018.csv`
- `india_agricultural_production_in_inr_by_state_2012.csv`
- `germany_votes_for_green_party_by_electoral_district_2017.csv`

- exactly one **Markdown file** with the name:

`(geographic_region)_by_(division)_(optional_descrip)_(year[s]).md`

The file should include:
* a full bibliographic reference to the data source of the geographic
boundaries.
* the lines of code used to convert the geographic boundaries from the
data source to the GeoJSON in the corresponding directory.
The code may involve subsetting, simplification, topology repair etc.
* instructions how to run the code (e.g. stating the programming
language, software, version of the software, version of add-on packages
and additional files needed).
* a full bibliographic reference to the data in the CSV file(s).

- a full bibliographic reference to the data source of the geographic
boundaries.
- the lines of code used to convert the geographic boundaries from the
data source to the GeoJSON in the corresponding directory.
The code may involve subsetting, simplification, topology repair etc.
- instructions how to run the code (e.g. stating the programming
language, software, version of the software, version of add-on packages
and additional files needed).
- a full bibliographic reference to the data in the CSV file(s).

If data are sourced from a website, the date of the download should be
included in the reference.
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
NAME_1,Population (people),Color,Inset,Label
Adrar,439693,,,
Aïn Defla,771890,,,
Aïn Témouchent,384565,,,
Alger,2988145,,,
Annaba,640050,,,
Batna,1128030,,,
Béchar,274866,,,
Béjaïa,915835,,,
Biskra,730262,,,
Blida,1009892,,,
Bordj Bou Arréridj,716423,,,
Bouira,695583,,,
Boumerdès,802083,,,
Chlef,1013718,,,
Constantine,943112,,,
Djelfa,1223223,,,
El Bayadh,262187,,,
El Oued,673934,,,
El Tarf,411783,,,
Ghardaïa,375988,,,
Guelma,482430,,,
Illizi,54490,,,
Jijel,636948,,,
Khenchela,386683,,,
Laghouat,477328,,,
M'Sila,991846,,,
Mascara,784073,,,
Médéa,830943,,,
Mila,768419,,,
Mostaganem,746947,,,
Naâma,209470,,,
Oran,1584607,,,
Ouargla,558558,,,
Oum el Bouaghi,644364,,,
Relizane,733060,,,
Saïda,330641,,,
Sétif,1496150,,,
Sidi Bel Abbès,604744,,,
Skikda,904195,,,
Souk Ahras,440299,,,
Tamanghasset,198691,,,
Tébessa,657227,,,
Tiaret,846823,,,
Tindouf,159898,,,
Tipaza,617661,,,
Tissemsilt,296366,,,
Tizi Ouzou,1127608,,,
Tlemcen,949135,,,
Adrar,439693,,,AR
Aïn Defla,771890,,,AD
Aïn Témouchent,384565,,,AT
Alger,2988145,,,AL
Annaba,640050,,,AN
Batna,1128030,,,BT
Béchar,274866,,,BC
Béjaïa,915835,,,BJ
Biskra,730262,,,BS
Blida,1009892,,,BL
Bordj Bou Arréridj,716423,,,BB
Bouira,695583,,,BU
Boumerdès,802083,,,BM
Chlef,1013718,,,CH
Constantine,943112,,,CO
Djelfa,1223223,,,DJ
El Bayadh,262187,,,EB
El Oued,673934,,,EO
El Tarf,411783,,,ET
Ghardaïa,375988,,,GR
Guelma,482430,,,GL
Illizi,54490,,,IL
Jijel,636948,,,JJ
Khenchela,386683,,,KH
Laghouat,477328,,,LG
M'Sila,991846,,,MS
Mascara,784073,,,MC
Médéa,830943,,,MD
Mila,768419,,,ML
Mostaganem,746947,,,MG
Naâma,209470,,,NA
Oran,1584607,,,OR
Ouargla,558558,,,OG
Oum el Bouaghi,644364,,,OB
Relizane,733060,,,RE
Saïda,330641,,,SD
Sétif,1496150,,,SF
Sidi Bel Abbès,604744,,,SB
Skikda,904195,,,SK
Souk Ahras,440299,,,SA
Tamanghasset,198691,,,TM
Tébessa,657227,,,TB
Tiaret,846823,,,TR
Tindouf,159898,,,TN
Tipaza,617661,,,TP
Tissemsilt,296366,,,TS
Tizi Ouzou,1127608,,,TO
Tlemcen,949135,,,TL
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shapeName,Population (people)
External Territories,5100
Australian Capital Territory,453324
New South Wales,8095430
Northern Territory,249345
Queensland,5265043
South Australia,1806599
Tasmania,569827
Victoria,6559941
Western Australia,2762234
shapeName,Population (people),Label
External Territories,5100,ET
Australian Capital Territory,453324,ACT
New South Wales,8095430,NSW
Northern Territory,249345,NT
Queensland,5265043,QLD
South Australia,1806599,SA
Tasmania,569827,TAS
Victoria,6559941,VIC
Western Australia,2762234,WA
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shapeName,Population (people),Color,Inset,Label
Burgenland,297623,,,
Kärnten,564555,,,
Niederösterreich,1698995,,,
Oberösterreich,1505320,,,
Salzburg,562704,,,
Steiermark,1253005,,,
Tirol,764255,,,
Vorarlberg,401607,,,
Wien,1931830,,,
Burgenland,297623,,,BU
Kärnten,564555,,,KA
Niederösterreich,1698995,,,NO
Oberösterreich,1505320,,,OO
Salzburg,562704,,,SZ
Steiermark,1253005,,,ST
Tirol,764255,,,TR
Vorarlberg,401607,,,VO
Wien,1931830,,,WI
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
NAME_1,Population (people),Color,Inset,Label
Acklins,565,,,
Biminis,1988,,,
Berry Islands,807,,,
Black Point,414,,,
Cat Island,1522,,,
Central Abaco,9196,,,
Central Andros,662,,,
Central Eleuthera,2363,,,
City of Freeport,26914,,,
Crooked Island,330,,,
East Grand Bahama,23145,,,
Exuma,6514,,,
Grand Cay,383,,,
Harbour Island,1762,,,
Hope Town,691,,,
Inagua,913,,,
Long Island,3094,,,
Mangrove Cay,892,,,
Mayaguana,277,,,
Moore's Island,593,,,
New Providence,246329,,,
North Abaco,3772,,,
North Andros,4471,,,
North Eleuthera,2918,,,
Ragged Island,72,,,
Rum Cay,99,,,
San Salvador,940,,,
South Abaco,1867,,,
South Andros,1465,,,
South Eleuthera,2921,,,
Spanish Wells,1551,,,
West Grand Bahama,24454,,,
Acklins,565,,,AK
Biminis,1988,,,BI
Berry Islands,807,,,BY
Black Point,414,,,BP
Cat Island,1522,,,CI
Central Abaco,9196,,,CA
Central Andros,662,,,CN
Central Eleuthera,2363,,,CE
City of Freeport,26914,,,FP
Crooked Island,330,,,CK
East Grand Bahama,23145,,,EGB
Exuma,6514,,,EX
Grand Cay,383,,,GC
Harbour Island,1762,,,HB
Hope Town,691,,,HT
Inagua,913,,,IN
Long Island,3094,,,LI
Mangrove Cay,892,,,MC
Mayaguana,277,,,MG
Moore's Island,593,,,MI
New Providence,246329,,,NP
North Abaco,3772,,,NA
North Andros,4471,,,ND
North Eleuthera,2918,,,NE
Ragged Island,72,,,RI
Rum Cay,99,,,RC
San Salvador,940,,,SS
South Abaco,1867,,,SA
South Andros,1465,,,SD
South Eleuthera,2921,,,SE
Spanish Wells,1551,,,SW
West Grand Bahama,24454,,,WG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
shapeName,Population (people),Colour,Inset,Label
Brussels-Capital,1222637,#decbe4,,
Flanders,6698876,#fed9a6,,
Wallonia,3662495,#ffffcc,,
Brussels-Capital,1222637,#decbe4,,BRU
Flanders,6698876,#fed9a6,,VLG
Wallonia,3662495,#ffffcc,,WAL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
shapeName,Population (people),Color,Inset,Label
Brussels-Capital,1222637,#fbb4ae,,
Flanders,6698876,#b3cde3,,
Wallonia,3662495,#ccebc5,,
Brussels-Capital,1222637,#fbb4ae,,BRU
Flanders,6698876,#b3cde3,,VLG
Wallonia,3662495,#ccebc5,,WAL
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
shapeName,Population (people),Color,Inset,Label
Acre,906876,,,
Alagoas,3365351,,,
Amapá,877613,,,
Amazonas,4269995,,,
Bahia,14985284,,,
Ceará,9240580,,,
Espírito Santo,3094325,,,
Federal District,4108508,,,
Goiás,7206589,,,
Maranhão,7153262,,,
Mato Grosso,3567234,,,
Mato Grosso do Sul,2839188,,,
Minas Gerais,21411923,,,
Pará,8777124,,,
Paraíba,4059905,,,
Paraná,11597484,,,
Pernambuco,9674793,,,
Piauí,3289290,,,
Rio de Janeiro,17463349,,,
Rio Grande do Norte,3560903,,,
Rio Grande do Sul,11466630,,,
Rondônia,1815278,,,
Roraima,652713,,,
São Paulo,46649132,,,
Santa Catarina,7338473,,,
Sergipe,2338474,,,
Tocantins,1607363,,,
Acre,906876,,,AC
Alagoas,3365351,,,AL
Amapá,877613,,,AP
Amazonas,4269995,,,AM
Bahia,14985284,,,BA
Ceará,9240580,,,CE
Espírito Santo,3094325,,,ES
Federal District,4108508,,,DF
Goiás,7206589,,,GO
Maranhão,7153262,,,MA
Mato Grosso,3567234,,,MT
Mato Grosso do Sul,2839188,,,MS
Minas Gerais,21411923,,,MG
Pará,8777124,,,PA
Paraíba,4059905,,,PB
Paraná,11597484,,,PR
Pernambuco,9674793,,,PE
Piauí,3289290,,,PI
Rio de Janeiro,17463349,,,RJ
Rio Grande do Norte,3560903,,,RN
Rio Grande do Sul,11466630,,,RS
Rondônia,1815278,,,RO
Roraima,652713,,,RR
São Paulo,46649132,,,SP
Santa Catarina,7338473,,,SC
Sergipe,2338474,,,SE
Tocantins,1607363,,,TO
Loading