Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cities Importance #78

Open
MiklerGM opened this issue Feb 20, 2019 · 7 comments
Open

Cities Importance #78

MiklerGM opened this issue Feb 20, 2019 · 7 comments

Comments

@MiklerGM
Copy link
Contributor

Problem: capitals, cities, towns and villages should became visible on different zoom levels.

Find the best approach to filter cities by it's importance for best UI experience.
On frontend filtering will be done via MVT filtering options https://www.mapbox.com/mapbox-gl-js/style-spec/#other-filter

Mapbox will automatically hide collided items, so we don't need clustering algorithm.

The proposal: add one or more fields to determine city importance for current period of time

We could add additional field in the api_city table named scale_rank and set it depending on the instance of of wikidata item.
If we bind scale rank to zoom we could do it like this

scale rank zoom cities
1 >= 1 capitals or former capitals
2 >= 2 regional/state capitals
3 >= 3 two major cities of the country (not including [1])
5 >= 5 four major cities of the country (not including [1, 3])
7 >= 7 six largest cities (not including [1, 3, 5])
... ... ...

In this case for zoom level 7 we will have 1 + (?)+ 2 + 4 + 6 = 13 cities (or more) per country.

It would be easy to apply filters like this on the frontend

The problem that will remain, scale rank of city can be changed during it's existence
Some countries are small and 3 major cities can be really close to each other to show them on the high level zooms

Originally posted by @MiklerGM in #70 (comment)

@ataalik
Copy link
Contributor

ataalik commented Feb 21, 2019

is there a field on wikidata that inherently gives us the size of the settlement, ie cities, villages, towns

@quorth0n
Copy link
Member

@ataalik There's a few but I'm not sure how standardized they are. https://www.wikidata.org/wiki/Q1049415 is an instance of "village". https://www.wikidata.org/wiki/Q84 is an instance of "capital". https://www.wikidata.org/wiki/Q2256 is an instance of "metropolis". https://www.wikidata.org/wiki/Q189288 is an instance of "town", and so on. A lot of semi-major cities seem to just be an instance of "city" and nothing else, which might make this a bit difficult. We can also ranking cities from a service other than wikidata perhaps.

@MiklerGM
Copy link
Contributor Author

is there a field on wikidata that inherently gives us the size of the settlement, ie cities, villages, towns

We are working with historical data, town in 1000 A.D. might be more important than metropolis in 2019 A.D.
As an example, Edo was renamed to Tokyo and capital was moved there, and before that city was less important than Kyoto at some point.

We can also ranking cities from a service other than wikidata perhaps.

Yeah, there was some open database from national geographic with scaleRank we should ask @v1kun about it.
In chronist we were using two fields scale rank + city class

@v1kun
Copy link

v1kun commented Feb 22, 2019

I agree with @MiklerGM, it' pretty difficult to manage importance, I believe some of this should be done manualy.

I borrowed scaleRank from http://www.naturalearthdata.com/ database (not national geographic 😃). It's suitable, but anyway back-in-time mapping is difficult for this matter anyway.

@v1kun
Copy link

v1kun commented Feb 22, 2019

It's also big problem about wikidata's 'instance of', I'm not sure how to manage this issue.

@ataalik
Copy link
Contributor

ataalik commented Feb 22, 2019

I doubt it exists but if we had historical census data from settlements we could somehow calculate importance using stuff like population, the year the data is from and proximity to other cities.

@MiklerGM
Copy link
Contributor Author

We got population for 20th century, not more.
We could track number of cross links from events for current period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants