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

Suggest new features #32

Open
bhatvikrant opened this issue Jul 11, 2020 · 20 comments
Open

Suggest new features #32

bhatvikrant opened this issue Jul 11, 2020 · 20 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed open to suggestions

Comments

@bhatvikrant
Copy link
Owner

No description provided.

@bhatvikrant bhatvikrant added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 11, 2020
@Ac-Srikanth
Copy link
Contributor

Hi more data that can be added can include google maps links for the countries , and for currency how much is worth 1 dollar or something like that , and gdp per capita can also be an important information that can be added.

@bhatvikrant
Copy link
Owner Author

Great ideas!

@amanpalariya
Copy link
Contributor

I think area and population are basic and useful stats. Adding these would be very useful.

@bhatvikrant
Copy link
Owner Author

Sounds good @amanpalariya

@amanpalariya
Copy link
Contributor

amanpalariya commented Sep 28, 2020

In #23, you have mentioned that population is variable and therefore should not be added.

If no one is working on 'adding area', I would like to take up this task. 😃

@bhatvikrant
Copy link
Owner Author

@amanpalariya okay thanks for reminding me 😀, sure you can pick it up. Should I assign you to it?

@amanpalariya
Copy link
Contributor

@bhatvikrant Sure. I'd like to work on it.

@sthiepaan
Copy link
Collaborator

sthiepaan commented Oct 2, 2020

Hello everyone 👋,
I have few ideas what I could implement for this package to extend it. Let me introduce few things I would like to implement:

  1. Information about continent that each country belong to
  2. Country ISO codes
  3. ccTLD
  4. Area (already mentioned by @amanpalariya)

So after adding those things, each Country {Object} would contain:

{
  "country": "poland",
  "capital": "warsaw",
  "currency": "zloty",
  "native_language": ["polish"],
  "famous_for": "pierogi and potatoes",
  "phone_code": "+48",
  "flag": "https://flagpedia.net/data/flags/h80/pl.png",
  "drive_direction": "right",
  // NEW DATA
  "continent": "europe", // 1
  "iso": {  // 2
    "numeric": 616,
    "alpha2": "PL",
    "alpha3": "POL"
  },
  "ccTLD": ".pl",  // 3
  "area": { // 4
    "size": 312685,
    "unit": "km2"
  }
},

Together with that I can create extra methods:

  • getCountriesByContinent(continentName)
  • getCountryDetailsByISO(isoType, isoValue)
  • getCountryDetailsByDomain(domainName)

I can prepare all of this pretty easy (I have all this data in non-js/non-json format) so please let me know if I can deliver this.
Hope you like the ideas! 😉

PS: We can create a separate issue for this, so #32 issue can be assigned to @amanpalariya and I can have separate one assigned to me

@bhatvikrant
Copy link
Owner Author

bhatvikrant commented Oct 2, 2020

@sthiepaan great suggestions buddy. I think this will be interesting data for the library, so let's do this.
I think even @amanpalariya is updated with your suggestions, so let's get started.

@amanpalariya and @sthiepaan please create separate issues for your respective tasks and I will assign them to you 😀.

PS. Please don't forget to update the README.md file and test cases. (or else create a separate issue mentioning whatever is left by you, so that some other contributor can pick it up.)

cheers.

@jav7zaid
Copy link
Contributor

jav7zaid commented Oct 3, 2020

Hello Guys, 👋

Few features i would like to propose,

-> Let's highlight the word searched by the user in the results section, it can be either by giving it a background or making it bold.

-> I know Population is variable, but what if we can add a Slider or let's say ask user to enter a range from which he can select. If a user wants to know countries having population of over a billion or less, this will be helpful.🧐 .
I think we can implement same functionality for AREA as well.

-> Also lets restructure the data in famous_for field, currently we are separating it with and, lets do it something like below
"famous_for": [
{"food" : "pizza"},
{"sports" : "football"}
]

Lets categorize it so that when the data grows it will be easier to maintain, I will be happy to do that. 😃

In order to implement this we can add a dropdown with the searchbar listing these categories, user can select one of them and search.

