Skip to main content

Python client for NeoAnalytix data analysis platform

Project description

Intro

NeoAnalytix is a natural language data analysis and visualization Python package that provides an intuitive interface for data manipulation, statistical analysis, and visualization. Simply describe what you want to do in plain English, and NeoAnalytix will handle the technical implementation. It currently supports 4 datatype patterns: numeric,categorical,date/datetime/timestamp,geospatial(experimental).

Demo dataset link: https://www.kaggle.com/datasets/warcoder/earthquake-dataset

Installation

pip install neoanalytix

Quick Start

>>> from neoanalytix import Neo
>>> neo = Neo()

AUTHENTICATION

>>> neo.auth.signup()
>>> neo.auth.login()
>>> neo.auth.logout()

DATA UPLOAD

>>> _ = neo.upload_csv("YOUR_CSVFILE_PATH")

DATA SELECTOR

supports these query patterns in plain English :

List all csvs, Get the current active csv, Set data.csv as active
Delete one or more csvs, Read metadata for a specific csv,
Update metadata for a specific csv
>>> neo.data_selector("List all csvs")

================================================DATA ANALYSIS===================================================

OPERATIONS SUPPORTED - Cleaning, Inspection, Transformation, General Statistics,Window and Rolling operations, Groupby with Statistical aggregation, Arithmetic operations

API -> neo.analytix(query) Dataset -> https://www.kaggle.com/datasets/warcoder/earthquake-dataset

------------DATA INSPECTION-----------

"show first m rows","show last n rows" ,"show random sample" ,"get dataframe info","show summary statistics", "analyze null values" ,"correlation analysis"

>>> neo.analytix("show me random 10 rows")

------------DATA CLEANING-----------

for "numeric" datatype columns : fill_constant,fill_mean, fill_median,fill_mode drop_outliers_zscore( Remove outliers using Z-score), drop_outliers_iqr(Remove outliers using IQR method), enforce_range: Clip values to min/max range (requires "min_value" and/or "max_value" as numbers)

>>> neo.analytix("Enforce magnitude between 0-10")
>>> neo.analytix("fill magnitude with mean")

for categorical datatype columns : categorical_fill_constant, categorical_fill_mode, categorical_map_values: Map specific values to new values (requires "mapping" parameter as dict) categorical_filter_invalid: Keep only valid values (requires "valid_values" parameter as LIST of strings) categorical_compress_rare: Group rare categories into "other" (requires "min_count" as number, "other_label" as string)

>>> neo.analytix("fill magnitude type with mode")

for datetime datatype columns : datetime_fill_constant, datetime_fix_invalid, datetime_remove_out_of_range( Remove dates outside range (requires "min_dt"/"max_dt" as strings)) datetime_drop_duplicates: Remove duplicate dates

>>> neo.analytix("Remove earthquake dates before 1900 or after 2026")

for geospatial datatype columns : geo_fix_latlong_range, geo_swap_latlong_if_reversed, geo_drop_duplicates

>>> neo.analytix("Fix latitude range: invalid latitudes (outside -90 to 90) to NULL")

------------ DATA TRANSFORMATION -----------

for numeric datatype columns: standardize,minmax_scale,log_transform,
sqrt_transform,polynomial_features,interaction_terms

>>> neo.analytix("Apply z-score standardization to depth measurements")

for categorical datatype columns: one_hot_encode, label_encode, frequency_encode, "target_encode", "categorical_binarize",

>>> neo.analytix("Create one-hot encoding for the 'magType' column")

for datetime datatype columns: "datetime_cyclical_encode",

>>> neo.analytix("Apply cyclical encoding to day of week from earthquake time")

for geospatial datatype columns: "geo_create_buffer", "geo_simplify_geometry"

>>> neo.analytix("Create a 50km buffer zone around each earthquake epicenter")

------------GENERAL STATISTICS-----------

for numeric columns: count, sum, min, max, mean,median, mode, prod, unique, nunique, value_counts, std, var, sem, mad,iqr, range, skew, kurtosis, entropy,quantile, percentile, corr, corr_spearman, corr_kendall, cov, autocorr

>>> neo.analytix("Calculate the mean, median, and standard deviation of the 'magnitude' column")

for categorical columns: count, unique, nunique, value_counts, mode, proportions,crosstab,contingency_table

>>> neo.analytix("Show the frequency distribution of the 'magType' column")

for datetime columns:min, max, count, nunique, diff,delta_stats, event_rate, time_unit_counts, weekday_weekend_counts, holiday_counts

>>> neo.analytix("Calculate event rate per month for earthquakes")

