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

CO2 Data Collection of the Mauna Loa Observatory #26

Merged
merged 92 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 83 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
206c282
Create data.txt
haiderabbas007 Nov 3, 2024
e9d7893
Create flask_discrete.py
haiderabbas007 Nov 3, 2024
53b9815
Add files via upload
haiderabbas007 Nov 3, 2024
4852493
Raw data
haiderabbas007 Nov 3, 2024
6796a3f
Update flask_discrete.py
haiderabbas007 Nov 3, 2024
58967b8
Add files via upload
haiderabbas007 Nov 3, 2024
b863136
Add files via upload
haiderabbas007 Nov 3, 2024
98b595e
Add files via upload
haiderabbas007 Nov 3, 2024
0263976
Update flask_discrete.py
haiderabbas007 Nov 3, 2024
52d3c6c
Add files via upload
haiderabbas007 Nov 3, 2024
3e94a3c
Create LICENSE
haiderabbas007 Nov 3, 2024
3328e46
Delete LICENSE
haiderabbas007 Nov 3, 2024
268c04d
Create LICENSE
haiderabbas007 Nov 3, 2024
6383ddd
Delete mauna-loa/data.txt
haiderabbas007 Nov 3, 2024
605f5a0
Rename
haiderabbas007 Nov 3, 2024
b5889bf
Create NOTES.md
haiderabbas007 Nov 3, 2024
56eb406
Rename
haiderabbas007 Nov 3, 2024
9a82274
Create flask_monthly.py
haiderabbas007 Nov 3, 2024
2c4e549
Add files via upload
haiderabbas007 Nov 3, 2024
6a07b5d
Rename
haiderabbas007 Nov 3, 2024
90e207e
Rename
haiderabbas007 Nov 3, 2024
443db51
Update flask_discrete.py
haiderabbas007 Nov 3, 2024
d240600
Update flask_monthly.py
haiderabbas007 Nov 3, 2024
ddcb197
Update flask_monthly.py
haiderabbas007 Nov 3, 2024
52498d1
Create insitu_daily.py
haiderabbas007 Nov 3, 2024
227f91f
Add files via upload
haiderabbas007 Nov 3, 2024
5e71e1f
Update insitu_daily.py
haiderabbas007 Nov 3, 2024
d0d070b
Add files via upload
haiderabbas007 Nov 3, 2024
5f59164
Update flask_discrete.py
haiderabbas007 Nov 3, 2024
b07a8d2
Add files via upload
haiderabbas007 Nov 3, 2024
d1bb4d5
Update flask_monthly.py
haiderabbas007 Nov 3, 2024
5082e66
Add files via upload
haiderabbas007 Nov 3, 2024
cb173a3
Create insitu_hourly.py
haiderabbas007 Nov 3, 2024
1dca4b6
Add files via upload
haiderabbas007 Nov 3, 2024
08c5b40
Update insitu_hourly.py
haiderabbas007 Nov 3, 2024
e2c40f5
Add files via upload
haiderabbas007 Nov 3, 2024
e3a57ac
Create insitu_hourly.md
haiderabbas007 Nov 3, 2024
deb1fa3
Trying to upload large file through git
haiderabbas007 Nov 3, 2024
cf7b22f
Trying to upload large file through git
haiderabbas007 Nov 3, 2024
19793f7
Trying to upload large file through git
haiderabbas007 Nov 3, 2024
014202e
Update insitu_hourly.py
haiderabbas007 Nov 3, 2024
cd8cf6a
Create insitu_monthly.py
haiderabbas007 Nov 3, 2024
364631b
Update insitu_monthly.py
haiderabbas007 Nov 3, 2024
33f1ae8
Add files via upload
haiderabbas007 Nov 3, 2024
2d4465f
Create surface_discrete.py
haiderabbas007 Nov 4, 2024
1d42663
Add files via upload
haiderabbas007 Nov 4, 2024
f159eb6
Update flask_discrete.py
haiderabbas007 Nov 4, 2024
04a7a69
Update flask_monthly.py
haiderabbas007 Nov 4, 2024
c6d8dd1
Update insitu_daily.py
haiderabbas007 Nov 4, 2024
4a3cd21
Update insitu_hourly.py
haiderabbas007 Nov 4, 2024
816a8fb
Update insitu_monthly.py
haiderabbas007 Nov 4, 2024
ec30100
Update surface_discrete.py
haiderabbas007 Nov 4, 2024
9e91b15
Create README.md
haiderabbas007 Nov 4, 2024
cf604a2
Update flask_discrete.py
haiderabbas007 Nov 4, 2024
f47ad70
Delete mauna-loa/flask-discrete/flask_discrete.json
haiderabbas007 Nov 4, 2024
ef63f5c
Delete mauna-loa/flask-discrete/flask_discrete_no_nan.json
haiderabbas007 Nov 4, 2024
8b4f63a
New json files with Pandas df datetime
haiderabbas007 Nov 4, 2024
8ec0e77
Convert 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
b9da0b3
Delete mauna-loa/insitu-daily/insitu_daily.json
haiderabbas007 Nov 4, 2024
049d47f
Delete mauna-loa/insitu-daily/insitu_daily_no_nan.json
haiderabbas007 Nov 4, 2024
e009a68
Convert 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
196e0d3
Converted 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
ac630bb
Delete mauna-loa/insitu-monthly/insitu_monthly.json
haiderabbas007 Nov 4, 2024
bbb44bc
Delete mauna-loa/insitu-monthly/insitu_monthly_no_nan.json
haiderabbas007 Nov 4, 2024
490a43c
Converted 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
291de6e
Convert 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
4ccf93b
Delete mauna-loa/surface-discrete/surface_discrete.json
haiderabbas007 Nov 4, 2024
8231374
Delete mauna-loa/surface-discrete/surface_discrete_no_nan.json
haiderabbas007 Nov 4, 2024
b9ea80b
Convert 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
258358f
Convert 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
7a86882
Delete mauna-loa/flask-monthly/flask_monthly.json
haiderabbas007 Nov 4, 2024
f20ff56
Delete mauna-loa/flask-monthly/flask_monthly_no_nan.json
haiderabbas007 Nov 4, 2024
990dc19
Converted 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
512a7a3
Converted 'Timestamp' to Pandas df
haiderabbas007 Nov 4, 2024
a171867
Delete mauna-loa/insitu-hourly/insitu_hourly.json
haiderabbas007 Nov 4, 2024
2786cbc
Delete mauna-loa/insitu-hourly/insitu_hourly_no_nan.json
haiderabbas007 Nov 4, 2024
e029c3c
Converted to Pandas dataframe
haiderabbas007 Nov 4, 2024
834656b
Update flask_monthly.py
haiderabbas007 Nov 4, 2024
50f8650
Delete mauna-loa/flask-monthly/flask_monthly.json
haiderabbas007 Nov 4, 2024
96ce48f
Delete mauna-loa/flask-monthly/flask_monthly_no_nan.json
haiderabbas007 Nov 4, 2024
cd4f145
Correct json files
haiderabbas007 Nov 4, 2024
ef02415
Delete mauna-loa/flask-monthly/flask_monthly_raw.txt
haiderabbas007 Nov 4, 2024
d625a7c
Raw file with modification
haiderabbas007 Nov 4, 2024
b4f9e07
Update flask_monthly.py
haiderabbas007 Nov 4, 2024
89f8f2c
Create data
haiderabbas007 Nov 4, 2024
fedfd4d
flask_monthly files
haiderabbas007 Nov 4, 2024
35f54fe
Update flask_monthly.py
haiderabbas007 Nov 4, 2024
c2f118c
Delete mauna-loa-data/data
haiderabbas007 Nov 4, 2024
4e41c57
LICENSE file
haiderabbas007 Nov 4, 2024
bf4d0f9
Delete mauna-loa-data/flask_monthly_README.html
haiderabbas007 Nov 4, 2024
eb84ccc
Create NOTES.md
haiderabbas007 Nov 4, 2024
005c14c
Create README.md
haiderabbas007 Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions mauna-loa/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
14 changes: 14 additions & 0 deletions mauna-loa/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mauna Loa CO₂ Data Processing Notes

