From 44cba81da34fa5c9b227afd105d7af5864e88b6d Mon Sep 17 00:00:00 2001 From: david-wei-01001 <72998341+david-wei-01001@users.noreply.github.com> Date: Sat, 12 Dec 2020 23:58:49 -0600 Subject: [PATCH] gg --- Final Project.tex | 118 ---------------------------------------------- README.md | 1 - requirements.txt | 12 +++++ 3 files changed, 12 insertions(+), 119 deletions(-) delete mode 100644 Final Project.tex delete mode 100644 README.md create mode 100644 requirements.txt diff --git a/Final Project.tex b/Final Project.tex deleted file mode 100644 index 8f14ed4..0000000 --- a/Final Project.tex +++ /dev/null @@ -1,118 +0,0 @@ -\documentclass[fontsize=11pt]{article} -\usepackage{amsmath} -\usepackage[utf8]{inputenc} -\usepackage[margin=0.75in]{geometry} -\usepackage{graphicx} - -\title{CSC110 Project Proposal: From Sea Level Raising to Global Warming: Analysing the Relationship Between Sea Level and Climate Change} -\author{Jiankun Wei, Ruiting Chen, Yiteng Sun, Weiheng Wang} -\date{Friday, November 6, 2020} - -\begin{document} - \maketitle - - \section*{Problem Description and Research Question} - - Since the industrial revolution, humans have altered the world greatly from polluting the environment to destroying the habitat. We uninhibitedly release greenhouse gases into the air causing global warming, leaving heavy metals around mines to wipe out local plants, deforest Amazon for farming, and gazing. ("Deforestation in Brazilian Amazon surges to 12-year high") As a result, the species extinction rate of the world has soared from one species per decade to six thousand species per year, which has increased sixty thousand-fold! Yet in the past, humans have taken this for granted. We indeed alter the environment and many species go extinct, but it does not affect us. In fact, our metropolis mushroomed all around the world; airplanes flying high above the sky carrying people to explore previously unreachable places; factories had been built across the globe sending manufactured goods to everybody to improve our life. Even the moon, which our ancestors can only fancy about, has been reached. It seems all fine. But does it?\\ - Gradually and unnoticeable by the proud humans, the Earth is altering and a great danger appears on the horizon -- the Raising of the sea level. ("This is what climate change look like") There are two main reasons for raising the sea level, all of them are due to the increasing amount of greenhouse gases in the atmosphere. As there are more and more greenhouse gases released into the air, it begins trapping sunlight which increases the temperature of the Earth. This in turn melts the ice on the north and south pole. The melted water flows into the sea, which raises the sea level. (“Why Are Glaciers and Sea Ice Melting?”) Also, as temperature rises, water tends to expand, directly leading to increased sea levels. Finally, as the sea level increases, more and more ice on the poles will be submerged underwater, and begin to melt itself. This is crucial because as the underlying ice melt, the iceberg fell into the sea which will eventually disappear resulting in a self-enhancing loop. ("NASA Sea Level Change Portal: Thermal Expansion.")\\ - The rising sea level directly affects human society. First, a devastating tsunami will visit the coastline more frequently causing thousands of lives and money. The deconstruction of shelters will also turn people into refugees. What is more, seawater will taint the coastal farms and add salt into the soil which reduces the crop yield. Last but not the least, many cities located near the sea are directly threatened by the rising sea level. Following the current trend, big metropolis like London, San Diego, New York, and countries like the Netherlands will soon be submerged underwater. (Lewis, Sophie)\\ - - Given these important threatens, it is emergent to be aware and understand climate change and the rising sea level, and to treat them seriously.\\ - - Our research question is "How does sea-level change around the world due to climate change?” - - \newpage - \section*{Dataset Description} - We gathered sea level data from the University of Hawaii Sea Level center website(UHSLC Legacy Data Portal), and temperature data from datahub. ("Global Temperature Time Series") The data downloaded from this website includes a collection of daily sea level recording (unit: mm) from different sea level stations across the world during the time span indicated in the data stored in .dat format. An example of sea level data from one station(Peter \& Paul Rocks Brazil) is shown in the image below. - - \begin{figure}[h!] - \centering - \includegraphics[scale=0.5]{sample_data.JPG} - \caption{Example of Sea Level Data} - \label{fig:sample_data.JPG} - \end{figure} - - Each data set contains a header(first row of data) and the body of the sea level data(the rest of the rows).\\ - - Header structure(from left to right): - \begin{itemize} - \item - station index: 3 digits station number followed by one letter from A to Z - \item - name and region of the station - \item - start and end year of data collection - \item - latitude and longitude of the station - \item - decimation method, Coded as - 1 : filtered, - 2 : simple average of all hourly values for a day, - 3 : other - \item - reference offset: constant offset to be added to each data value for data to be relative to tide staff zero or primary datum in same units as data - \item - reference code: R = data referenced to datum, - X = data not referenced to datum - \item - unit of measurement - \end{itemize} - - Body structure(from left to right): - \begin{itemize} - \item - station index: 3 digits station number followed by one letter from A to Z - \item - name and region of the station - \item - year of data collection - \item - julian day: day count from 1 Jan for 1st data point of each record followed by letter J for clarity - \item - 12 daily sea level values(missing data indicated by(9999)) - \end{itemize} - - - \section*{Computational Plan} - - In order to let the data set be convenient for a computer to use, our group will write functions to read .html format file and .json format file to let python conveniently use this file to do complicated operations and then get assess to the data we need. ("Extracting Data from HTML with BeautifulSoup") Then we will create three dataclasses named “SeaLevel”, "Temperature" and "Station" to recored and store the data we need. In the next step, based on our entities, we would create a new class named "ClimateSeaLevelSystem", which is similar to the system we learnt in the lecture, to store all the data mapping to their key element(like station name matches its corresponding Station). After this step, we could create an abstract class named "EntityGenerator" to generate the Temperature data and Station with its corresponding sea level data and store them in our system "ClimateSeaLevelSystem". Then because the data type in our new data set is the continuous variables in the quantitative data type (Chopra \& Alaudeen(2019) page 1), thus we decide to use linear regression, and the scatter plots on map to present data by using plotly.\\ - First, we want to present the relationship between the year (x-axis) and average daily sea-level value measured by one station (y-axis). We will first plot all the points out and then draw linear regression based on these points in the graph. What is more, we will also design a function to use linear regression to predict future changes in sea levels at different stations. \\ - Then, we also design to show the relationship between the year (x-axis) and temperature measured by one station (y-axis). The methods is the same to the steps we take in creating the linear regression of sea level. To find the relation between sea level change and climate change, we will combine two lines in one chart. \\ - Finally, we decided to use plotly to draw a world map with scatter plots about how the sea-level changes at all our stations from around 1880 to 2020, using the sea level data, station data from our data set. every single point on the map represents the actual location of each station. In the world map, we decide to use different color of plots to represent whether the sea level of the station is higher or lower than the base height(we also can say the sea level is rising or falling). For stations which reported rising sea level, we will use red to illustrate the intensity of how much sea level raised. For stations that reported falling sea level, we will use blue to illustrate the intensity of how much sea-level falls. Then as time moves forward, the colour will change, given the change in the rising and falling sea level as a vivid animation.\\ - The plotly has the ability to draw animation which makes it relevant because by using plotly to draw animation, we can have a direct visualization of the data. ("Intro to Animations") As we depict the rising and falling of the sea level as time moves forward, the animation conveys in a vivid way the data which is just what we want to study. \\ - Using plotly to draw animation is also appropriate because it reflects how sea level has changed in the recorded time period. This will give us valuable intuition on the data and also the importance of climate change. For example, when you see that as time passes, more and more areas become red and the colour gets darker and darker towards red, you will immediately realize the significance of climate change on our world and how less time we have. Thus, by viewing the animation, one will realize that the problem of climate change is something that we must treat seriously. - - - \section*{References} - \begin{enumerate} - \item - Nunez, Christina. “Sea Level Rise, Explained.” Sea Level Rise, Facts and Information, 27 Feb. 2019, www.nationalgeographic.com/environment/global-warming/sea-level-rise/. - \item - UHSLC Legacy Data Portal, uhslc.soest.hawaii.edu/data/?fd. - \item - Chopra, R., England, A., \& Alaudeen, M. N. (2019). Data science with Python: Combine Python with machine learning principles to discover hidden patterns in raw data. Birmingham: Packt Publishing. - \item - “Why Are Glaciers and Sea Ice Melting?” WWF, World Wildlife Fund, www.worldwildlife.org/pages/why-are-glaciers-and-sea-ice-melting. - \item - “NASA Sea Level Change Portal: Thermal Expansion.” NASA, NASA, 26 Mar. 2020, sealevel.nasa.gov/understanding-sea-level/global-sea-level/thermal-expansion. - \item - Lewis, Sophie. “Rising Sea Levels on Track to Destroy the Homes of 300 Million People by 2050.” CBS News, CBS Interactive, 30 Oct. 2019, www.cbsnews.com/news/rising-sea-levels-on-track-to-destroy-homes-of-300-million-people-by-2050/. - \item - Shasta Darlington. "Deforestation in Brazilian Amazon surges to 12-year high". CNN World, CNN. 1 Dec, 2020 . https://edition.cnn.com/2020/12/01/americas/deforestation-brazil-amazon-bolsonaro-intl/index.html - \item - "This is what climate change looks like". CNN World, CNN. 11 Dec, 2020. https://edition.cnn.com/2020/12/11/world/gallery/climate-change-effects-penguins-2020-spc/index.html - \item - Gaurav Singhal. "Extracting Data from HTML with BeautifulSoup". Pluralsight. https://www.pluralsight.com/guides/extracting-data-html-beautifulsoup - \item - "Intro to animations in Python". Graphing Libraries, Plotly. https://plotly.com/python/animations/ - \item - "Global Temperature Time Series". Datahub, Datahub. - https://datahub.io/core/global-temp#python - \end{enumerate} - -% NOTE: LaTeX does have a built-in way of generating references automatically, -% but it's a bit tricky to use so we STRONGLY recommend writing your references -% manually, using a standard academic format like APA or MLA. -% (E.g., https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/general_format.html) - -\end{document} diff --git a/README.md b/README.md deleted file mode 100644 index ba1b5ea..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# csc110-Final-Project \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3774c93 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +# csc110-Final-Project: Python libraries required for this project. + +# Data Extracting: +requests +beautifulsoup4 +urllib3 + +#Data Processing: +datapackage + +# Graphics and data visualization: +plotly \ No newline at end of file