GithubHelp home page GithubHelp logo

abought / pubmed-es-expts Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 95 KB

Demo ingestion and visualization for Pubmed open access content via ElasticSearch and d3js

Python 89.12% HTML 1.20% JavaScript 9.67%

pubmed-es-expts's Introduction

Pubmed Elasticsearch experiments

A library to demonstrate:

  1. Loading XML article information (from the pubmed FTP service) into Elasticsearch
  2. Useful queries
  3. Sample visualizations with d3.js

Installation / setup

  • Elasticsearch 5.2.0
  • pip install -r requirement.txt

Usage

Parse a directory of XMLs and index them via elasticsearch (dropping any previous documents):

python -m ingest.main --drop --dir data/

Workflow / query notes

See how many documents are present: curl -XGET localhost:9200/pubmed/article/_count

Local testing notes

For the purpose of simple visualizations, you may wish to expose elasticsearch to a browser request directly.

Note that the visualizations are presented for local demonstration purposes, only. It is generally frowned upon to expose ES directly in production use.

To your config file (eg /usr/local/etc/elasticsearch/elasticsearch.yml), you would add:

## NOTE: For local testing of ES-based visualizations, ONLY!
http.cors.enabled: true
http.cors.allow-origin: "*"

TODO

  • Simple d3 visualizations, eg # articles per year, 10 biggest journals, etc

Goal:

  1. When page loads, get a histogram of articles published in a given year (or power the histogram by a search box first?)
  2. When a specific year is clicked on (interacting with chart), fire an aggregation that gets the 10 most popular keywords for that year, and displays a summary chart + legend for fraction of articles containing- horiontal bar chart
  3. When the summary chart entry for a specific keyword is clicked, fire a query showing highest rated articles with that word

Other options:

  • Pie chart? (number of authors, eg 1, 2, 3, 4-6, 6-10, 10+) Then drill down in some way, eg most common terms to explore large collaborations?

pubmed-es-expts's People

Contributors

abought avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.