As with all of the projects throughout the specialization,
you will be required to follow a set of coding style guidelines.
Following such guidelines is really important.
It's useful for you to be able to write your code clearly and consistently so
that when others look at it, they can easily understand it.
Frequently that other person who's looking at it is you some time in the future.
When you look back on your code a year later, having followed the clear set of
coding style guidelines will allow you to very easily understand your code and
maybe use it again.
Also, as we have been doing throughout the specialization,
we will be using our machine grading infrastructure called Owltest.
If you go to this particular Owltest page here,
you can submit your project as you work on it.
And the machine grader will both grade the project and
give you feedback allowing you to assess where you are.
Remember though that Owltest does not submit any grades to Coursera.
Once you're done with the project and ready to submit it to Coursera,
you have to go back to the main page and submit to the actual LTI assignment page.
That will register your grade with Coursera.
Now as I said before, we are going to provide
you with GDP data that we were able to acquire from The World Bank.
But we would like our code to be more general so
that it's not tied to that particular data.
And so in order to do so we will create a GDP information dictionary.
And I'll call that a GDP info dictionary
that contains information about the GDP data.
There are seven key value pairs within that GDP info dictionary.
And the first one is the name of the GDP file.
Then we have the separator and
quote characters that are used within the CSV file that is going to hold the data.
And we know that we're going to need that when we actually try
to read the data out of the CSV file using python CSV module.
Then we have the minimum and maximum years that there is data for within the file.
And it's easier to encode that information here in this GDP info
dictionary than trying to read it out of the file itself.
You could potentially do it.
But you'd have to look at all the column names, and decide whether or
not they were years or not, and then sort them and so on.
And so it's a little bit simpler just to encode them directly here.
And then finally, we need the name of the column that is the country_name and
the name of the column that is the country_code.
Now we're going to use exactly the same GDP info dictionary through out
all of the projects in this course so don't be alarmed if you don't use
all of the fields in the GDP info dictionary in this first project.
Don't worry, you'll use them in future projects and so
if you want to see what one of these looks like there is one in the template that we
provide, But you can also see it here directly, okay?
And so you can see the seven fields.
This is what one of these would look like, and in fact, this is what the GDP
info dictionary looks like for the data that we've gotten from The World Bank.
By using this, we can now use other data.
We can test our code on data that's not the full data set.
We can also acquire GDP data from somewhere else and
still be able to use our code without having to re-write it.
There are four parts to this assignment.
The first one is to read a CSV file as a nested dictionary
by creating a function called read_csv_as_nested_dict.
Now if this sounds familiar to you well it should, we've already done this.
We did this in the last class and
if you have that solution feel free to use it here.
So hopefully this is not something you need to write.
If you'd like more practice though, feel free to go ahead and
write it from scratch.
And don't bother looking back at what you wrote before.
See if you can do it much easier this time around.