## Data Source
This dataset is provided by the NOAA Global Monitoring Laboratory (GML) as part of the Carbon Cycle Cooperative Global Air Sampling Network. The data were collected at Mauna Loa Observatory (MLO) through Flask, Insitu, and Surface PFP sampling at hourly, daily, monthly, and discrete frequencies, providing CO₂ concentrations over multiple decades.

## License
The data are released under the Creative Commons Zero (CC0 1.0 Universal) Public Domain Dedication. For full details, see the [CC0 1.0 license](https://creativecommons.org/publicdomain/zero/1.0/).

## Citation
If you use this data, please cite it as follows:
> Lan, X., J.W. Mund, A.M. Crotwell, K.W. Thoning, E. Moglia, M. Madronich, K. Baugh, G. Petron, M.J. Crotwell, D. Neff, S. Wolter, T. Mefford, and S. DeVogel (2024), Atmospheric Carbon Dioxide Dry Air Mole Fractions from the NOAA GML Carbon Cycle Cooperative Global Air Sampling Network, 1968-2023, Version: 2024-07-30, https://doi.org/10.15138/wkgj-f215

## Additional Information
For detailed information on data collection, calibration, and quality control, refer to the original NOAA documentation, which can be found [here](https://gml.noaa.gov/dv/data/index.php?search=loa&parameter_name=Carbon%2BDioxide).
105 changes: 105 additions & 0 deletions mauna-loa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Mauna Loa Observatory CO₂ Data Processing

This repository contains data and scripts to process CO₂ concentration data collected from the Mauna Loa Observatory. The data includes various types of CO₂ measurements, such as discrete, monthly, daily, and hourly readings, stored in subdirectories corresponding to the sampling type.

## Directory Structure

There are six subdirectories in the main directory. Each subdirectory contains similar sets of files based on data sampled at different frequencies or formats (e.g., flask monthly, insitu daily). The subdirectories are as follows:

- `flask-discrete/`
- `flask-monthly/`
- `insitu-daily/`
- `insitu-hourly/`
- `insitu-monthly/`
- `surface-discrete/`

### File Types in Each Subdirectory

Each subdirectory contains the following files:
- **Data Files**:
- `.csv`: Comma-separated values file with CO₂ concentration data.
- `.json`: JSON format of the same data.
- `_no_nan.json`: JSON file excluding rows with missing (NaN) values.
- `.md`: Markdown file representation of the data.
- `_raw.txt`: Original raw data file as downloaded from NOAA.

- **Scripts and Documentation**:
- `.py`: Python script used to process the raw data file.
- `_README.html`: Detailed README from NOAA, including data usage, license, and warnings.

## Usage

The scripts are designed to load, process, and save CO₂ concentration data for different sampling types, generating a CSV, JSON, JSON (without NaNs), and Markdown output for each dataset. The data files include:

- `Timestamp`: Date and time of the sample.
- `Fractional Year`: The year with a decimal representing the exact time within the year.
- `CO2 (ppm)`: CO₂ concentration in parts per million.
- `Standard Deviation (ppm)`: Measurement uncertainty.

### Examples of Processed Data

#### CSV Example

```csv
Timestamp, Fractional Year, CO2 (ppm), Standard Deviation (ppm)
2021-07-02T15:21:59Z, 2021.500384291, 417.8, 0.041
2021-07-04T15:22:01Z, 2021.5058638064, 416.95, 0.041
...

```

#### JSON Example

```
[
{
"Timestamp": "2021-07-02T15:21:59Z",
"Fractional Year": 2021.500384291,
"CO2 (ppm)": 417.8,
"Standard Deviation (ppm)": 0.041
},
{
"Timestamp": "2021-07-04T15:22:01Z",
"Fractional Year": 2021.5058638064,
"CO2 (ppm)": 416.95,
"Standard Deviation (ppm)": 0.041
}
...
]
```

#### Markdown Example

```
| Timestamp | Fractional Year | CO2 (ppm) | Standard Deviation (ppm) |
|---------------------|-----------------|-----------|---------------------------|
| 2021-07-02T15:21:59Z | 2021.500384291 | 417.8 | 0.041 |
| 2021-07-04T15:22:01Z | 2021.5058638064 | 416.95 | 0.041 |
...
```

## Requirements

- Python 3.x
- `pandas` library for data manipulation

## How to Use
To process a new raw data file, navigate to the respective folder and run the Python script, for example:

```python flask_monthly.py```

This will produce the necessary CSV, JSON, JSON (no NaN), and Markdown files in the same folder.

## Linting Compliance
The Python scripts in this repository are `pylint` **compliant**. This ensures that the code follows best practices for readability,
maintainability, and style according to PEP8 standards. For consistent results, ensure that `pylint` is installed:

```pip install pylint```

To run `pylint` on a script, use, for example:

```pylint insitu-hourly.py```

## License and Citation
All data files are in the public domain under the **Creative Commons Zero (CC0) 1.0 Universal Public Domain Dedication**. Please see the `LICENSE` file in this repository for more information.

Loading
Loading