for geospatial columns:"geospatial_count", "geospatial_length_stats", "geospatial_distance_stats", "geospatial_hotspot_statistics", ,

>>> neo.analytix("Calculate distance statistics to equator (ref_lat: 0, ref_lon: 0)")

------------WINDOW AND ROLLING OPERATIONS-----------

for numeric columns: cumsum, cumprod, cummax, cummin, cummean, cumcount, cumstd, cumvar, rolling_sum, rolling_mean, rolling_min, rolling_max, rolling_std, rolling_var, rolling_skew, rolling_kurtosis, rolling_corr, rolling_cov, rolling_autocorr, expanding_sum, expanding_mean, expanding_min, expanding_max, expanding_std, expanding_var, expanding_skew, expanding_kurtosis, expanding_corr, expanding_cov, expanding_autocorr,ewm

>>> neo.analytix("Calculate the rolling mean of the 'magnitude' column with a window of 5")
_ = neo.analytix("Calculate cumulative standard deviation of magnitude ordered by earthquake time")
_ = neo.analytix("Calculate rolling 75th percentile of magnitude error (magError) with 10-event window")
_ = neo.analytix("Compute EWM of magnitude error (magError) with alpha=0.7 ordered by earthquake ID",)

for categorical columns: cumcounts, cummode, cumcount,rolling_count, rolling_unique, rolling_mode, rolling_entropy,expanding_count, expanding_unique, expanding_mode,categorical_diff

_ = neo.analytix("Generate rolling count of earthquakes in last 30 days",)

for datetime columns: cumulative_count,diff_summary,rolling_count, expanding,lag_lead

_ = neo.analytix("Create lag and lead columns for earthquake times",)

for geospatial columns: point_lag_distance, cumulative_distance, rolling_distance, expanding_distance,speed, diff,rolling_density, rolling_centroid_shift

_ = neo.analytix("Compute cumulative distance in rolling 20-event window")

-------------- ARITHMETIC OPERATIONS -------------

for numeric columns:add, subtract, multiply, divide, mod, power,abs, neg, round, ceil, floor, trunc,clip_lower, clip_upper, clip,exp, log, log10, sqrt,sin, cos, tan, asin, acos, atan, atan2,weighted_average, percentage_change, normalize_range

_ = neo.analytix("Subtract depth error from depth to get corrected depth estimate",)
_ = neo.analytix("Natural log of number of stations (nst) for station count normalization",)

------------GROUPBY WITH STATISTICAL AGGREGATION-----------

for numeric columns: groupby_count,groupby_sum,groupby_min,groupby_max,groupby_mean,groupby_median,groupby_std,groupby_var,groupby_mode,groupby_nunique,groupby_quantile,groupby_basic_summary

_ = neo.analytix("What's the average magnitude for each earthquake type?")
_ = neo.analytix("Average depth error when grouping by both earthquake year AND earthquake type")

for categorical columns: groupby_count,groupby_nunique,groupby_value_counts,groupby_mode, groupby_proportions

_ = neo.analytix("What are the most common magnitude values (mode) by earthquake type?")

for datetime columns: groupby_min,groupby_max,groupby_count,groupby_nunique,groupby_time_unit_counts,groupby_weekday_weekend_counts,groupby_multi_aggregation

for geospatial columns: groupby_geospatial_count,groupby_geospatial_area_stats,groupby_geospatial_length_stats,groupby_geospatial_distance_stats,groupby_geospatial_geometry_type_counts,groupby_geospatial_density_analysis

_ = neo.analytix("What's the average distance from the equator for each magnitude type? Use reference point (0,0)",)

--------------GROUPBY WITH WINDOW AGGREGATION-------------

for numeric columns:groupby_window_cumsum,groupby_window_cummax,groupby_window_cummin,groupby_window_cummean, groupby_window_cumstd,groupby_window_cumvar,groupby_window_rolling_sum,groupby_window_rolling_avg,groupby_window_rolling_min,groupby_window_rolling_max,groupby_window_rolling_diff,groupby_window_rolling_pct_change,groupby_window_rolling_std, groupby_window_rolling_var

_ = neo.analytix("Show rolling 10-earthquake sum of horizontal error per region, magnitude type, and earthquake status.",)

for categorical columns: "groupby_window_cumcount","groupby_window_cummode","groupby_window_rolling_count", "groupby_window_rolling_unique","groupby_window_rolling_mode","groupby_window_rolling_entropy","groupby_window_expanding_count", "groupby_window_expanding_unique", "groupby_window_expanding_mode",

