Skip to main content

News Signals

Example Colab Notebooks

These notebooks let you try out news-signals without installing anything!

The Colab notebooks above are also available as jupyter notebooks in research/news-signals-example-notebooks

Quickstart

Install news-signals in a new environment

conda create -n test-signals-pypi python=3.8
conda activate test-signals-pypi

pip install news-signals

Look at a sample dataset

Do pip install jupyter in your environment,

then run the code below in a jupyter notebook or in in the (i)python repl.

from news_signals.signals_dataset import SignalsDataset

# nasdaq100 sample dataset
dataset_url = 'https://drive.google.com/uc?id=150mfU2YA4ScfTlJvO6Duzto4aT_Q7K3D'

dataset = SignalsDataset.load(dataset_url)

Now try:

import matplotlib.pyplot as plt


fig = dataset.plot()
plt.show()

Installation from source

Install news-signals in a new environment

Run conda create -n news-signals python=3.8 if you're using Anaconda, alternatively python3.8 -m venv news-signals or similar. Note python>=3.8 is required.

source activate news-signals
git clone https://github.com/AYLIEN/news-signals-datasets.git
cd news-signals-datasets
pip install -r requirements.txt
pip install -e . # install in editable mode
make test   # run tests

Generating a new Dataset

python bin/generate_dataset.py \
    --start 2022/01/01 \
    --end 2022/02/01 \
    --input-csv resources/test/nasdaq100.small.csv \
    --id-field "Wikidata ID" \
    --name-field "Wikidata Label" \
    --output-dataset-dir sample_dataset_output

Transforming a Dataset

This example adds anomaly scores, summary headlines and Wikimedia pageview counts to each signal in an existing dataset (the transformation is configured via a config file).

python bin/transform_dataset.py \
    --input-dataset-dir sample_dataset_output \
    --config resources/default_transform_config.json

Metadata

Release files for news-signals 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for news-signals 0.1.12
File Size Uploaded Provenance Actions
news-signals-0.1.12.tar.gz 926.3 kB Without provenance Details for news-signals-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for news-signals 0.1.12
File Interpreter ABI Platform Actions
news_signals-0.1.12-py3-none-any.whl Python 3 none any Details for news_signals-0.1.12-py3-none-any.whl

Total release size: 979.1 kB

Release files / news-signals-0.1.12.tar.gz

Download URL news-signals-0.1.12.tar.gz
Size 926.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8fd18281087e747589c630c9b7ac353861b622c7642ca0d7a79ceee0422232b7
BLAKE2b-256 checksum
How to use checksums
d834223886ccb7bab6765ab0d86fbe1297e6e08ead216521fdc7a226c5c2d99c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / news_signals-0.1.12-py3-none-any.whl

Download URL news_signals-0.1.12-py3-none-any.whl
Size 52.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47e2a394e6f31891a97ff01afb2f52465b14f65323e21bd5bd2c94b463bbf64c
BLAKE2b-256 checksum
How to use checksums
bb8e602f8635be69068b398b5575b5ddfd1502c2ade6ea56332c6583a336f16e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for news-signals 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page