<jupyter_start><jupyter_text>Campo de gravidade no mundo inteiro  Importando bibliotecas<jupyter_code>import sys
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import cartopy.crs as ccrs
import ipywidgets as widgets
notebook_name = 'gravity_earth.ipynb'<jupyter_output><empty_output><jupyter_text>Plot style<jupyter_code>plt.style.use('ggplot')<jupyter_output><empty_output><jupyter_text>Open a dictionary<jupyter_code>data_set = dict()<jupyter_output><empty_output><jupyter_text>Saving files<jupyter_code>saved_files = []<jupyter_output><empty_output><jupyter_text>Loading data<jupyter_code>filename = 'data_set/gravity_earth_EIGEN-6C4_ICGEM.gdf'
names = ['LONG','LAT','GRAV_DATA']
data = pd.read_csv(filename,usecols=(0,1,3),names=names, skipinitialspace=True, skiprows=34,
                   delim_whitespace=True,low_memory=False)
N_long = 181
N_lat = 361
data_set['shape'] = (N_long,N_lat)
data_set['long'] = data.iloc[:,0].to_numpy()
data_set['lat'] = data.iloc[:,1].to_numpy()
data_set['grav_field'] = data.iloc[:,2].to_numpy()

data_set['grav_earth'] = data_set['grav_field'].reshape(data_set['shape'])
data_set['LONG'] = data_set['long'].reshape(data_set['shape'])
data_set['LAT'] = data_set['lat'].reshape(data_set['shape'])<jupyter_output><empty_output><jupyter_text>Gravity field (World)<jupyter_code>title_font = 22
bottom_font = 18
plt.figure(figsize=(15,15), tight_layout=True)

projection = ccrs.Mollweide()
ax = plt.axes(projection=projection)
ax.set_global()
ax.coastlines()
ax.set_title('Gravity Earth (mGal)',size=title_font)
pg = ax.contourf(data_set['LONG'],
            data_set['LAT'],
            data_set['grav_earth'],100,transform=ccrs.PlateCarree(),cmap='RdBu_r')
cb = plt.colorbar(pg, orientation="vertical", pad=0.01, aspect=50, shrink=.4)
cb.ax.tick_params(labelsize=bottom_font)

file_name = 'images/gravity_earth'
plt.savefig(file_name+'.png',dpi=300)
saved_files.append(file_name+'.png')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15651736285858078, 'fraction_numerical': 0.018117765475591345, 'mean_word_length': 8.841584158415841, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '666621', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 816, 'n_tokens_neox': 777, 'n_words': 96, 'path': 'Content/code/1. Gravity_earth/.ipynb_checkpoints/1.1. fetching_data_gravity_and_topography-checkpoint.ipynb', 'repo_name': 'andrelreis/metodos-potenciais', 'size': '1987'}