_ = neo.analytix("What is the expanding count of earthquakes per region and magType over time?",)

for geospatial columns: groupby_window_lag_distance, groupby_window_cumulative_distance,groupby_window_rolling_distance, groupby_window_speed, groupby_window_rolling_variance, groupby_window_multi_aggregation

_ = neo.analytix("Calculate cumulative distance between earthquake epicenters based on latitude/longitude for each region")

-----------------FILTERING-----------------

for numeric columns: gt, gte, lt, lte, eq, ne, between, outside, gt_col, lt_col, delta_gt

_ = neo.analytix("Filter for earthquakes with magnitude greater than 5.0")

for categorical columns:eq, ne, in, not_in,contains, starts_with, ends_with, ilike, regex, not_regex, is_null, not_null, length_gt, length_lt, length_eq

_ = neo.analytix("Show earthquakes where earthquake type is in ['earthquake', 'explosion'] ")

for datetime columns: before, after, on_or_before, on_or_after, eq, ne, between, outside, last_days, last_hours, last_minutes, last_months, last_years, year_eq, month_eq, day_eq, hour_eq, minute_eq, second_eq,month_between, hour_between, day_between, is_weekday, is_weekend, is_monday, is_friday, dow_eq, is_business_hours, is_off_hours

_ = neo.analytix("Filter earthquakes between '2026-01-01' and '2026-01-31'")

for geospatial columns:within, contains, intersects, touches, crosses, overlaps, disjoint, equals, distance_within, distance_beyond, distance_within_km, distance_beyond_km, distance_in_km, bbox_intersects, within_city, within_country,near_landmark, near_road, in_zone

_ = neo.analytix("Find all earthquakes within 50 km of the equator (0,0)")

========================================== DATA VIZUALIZATION ==================================================

Visualisation Supported - BAR, PIE, SUNBURST, RADAR, TREEMAP, BOX, VIOLIN, HEATMAP, DIST, HISTOGRAM, LINE, SCATTER, CANDLESTICK, OHLC

CHOROPLETH(coming soon...)

API -> neo.viz(query) Dataset -> https://www.kaggle.com/datasets/tunguz/data-on-covid19-coronavirus

----------------- BAR -----------------

_ = neo.viz("Create bar plot: average new_cases by continent")

----------------- PIE -----------------

_ = neo.viz("Show the distribution of records by year as a pie chart")

----------------- SUNBURST -----------------

_ = neo.viz("Generate hierarchical sunburst: location → tests_units type")

----------------- TREEMAP -----------------

_ = neo.viz("Create treemap: sum of new_cases by continent")

----------------- RADAR -----------------

_ = neo.viz("Create radar chart: total_tests vs population averages")

----------------- BOX -----------------

_ = neo.viz("Show box plot of new_cases_per_million.")

----------------- VIOLIN -----------------

_ = neo.viz("Show a violin plot of the distribution of daily_new_cases")

----------------- DIST -----------------

_ = neo.viz("Dist Plot :whats the distribution of reproduction_rate for each continent.",
)

----------------- HISTOGRAM -----------------

_ = neo.viz("Plot a histogram of new_cases_per_million")

----------------- SCATTER -----------------

_ = neo.viz("Scatter plot of new_cases vs new_deaths")

----------------- LINE -----------------

_ = neo.viz("Show total_cases over date as a line chart")

----------------- HEATMAP -----------------

_ = neo.viz("Create a heatmap showing new_cases trends over time by date")

----------------- CANDLESTICK -----------------

_ = neo.viz("Create a candlestick chart showing open, high, low, close prices over time")

----------------- OHLC -----------------

_ = neo.viz("Plot OHLC with both SMA_20 and SMA_50 indicators calculated from close column")

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

neoanalytix-0.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

neoanalytix-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file neoanalytix-0.1.0.tar.gz.

File metadata

  • Download URL: neoanalytix-0.1.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for neoanalytix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 732f88ccdf54757b064d1932fecac98032114d1f5d03096ba64581800c8d9f72
MD5 fdd5998698f2e2fa5f9f7d051d407d4d
BLAKE2b-256 69e8d6eef8033c78f173a891f21444a249e2fc5bba138b7afe9fdd340e53f3e4

See more details on using hashes here.

File details

Details for the file neoanalytix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neoanalytix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for neoanalytix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b58e2bd70beb16b9e66b516a67257cdd11bbf0da588f7e815035cecc7f836a2
MD5 241b1b91fda61f6ff459c7ae878a4783
BLAKE2b-256 c752a62292f0c89f4ac07051e858713daeda6308a6101a72e695d69465adb96a

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