The Atmosfera USM Data Policy applies to the Atmosfera USM Dataset. The policy is consistent with the CC-BY-4.0 data usage license.
The data is available only for scientific and educational purposes, and under this policy, data producers must have opportunities to collaborate and consult with data users. Substantive contributions from data producers result in co-authorship.
Contact the data providers when you begin research that could lead to a publication. As a guideline to interaction between data users and providers, data providers must be given at least, and respond within, three weeks to contribute to analysis and manuscript after the first draft is completed.
CC-BY-4.0 data are available following the guidelines of the CC-BY-4.0 data usage license (Attribution 4.0 International (CC BY 4.0); https://creativecommons.org/licenses/by/4.0/). The CC-BY-4.0 license specifies that the data user is free to Share (copy and redistribute the material in any medium or format) and/or Adapt (remix, transform, and build upon the material) for any purpose.
It is recommended that data users inform data providers of forthcoming publications using their data (email list is provided with data download) and cite individual sites’ DOIs for data used when feasible.
Converting JSON to DataFrame using jsonlite package in R
# Load the library; ensure that you have installed it first # install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/') library(jsonlite)
# Give the input file name to the function. Place the JSON file in the working directory data <- fromJSON("data.json")
Converting JSON to DataFrame using pandas and json libraries in Python
# import packages import pandas as pd import numpy as np import json # Show numbers inside the dataframe with 2 decimal places pd.set_option('display.precision', 2) # Read data with open(r'Data/CEMACS/11c408d7-6827-11ee-a4c5-3b549db7c439.json', 'r') as f: data = json.load(f) print(f'{"="*10} Cite {"="*10}\n') display(data["cite"]) print(f'\n{"="*10} Station {"="*10}\n') display(data["station"]) print(f'\n{"="*10} unit {"="*10}\n') display(data["unit"])
# Make a dataframe from the json file df = pd.json_normalize(data['body']) # Convert dateTime column to date and time type df['dateTime'] = pd.to_datetime(df['dateTime']) # Convert all other columns to their appropriate types for column in df.columns: # If column is not dateTime, check its type if column != 'dateTime': # Try to convert the column to numeric (float) try: df[column] = df[column].astype(float) # If error, then convert the column to string except ValueError: df[column] = df[column].astype(str) # Rename the columns: remove long prefixes and use only the last part after the last dot df.columns = [col.split('.')[-1] for col in df.columns] df.head().T
The Atmosfera USM Data Policy applies to the Atmosfera USM Dataset. The policy is consistent with the CC-BY-4.0 data usage license.
The data is available only for scientific and educational purposes, and under this policy, data producers must have opportunities to collaborate and consult with data users. Substantive contributions from data producers result in co-authorship.
Contact the data providers when you begin research that could lead to a publication. As a guideline to interaction between data users and providers, data providers must be given at least, and respond within, three weeks to contribute to analysis and manuscript after the first draft is completed.
CC-BY-4.0 data are available following the guidelines of the CC-BY-4.0 data usage license (Attribution 4.0 International (CC BY 4.0); https://creativecommons.org/licenses/by/4.0/). The CC-BY-4.0 license specifies that the data user is free to Share (copy and redistribute the material in any medium or format) and/or Adapt (remix, transform, and build upon the material) for any purpose.
It is recommended that data users inform data providers of forthcoming publications using their data (email list is provided with data download) and cite individual sites’ DOIs for data used when feasible.
The Atmosfera USM Data Policy applies to the Atmosfera USM Dataset. The policy is consistent with the CC-BY-4.0 data usage license.
The data is available only for scientific and educational purposes, and under this policy, data producers must have opportunities to collaborate and consult with data users. Substantive contributions from data producers result in co-authorship.
Contact the data providers when you begin research that could lead to a publication. As a guideline to interaction between data users and providers, data providers must be given at least, and respond within, three weeks to contribute to analysis and manuscript after the first draft is completed.
CC-BY-4.0 data are available following the guidelines of the CC-BY-4.0 data usage license (Attribution 4.0 International (CC BY 4.0); https://creativecommons.org/licenses/by/4.0/). The CC-BY-4.0 license specifies that the data user is free to Share (copy and redistribute the material in any medium or format) and/or Adapt (remix, transform, and build upon the material) for any purpose.
It is recommended that data users inform data providers of forthcoming publications using their data (email list is provided with data download) and cite individual sites’ DOIs for data used when feasible.
Converting JSON to DataFrame using jsonlite package in R
# Load the library; ensure that you have installed it first # install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/') library(jsonlite)
# Give the input file name to the function. Place the JSON file in the working directory data <- fromJSON("data.json")
Converting JSON to DataFrame using pandas and json libraries in Python
# import packages import pandas as pd import numpy as np import json # Show numbers inside the dataframe with 2 decimal places pd.set_option('display.precision', 2) # Read data with open(r'Data/CEMACS/11c408d7-6827-11ee-a4c5-3b549db7c439.json', 'r') as f: data = json.load(f) print(f'{"="*10} Cite {"="*10}\n') display(data["cite"]) print(f'\n{"="*10} Station {"="*10}\n') display(data["station"]) print(f'\n{"="*10} unit {"="*10}\n') display(data["unit"])
# Make a dataframe from the json file df = pd.json_normalize(data['body']) # Convert dateTime column to date and time type df['dateTime'] = pd.to_datetime(df['dateTime']) # Convert all other columns to their appropriate types for column in df.columns: # If column is not dateTime, check its type if column != 'dateTime': # Try to convert the column to numeric (float) try: df[column] = df[column].astype(float) # If error, then convert the column to string except ValueError: df[column] = df[column].astype(str) # Rename the columns: remove long prefixes and use only the last part after the last dot df.columns = [col.split('.')[-1] for col in df.columns] df.head().T