What I did over the Summer

Over this summer, I was stuck in the confines of my home. I did not have many opportunities to explore my community and interact with other people. However, thanks to my father, I was presented with a brilliant chance to work on something I enjoy doing as well as contributing to my community. I spent three weeks of my summer as an intern for IdeaMart, a branch of Dialog.

 

I was placed in the software development department of the branch. My prior knowledge of programming and writing software for large projects proved to be essential for me to have a meaningful period of learning as well as to meet the expectations that were set.

 

The goal of the internship was to create a mapping software that would require an input of the latitude and longitude of a person and the output should be the GN Division that that person resides in. This information would be used by Dialog and the government to assist the vaccination drive (the software would be used to direct the people to the nearest vaccination center). This software was supposed to be imbedded into an API (which makes it accessible and maintained through the internet).

 

Since I did not have much knowledge about APIs, the first week was dedicated to learning and implementing APIs. I spent the week researching about this software intermediary and worked on building a basic AP I.

I employed the use of multiple libraries like flask and SQL Alchemy. These are libraries that specialize in API software development.

The code above allows me to manipulate a dataset on the local host using a web browser. The dataset can be imagined as a table of students. One column for the id, one for the name and another for the age. This code let me change these features of the students, add new ones, new students or delete the ones in the dataset. This could be used for maintenance of the data set that would be created at the end of the internship.

 

During the next two weeks, I was working on the main project: the mapping software. Essentially, for the software to operate, it needs to be able to correctly identify the location of the latitude and longitude in Sri Lanka and use that location to figure out which GN division it lies in.

 

To accomplish this, the first steps were to obtain a map of Sri Lanka with each GN division mapped out. This was available in a website made by the survey department of the Sri Lankan government. I downloaded the map and wrote a few lines of code to display it. This was done using the pandas libraries which are used for working with datasets. When this was done, the code created its own map and its own set of coordinates to display the map. These coordinates was in the pseudo Mercator format.

 

The next step was to pick an arbitrary point and write a program that could map a point and identify the GN division it lies in. To do this, I converted the panda dataset of the map coordinates into a list. I then iterated through the list using a ‘for loop’ and applied a ‘within’ function, which checks if a point lies within certain boundaries. If the point did lie in one of the boundaries or GN divisions, the name of the GN division would be returned as the final output.

 

The last step was to use actual latitudes and longitudes as points to map. The biggest challenge I had in this internship lied in this final step. This was a challenge since I did not initially realize that the map coordinates were in pseudo Mercator. I was attempting to map Lat and Long coordinates on a pseudo Mercator map, which gave me ridiculous results. After a couple of days of researching, I finally realized this fact. I was then trying to look forĀ  a method to convert Lat and Long into pseudo Mercator. Luckily, there was a function called ‘transform’ in a library called ‘pyproj’ which is used in mapping software and ‘projections’ as the name suggests (If I had not found this, I would have to mathematically convert it). After doing this, I could finally map the Lat and Long coordinates on the map of the GN divisions and use a ‘within’ function to identify which GN division that point lied in. I had successfully met the goal of the project.

 

(comments can be read to understand what each piece of code does)

However, due a time crunch, I did not get the opportunity to integrate this code into an API that would make it accessible on the internet. I submitted my code to my supervisors and that marked the end of my internship.

 

During this experience there were many CAS outcomes that I believe I met. Firstly, I undertook challenges and developed new skills in the process. This can be seen in my new found knowledge of APIs and libraries like pandas and pyproj and data management. Secondly, I also dealt with issues of global significance. My code will be used to help direct people to the nearest COVID vaccination centers and assist in the vaccination drive. Since, COVID has become one of the largest global issues today, I am happy to have contributed to eradicating it in some way. Overall, I am happy that I was able to have such an experience and it has become one of the highlights of my 2021 summer.

Leave a Reply

Skip to toolbar