Data Visualization
Data visualization is an important part of programming, as it translates mind-numbing amounts of data into a form easily understood by humans. There are 2 main steps in the proccess of data visualization: data proccessing and generating the graphics. Data must be imported, removed from the organizational structure that contained it (like a csv file), and fed into algorithms that generate graphisc Data proccessing is often accomplished by packages such as pandas, and graphics are generated by packages like tkinter.
Part 1:
- Making planets larger: change first 4 arguments in create_oval to x-10, y-10, x+10, y+1
- Visualization 2:
How the mapping program works: The program prints the data in the visitplace.csv file. The folium package then prepares a map, which is saved in map_obj. The for loop adds each set of coordinates and name to the map using the folium package.
First, I analyzed the required inputs and outputs of the program. Two inputs were required: temperature in column 1 and depth in column 2. One output was required: the plotted graph. I asked ChatGPT to write a program with these inputs and outputs, but my instructions did not make clear that the data would be provided, so ChatGPT generated random numbers for temperature and depth. I therefore explained in the second set of directions that a file called amanda_temp.txt would provide the neccessary data. The program generated the plot shown.
Visualization 4:
- input: the function get_data retrieves data from a website called aviation weather
- output: the function run uses tkinter to draw the weather dials
- changing the gray circle into an oval: I realized that the 4 arguments of the create_oval method were the vertices of the circle, so I changed the x position of the left vertice from 300 to 325.
Visualization 5:
I used Proffessor Holt's data and the mapping program from visualization 2. Cleaning the data proved to be the most challenging part of this visualization; otherwise, it was similar to the previous mapping assignment. First, I tried to use my own location data, but the location files were missing. I then downloaded the 2020_JULY dataset from Canvas and converted it to a csv file, laboriously deleting the neccessary columns by hand. I had to restart the deleting proccess at least once, and even when only 3 columns remained, I had to manually delete the spaces between rows. Still, the markers did not appear when the map was loaded, and someone pointed out that the decimal points in the coordinates were missing. To fix this, I modified the code to divide the longitude and latitude by 10^7.
Overall, this visualization was frustrating and tedious at times, emphasizing the value of automation and algorithms. I feel that there should have been an easier method of completing such repetitive tasks as deleting columns and spaces.
Comments
Post a Comment