Skip to main content

SDK for the Sturdy Statistics API

Project description

Sturdy Stats SDK

This is the sdk for the Sturdy Statistics API. We host a series of public indicies trained on Earnings Calls, ArXiv, HackerNews, and various news streams that anyone can use for public data analysis. Uploading data requires signing up at https://sturdystatistics.com in order to create an api key.

Installation

Core API: pip install sturdy-stats-sdk

Regression Extension: pip install sturdy-stats-sdk[regression]

Resources

Explore our gallery to browse visualization created by the sturdy-stats-sdk. Follow along with our quickstart to hit the ground running or browse our advanced examples to perform rigorous analyses.

Technical Features

Automatic Structuring of Unstructured Text Data
Convert unstructured documents into structured formats, allowing seamless analysis alongside traditional tabular data. Learn More >
Explainable Text Classification
Gain clear insights into how text data is categorized, while enhancing transparency and trust in your analyses. Learn More >
Effective with Small Datasets
Achieve meaningful results even with limited data, making our solutions accessible to organizations of all sizes. Learn More >
Powerful Search Capabilities
Leverage our robust search API to retrieve and analyze specific information within your unstructured data. Learn More >
Comprehensive Data Lake
Store and analyze all your data — structured and unstructured — in one place, facilitating holistic insights. Learn More >

Quickstart

Explore Your Data

from sturdystats import Index, Job
import plotly.express as px

index = Index(id="index_99051ff1489844878fd792784d7baa90")
topic_df = index.topicSearch()
fig = px.sunburst(
    topic_df, 
    path=["topic_group_short_title", "short_title"],
    values="prevalence", 
    hover_data=["topic_id"]
)

Run SQL queries against your unstructured ata

topic_id = 12
df = pd.DataFrame(index.queryMeta(f"""
SELECT
    quarter,
    sum(sparse_list_extract({topic_id+1}, sum_topic_counts_inds, sum_topic_counts_vals)) as n_occurences
FROM doc 
GROUP BY quarter 
ORDER BY quarter""") )

Create a Index from scratch

from sturdystats import Index, Job
import pandas as pd

df = pd.read_parquet('data.parquet')
index = Index(API_key="XXX", name='tech_earnings_calls_2024')

res = index.upload(df.to_dict("records"))
job = index.train(params=dict(), fast=True, wait=True)

Train robust linear models.

pip install sturdy-stats-sdk[regression]

from sturdystats.model import LinearRegressor 
import arviz as az

model = LinearRegression(API_key=API_KEY)
model.sample(X, Y) 
az.plot_trace(model.inference_data)

Detect mislabelled datapoints.

from sturdystats.model import SturdyLogisticRegressor
import arviz as az

model = SturdyLogisticRegressor(API_key=API_KEY)
model.sample(X, Y) 
az.plot_trace(model.inference_data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sturdy_stats_sdk-1.0.50.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sturdy_stats_sdk-1.0.50-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file sturdy_stats_sdk-1.0.50.tar.gz.

File metadata

  • Download URL: sturdy_stats_sdk-1.0.50.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for sturdy_stats_sdk-1.0.50.tar.gz
Algorithm Hash digest
SHA256 43554c66a5f01bece1a5f57368a75271833b8031317b1c261a3045f6ba30bab1
MD5 4ddb6243098187cdb51a8014b80a424c
BLAKE2b-256 027a9bcfc0d8c5e132d07c941be0213d61824edf549b30b30ba97535b024c6d1

See more details on using hashes here.

File details

Details for the file sturdy_stats_sdk-1.0.50-py3-none-any.whl.

File metadata

File hashes

Hashes for sturdy_stats_sdk-1.0.50-py3-none-any.whl
Algorithm Hash digest
SHA256 d787ae2bf29ac6584582f81b01e8e146ff6eb24bd3585e4ec81537e53c5d2f63
MD5 5ffe348eddb5211ad3d2c07d2b63f2ff
BLAKE2b-256 c1488598a298b2a01e3bf2ce06a53ae567e349c9f0232329f56908f540acc012

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page