-> Lets implement Advanced Search feature to narrow down results for the user, currently if you search for english speaking countries there are more than 20 odd results.

Let's move some of the features like famous for, capital, currency in advanced search section.
This will be in addition to what the user select in the initial search.
Lets say a user selects Language and then go to advanced search and select famous for food Pizza. This should hopefully narrow down the results. 🤞

The point being, allow user more than one option to search with. 😓

Let me know guys, would love to implement some of these features.

I am new to open source collab, eager to learn.

PS: I was also thinking of allowing user to fetch results even if they enter wrong spelling, lets say englsh instead of English. We can implement to ignore.. .............ok may be someother time 😅

@sthiepaan
Copy link
Collaborator

Hello @jav7zaid 👋,
some of your ideas looks interesting from my point of view, but just to make it a bit more clear for you, let me answer to your comment one by one 😉

-> Let's highlight the word searched by the user in the results section, it can be either by giving it a background or making it bold.

This project has nothing to do with that since it is an API that delivers data. It is on the package user side to prepare frontend functionalities. We should focus on populating the data and deliver methods that allow API consumers to have more possibilities to grab it.

-> I know Population is variable, but what if we can add a Slider or let's say ask user to enter a range from which he can select. If a user wants to know countries having population of over a billion or less, this will be helpful.🧐 .
I think we can implement same functionality for AREA as well.

