chronhq / backend

Backend for database. Python, Django, PostGIS
https://maps.chron.ist/
GNU General Public License v3.0
6 stars 1 forks source link

More types for cached data #110

Open MiklerGM opened 5 years ago

MiklerGM commented 5 years ago

I would propose to add more data to cached data:

Common military operations: Bombings, military offensive

Special events Nuclear Disasters, Atomic Bombings, Terrorist Attacks

Life is not only about deaths or disasters Inventions Space flights or Orbital station launch

I would propose to add more types like special events, inventions, probably more.

UPD: Adding landmarks along with wonders of the world might be interesting too

quorth0n commented 5 years ago

All sound good to me. Landmarks would be cool, I'm not sure how they would be displayed on the map though. Too many pins in the global narrative might make the map feel crowded, but it's a frontend issue

MiklerGM commented 5 years ago

Overlapping is handled automatically by mapbox plus we have limit for 20 pins per year, per tile on backend, so I think it is manageable on frontend. https://github.com/chronhq/backend/blob/490ba915e67eb572414af0b0db5a48373fb64402/project/api/views.py#L215-L224 We need to do a research and find out

MiklerGM commented 5 years ago

Wow, they have class for natural disasters and volcanic eruptions

v1kun commented 5 years ago

Query of getting something what is the instance of %class%


SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P31 wd: %class%.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}```
MiklerGM commented 5 years ago

With specific classes we've got only ~200 results or less per class https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3Fstart%20%3Flaunch%20WHERE%20{%20%20%3Fitem%20wdt%3AP31%20wd%3AQ25956%20.%20%20OPTIONAL%20{%20%20%20%20%3Fitem%20wdt%3AP1427%20%3Fstart.%20%20%20%20%3Fitem%20wdt%3AP619%20%3Flaunch%20%20}%20%20SERVICE%20wikibase%3Alabel%20{%20bd%3AserviceParam%20wikibase%3Alanguage%20"[AUTO_LANGUAGE]%2Cen".%20}}

For inventions and inventors we need to filter out galaxies and add locations https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3Finventor%20%3Fdate%20WHERE%20{%20%20%3Fitem%20wdt%3AP31%20%3Fclass%20.%20%20%3Fitem%20wdt%3AP61%20%3Finventor%20.%20%20OPTIONAL%20{%20%20%20%20%3Fitem%20wdt%3AP575%20%3FtimeOfDiscovery%20.%20%20%20%20%3Fitem%20wdt%3AP577%20%3FpublicationDate%20.%20%20%20%20%3Fitem%20wdt%3AP571%20%3Finception%20.%20%20}%20%20%20%20SERVICE%20wikibase%3Alabel%20{%20bd%3AserviceParam%20wikibase%3Alanguage%20"[AUTO_LANGUAGE]%2Cen".%20}}

v1kun commented 5 years ago

30 bombings

376 Olympic Games (both modern and accient)