<jupyter_start><jupyter_text>ILT4 Exploring ATNF pulsar dataFirst I created a parser for the pulsar data (just the main db not the glitch table but pull requests are always welcome) which can be found [here]( https://github.com/knservis/atnf_pulsar_cat_parse)Then I wrote the following notebook to try to get a feel what differences the period (P0) distribution can have betwene the different surveys.<jupyter_code>import json
import pandas as pd
from pandas.io.json import json_normalize

pulsarcat_str = ''

with open('atnf_pulsarcat.json', 'r') as f:
    pulsarcat_str = f.read()

pulsarcat = json.loads(pulsarcat_str)

    
pulsarcat_norm= json_normalize(pulsarcat)
pulsarcat_norm_num = pulsarcat_norm.convert_objects(convert_numeric=True)
surveys = pulsarcat_norm_num['SURVEY']
surveys2 = surveys.str.split(',').tolist()
surveys3 = set([surv for srvs in surveys2 for surv in srvs])

%matplotlib inline

import seaborn as sns
import matplotlib as mpl
import matplotlib.pyplot as plt
li = 0
for i, srv in enumerate(surveys3):
    vals = pulsarcat_norm_num[pulsarcat_norm_num['SURVEY'].isin([srv])]['P0.value'].dropna()
    if(vals.size <=0):
        continue
    sns.plt.figure(i)
    sns.plt.title(srv.replace('_', '-'))
    sns.distplot(vals,kde=False)
    li = i




sns.plt.figure(li+1)
sns.plt.title('ALL')
sns.distplot(pulsarcat_norm_num['P0.value'].dropna(),kde=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11079545454545454, 'fraction_numerical': 0.0078125, 'mean_word_length': 5.290178571428571, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '178856', 'license': 'MIT', 'n_tokens_mistral': 535, 'n_tokens_neox': 520, 'n_words': 127, 'path': 'Example-Use.ipynb', 'repo_name': 'knservis/atnf_pulsar_cat_parse', 'size': '1408'}