Partly same as previous one but actually we have in plans to add area Property into an API (#40) so we could have a method to grab some data from the range. It could be something like getCountriesByAreaRange(from, to). Users probably cannot "guess" exact number for the area so having possibility to catch something using the range would be helpful.

-> Also lets restructure the data in famous_for field, currently we are separating it with and, lets do it something like below
"famous_for": [
{"food" : "pizza"},
{"sports" : "football"}
]

I had similar idea where we can define (and deliver) some categories for that section of API. It could be similar to iso Property so:

{
  // ...,
  "famous_for": {
    "food": ["pierogi", "potatoes"],
    "sport": ["ski jumping", "volleyball"],
    // ...
  },
  ...
}

and then refacator getCountriesByFamousFor(famousThing) Method to have two parameters ➡️ getCountriesByFamousFor(type, value) (e.g.: getCountriesByFamousFor("sport", "football")).

In order to implement this we can add a dropdown with the searchbar listing these categories, user can select one of them and search.

Not a part of this package - we leave UI part for users of this project/package 😉 But we could create a method to let users get property names so they can build that. Not 100% sure how we could prepare this in a clean and proper way tho.

-> Lets implement Advanced Search feature to narrow down results for the user, currently if you search for english speaking countries there are more than 20 odd results.

Let's move some of the features like famous for, capital, currency in advanced search section.
This will be in addition to what the user select in the initial search.
Lets say a user selects Language and then go to advanced search and select famous for food Pizza. This should hopefully narrow down the results. 🤞

That is another topic I was thinking of. But not in terms of UI (this is left for the users) but from the API perspective.

What you call "advanced search", from API point of view we can call "chaining queries". Currently it is not possible at all since all methods are using initial data. This could be changed by having additional methods.

I was also thinking of allowing user to fetch results even if they enter wrong spelling, lets say englsh instead of English. We can implement to ignore.. .............ok may be someother time 😅

I am not sure if this should be handled by API. For me it sounds like some kind of data mapping that should be handled by API consumers. That kind of feature require additional resources for searching (and "guessing" what user meant) so for me it is package users decision if they need any kind of precision thingy.


Thank you for all your input @jav7zaid! What do you think @bhatvikrant @amanpalariya?

@bhatvikrant
Copy link
Owner Author

bhatvikrant commented Oct 3, 2020

Great suggestions @jav7zaid!
I think the UI part will be left to the consumer of the library.

Sounds good @sthiepaan, I agree with your points.

@jav7zaid
Copy link
Contributor

jav7zaid commented Oct 3, 2020

@sthiepaan @bhatvikrant thanks for the review, i agree with respect to UI part to be handled by consumer.
As a front end dev i tend to think towards end user .😉

@bhatvikrant let me know if can open a separate issue for getting countries within a range of Area/Population as input or any of the features you feel can be worked upon.

As suggested by @sthiepaan, we could have seperate methods getCountriesByAreaRange(from, to) for Area
and getCountriesByPopulation(from, to) for population. 😃

Looking forward to contribute.

@sthiepaan
Copy link
Collaborator

For getCountriesByAreaRange(from, to) Method, I think it would be good to do together with #40 (at first we obviously need the data to work with). Would you take care of that @amanpalariya? Would you like to have some help so @jav7zaid can support you doing this?

Regarding getCountriesByPopulation(from, to) Method, lets discuss this shortly. As @bhatvikrant mentioned in #23, the population is a variable. So how would we maintain this? Yearly? Monthly? How accurate this data is? And how accurate should it be? To be honest, I am not sure about this property. Unlike area, it is changing too often.

@sthiepaan
Copy link
Collaborator

I created a few issues related to our discussion so far. Feel free to grab some if interested 😉.

I also have another ideas of properties we could add. Let me write it in an ordered list so we can refer to them easily 😉

  1. neighbors - a list of iso.alpha_2 codes of countries that are neighbor of a country. I think it could be handy in case of getting countries around specific one for example to compare some of their data
  2. is_landlocked - a Boolean that allow us to get all countries that don't have an access to the sea/ocean. I would not extend that too much but simple Boolean looks reasonable
  3. has_alcohol_prohibition - a one of String that represents current status for a country in regard of alcohol prohibition. This information could be useful for API consumers that want to let their users know if it is allowed, limited or prohibited
  4. minimum_driving_age - a Number which inform us what is a minimum age to drive a car in a country
  5. independence_year - a Number of year when country become independent. For countries that has no year available it could be set to 0, null or year when it was settled (TBD)
  6. constitutional_form - a String with the name of constitutional form in a country

Of course, each of these properties will require us to create an additional methods to consume that data.
Let me know what you think! 🚀

@bhatvikrant
Copy link
Owner Author

For getCountriesByAreaRange(from, to) Method, I think it would be good to do together with #40 (at first we obviously need the data to work with). Would you take care of that @amanpalariya? Would you like to have some help so @jav7zaid can support you doing this?

Regarding getCountriesByPopulation(from, to) Method, lets discuss this shortly. As @bhatvikrant mentioned in #23, the population is a variable. So how would we maintain this? Yearly? Monthly? How accurate this data is? And how accurate should it be? To be honest, I am not sure about this property. Unlike area, it is changing too often.

Yes, I think we should leave out population for now at least since it is quite variable.

@bhatvikrant
Copy link
Owner Author

I created a few issues related to our discussion so far. Feel free to grab some if interested 😉.

I also have another ideas of properties we could add. Let me write it in an ordered list so we can refer to them easily 😉

  1. neighbors - a list of iso.alpha_2 codes of countries that are neighbor of a country. I think it could be handy in case of getting countries around specific one for example to compare some of their data
  2. is_landlocked - a Boolean that allow us to get all countries that don't have an access to the sea/ocean. I would not extend that too much but simple Boolean looks reasonable
  3. has_alcohol_prohibition - a one of String that represents current status for a country in regard of alcohol prohibition. This information could be useful for API consumers that want to let their users know if it is allowed, limited or prohibited
  4. minimum_driving_age - a Number which inform us what is a minimum age to drive a car in a country
  5. independence_year - a Number of year when country become independent. For countries that has no year available it could be set to 0, null or year when it was settled (TBD)
  6. constitutional_form - a String with the name of constitutional form in a country

Of course, each of these properties will require us to create an additional methods to consume that data.
Let me know what you think! 🚀

Greate Job @sthiepaan thanks for these awesome points! Lets get this bread 🍞

@sthiepaan
Copy link
Collaborator

Great! I will create separate issues for that, so we can discuss that in more details (if necessary)

@bhatvikrant
Copy link
Owner Author

Okay! Yes, we can discuss before implementing 😁

@JakPit23
Copy link

Hi,
I want to suggest new feature.
What about memberships in EU, NATO, G8, Schengen etc.
I could implement it easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed open to suggestions
Projects
None yet
Development

No branches or pull requests

6 participants