Skip to content

Commit

Permalink
Added Czech maps for Country map plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Vaibar committed Sep 6, 2024
1 parent d27fce4 commit bfdb9ac
Show file tree
Hide file tree
Showing 9 changed files with 744,353 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
// Load custom maps for Czech Republics and Ustecky Kraj

Check failure on line 19 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `·`

Check failure on line 19 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `·`
import czechrepublic from './countries/czech_republic_by_kraj.geojson';
import czechrepublicnuts2 from './countries/czech_republic_by_nuts2.geojson';
import czechrepublicokres from './countries/czech_republic_by_okres.geojson';
import czechrepublicorp from './countries/czech_republic_by_orp.geojson';
import czechrepublicobec from './countries/czech_republic_by_obec.geojson';
import usteckykrajbyobce from './countries/ustecky_kraj_by_obce.geojson';
import usteckykrajbyorp from './countries/ustecky_kraj_by_orp.geojson';
import katastralniuzemi from './countries/katuze.geojson';

import afghanistan from './countries/afghanistan.geojson';
import aland from './countries/aland.geojson';
Expand Down Expand Up @@ -216,7 +225,18 @@ import yemen from './countries/yemen.geojson';
import zambia from './countries/zambia.geojson';
import zimbabwe from './countries/zimbabwe.geojson';


Check failure on line 228 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `⏎`

Check failure on line 228 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `⏎`
export const countries = {
// name for loaded custom maps
usteckykrajbyobce,
usteckykrajbyorp,
katastralniuzemi,
czechrepublic,
czechrepublicnuts2,
czechrepublicokres,
czechrepublicorp,
czechrepublicobec,

Check failure on line 239 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`

Check failure on line 239 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`
afghanistan,
aland,
albania,
Expand Down Expand Up @@ -418,6 +438,29 @@ export const countries = {
};

export const countryOptions = Object.keys(countries).map(x => {
// rename czech maps
if (x === 'czechrepublic') {
return [x, 'Česká Republika - Kraje'];
}
if (x === 'czechrepublicnuts2') {
return [x, 'Česká Republika - NUTS2'];
}
if (x === 'czechrepublicokres') {
return [x, 'Česká Republika - Okresy'];
}
if (x === 'czechrepublicorp') {
return [x, 'Česká Republika - ORP'];
}
if (x === 'usteckykrajbyobce') {
return [x, 'Ústecký Kraj - Obce'];
}
if (x === 'usteckykrajbyorp') {
return [x, 'Ústecký Kraj - ORP'];
}
if (x === 'katastralniuzemi') {
return [x, 'Česká Republika - Katastrální území'];
}

Check failure on line 463 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`

Check failure on line 463 in superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`
if (x === 'uk' || x === 'usa') {
return [x, x.toUpperCase()];
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit bfdb9ac

Please sign in to comment.