danny-baker / atlas

An Encarta inspired World Atlas as a website, built in Python.
https://worldatlas.org
57 stars 13 forks source link

Full text search by URL parameter + country parameter #1

Open waldenn opened 1 year ago

waldenn commented 1 year ago

Thanks for creating this interesting project Danny!

I was looking if I could integrate it with my Conzept encyclopedia project However there is no fulltext search option yet to get to the datasets (from the URL).

It would also be great to have an URL parameter which can hold a set of ISO2 country codes (comma separated), to highlight on a map, once a datasource is selected after a fulltext search. Eg: https://worldatlas.org/?action=search&q=food&countries=venezuela,brazil,argentina,bolivia

danny-baker commented 1 year ago

Thanks Waldenn (Jama?), the Conzept project looks interesting. Yes one of my challenges is to get this Atlas project more exposed through other cool learning resources, as I do no promotion or SEO. So that would be cool. I'm not quite sure I understand the request, are there two?

  1. Fulltext search option to get dataset from URL - can you explain exactly what you mean by this?

  2. URL parameter to highlight countries - I think I get this. Like highlight a subset of regions as a URL parameter to display on the map accordingly. Yes this is possibly a feature I could take a look at. What are the use cases though? Would it be to share a specific insight on a few countries with someone via a link, rather than just the entire dataset map or chart view?

At present you can share a chart view, with the default preselected countries like this https://worldatlas.org/Media-integrity-Index-(IDEA)/x/line So in theory I could store custom country selections in the path and pass them as URL params, which could be cool.

:) Cheers Dan

waldenn commented 1 year ago

Hey there! (yes, my name is Jama)

You've done very interesting work, by putting all this disparate datasets into one place.

Thinking a bit more about this now. I would like to semantically link (not knowing anything specific about your data) to your site using an URL structure. I can see 3 essential data elements:

My project can link the 3rd-party sites using either strings (eg. "Japan") or entities (eg. Wikidata Qids).

In your current setup I cant link directly to a view on your project. To do this I would need a more structured URL API (like described above).

The find a dataset from a string, I think you could provide a fulltext-search page of your datasets and from that view link to the correct map view.

Search URL examples:

Combined query (may be useful later):

This URL would then display a list of dataset links if any (and also show multiple year links, if there are those).

Once the user clicks on one of the links, he is shown the relevant map and zoomed into Japan (if there are more countries requested, you'd need a boundary box) and the country border is highlighted.

If no country was provided in the URL, you could show the global map for that dataset.

The advantage of the full-text data search is, you can add any datasets, and the outside world can still link to them by URL.

It would also be great to use URLs that only list the country and then show all datasets available for it.

Going further you could allow for the datasets to be reachable by Wikidata Qid, if you register those Qids as metadata on the datasets. Eg. by having a JS object structure of all datasets, each with one or more topical Wikidata Qids attached to it.

On a side note: How are you managing and updating all these datasets? Is everything done manually for new datasets?

Is there a future plan to use national statistics data also? Eg. from the US I feel there is a lot of potential here too, if the data can be managed well and efficiently.