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

Add unique data to src/data.json #23

Closed
bhatvikrant opened this issue Mar 16, 2020 · 13 comments
Closed

Add unique data to src/data.json #23

bhatvikrant opened this issue Mar 16, 2020 · 13 comments
Labels
documentation Improvements or additions to documentation 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 help wanted Extra attention is needed good first issue Good for newcomers open to suggestions labels Mar 16, 2020
@sanilborkar
Copy link
Contributor

Could you please elaborate? What unique data are we talking about?

@pswartz66
Copy link
Contributor

pswartz66 commented Apr 15, 2020

Not exactly sure what you mean by unique data but if you mean add another property to each object below is a function that you could use to easily add data into the json data. I just required it in as jsonObj for testing purposes. Hope this helps!

const jsonObj = require('./clonedJSON');

function addUniqueData(arr) {
    // loop through the jsonObj
    for (let i = 0; i < arr.length; i++) {
        // add unique data to each country object
        arr[i].uniqueData = i + 'xyz';
    }
    return arr;
}

console.log(addUniqueData(jsonObj));

@bhatvikrant
Copy link
Owner Author

@sanilborkar as @pswartz66 rightly prompted, by unique data I mean , data that is unique to every country and it doesn't changes with time. for example: Land area, capital etc.. a wrong example would be population (since it changes with time, its variable)

@bhatvikrant
Copy link
Owner Author

bhatvikrant commented Apr 15, 2020

Thanks @pswartz66 ! I' ll definitely use this helper function! Appreciate it!

@orimdominic
Copy link
Contributor

@bhatvikrant

  1. Does year of independence suffice for unique data?
  2. If it does, what will the value be for countries without an independence date like England?

@bhatvikrant
Copy link
Owner Author

@sudo-kaizen yes, this will be considered as unique data. For countries like England just add the string : 'N/A'

@faraz16iqbal
Copy link

Is this issue still open?

@bhatvikrant
Copy link
Owner Author

@faraz16iqbal yes it is.

bhatvikrant added a commit that referenced this issue Jul 11, 2020
issue #23 add drive direction to the countries as unique data
@ccsCoder
Copy link

ccsCoder commented Aug 10, 2020

@bhatvikrant

Would you consider popular tourist attractions as Unique ? E.g

France: ['Eiffel Tower'],
India: ['Taj Mahal', 'Qutub Minar'],

@bhatvikrant
Copy link
Owner Author

@ccsCoder yea sounds good

@bhatvikrant bhatvikrant added documentation Improvements or additions to documentation enhancement New feature or request hacktoberfest labels Sep 30, 2020
@Ac-Srikanth
Copy link
Contributor

Hi @bhatvikrant , i have modified the famous for fields in the data for the following countries , syria, turkey, austria and sweden. Do check .

@vijaykrishna536
Copy link

Hi @bhatvikrant, Added a unique property timezone to data.json #64
Please review. Thank you

@sthiepaan
Copy link
Collaborator

Since we have #32 Issue opened, there is no reason for having this one as well. So for now lets stick to one issue opened.

On the other hand, I think we should have separate Issues created for each bug/feature, so the discussion is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 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

9 participants