SlideShare a Scribd company logo
PyData New York 2017
Noemi Derzsy
Data Science Keys to Open Up
OpenNASA Datasets
@NoemiDerzsy
PyData New York 2017
Open NASA Platform
• Data at NASA: 32 089
• Data at other government agencies: ~185 000
• NASA code repositories: 356
• NASA APIs: 51
Continuously growing…
https://open.nasa.gov/explore/datanauts/
@NoemiDerzsy
PyData New York 2017 @NoemiDerzsy
PyData New York 2017
§ Datasets: 32089
§ Some of the data sets:
- Mars Rover sound data
- Hubble Telescope image collection
- NASA patents
- Picture of the Day of Earth
- etc.
http://data.nasa.gov/data.json
Open NASA Metadata
Metadata information:
• id
• type
• accessLevel
• accrualPeriodicity
• bureauCode
• contactPoint
• title
• description
• distribution
• identifier
• Issued
• keyword
• language
• modified
• programCode
• theme
• license
• location (HTML link)
• Etc.
Format:JSON
@NoemiDerzsy
PyData New York 2017
Which of these features is “best” to tie together the data?
How do we label groupings in a meaningful manner?
How many groups/how to arrange/visualize them?
Are Descriptions, Keywords representative of the content?
@NoemiDerzsy
PyData New York 2017
Natural Language Processing (NLP)
Python Libraries
• NLTK
• TextBlob
• spaCy
• gensim
• Stanford CoreNLP
Jupyter Notebooks:
https://github.com/nderzsy/NASADatanauts
@NoemiDerzsy
PyData New York 2017
Word Clouds in Description
Word clouds of the over
32,000 open NASA
datasets and their
descriptions
@NoemiDerzsy
PyData New York 2017
Word clouds of the over
32,000 open NASA
datasets and their titles
Word Clouds in Title
@NoemiDerzsy
PyData New York 2017
Word Clouds in Keywords
Word clouds of the over
32,000 open NASA datasets
and their keywords
@NoemiDerzsy
PyData New York 2017
How to Obtain Customized Word Clouds?
o get stencil (shape of your choice)
o get text
o https://github.com/amueller/word_cloud
@NoemiDerzsy
PyData New York 2017
Text Preprocessing, Cleaning
• treat “Data” and “data” as identical words: covert all words to lowercase lower()
• remove special characters, codes, numbers: regular expressions
• check for misspelling
• stop words: this, and, for, where, etc.
• “system” vs. “systems”: lemmatize
• “compute”, “computer”, “computation” -> “comput”: stem
• tokenize: break down text to smallest parts (words)
• POS tagging
• dimensionality reduction (PCA)
@NoemiDerzsy
PyData New York 2017
Stemming
• from nltk.stem.api import StemmerI
• from nltk.stem.regexp import RegexpStemmer
• from nltk.stem.lancaster import LancasterStemmer
• from nltk.stem.isri import ISRIStemmer
• from nltk.stem.porter import PorterStemmer
• from nltk.stem.snowball import SnowballStemmer
• from nltk.stem.wordnet import WordNetLemmatizer
• from nltk.stem.rslp import RSLPStemmer
• Lemmatization: similar to stemming, but with stems being valid words
• nltk.WordNetLemmatizer()
Lemmatization
@NoemiDerzsy
PyData New York 2017
Term Frequency
Keywords Description Title
• the number of times a word occurs in text corpus
@NoemiDerzsy
PyData New York 2017
TF-IDF
• term frequency – inverse document frequency
• measures term frequency / document frequency
Top 25 Highest TF-IDF
Words in
Description
Top 25 Highest MeanTF-IDF
Words in
Description
@NoemiDerzsy
PyData New York 2017
Description TF-IDF and Keywords
Top 10 keywords:
1. EARTH SCIENCE: 14387
2. OCEANS: 10034
3. PROJECT: 7464
4. OCEAN OPTICS: 7325
5. ATMOSPHERE: 7324
6. OCEAN COLOR: 7271
7. COMPLETED: 6453
8. ATMOSPHERIC WATER VAPOR: 3143
9. LAND SURFACE: 2721
10.BIOSPHERE: 2450
Top 25 Keywords
@NoemiDerzsy
PyData New York 2017
Word Co-Occurrence
§ Co-occurrence matrix of top most frequently co-occurring terms
Top 10
Word Co-Occurrence
Matrix
@NoemiDerzsy
PyData New York 2017
Word Co-Occurrence
Top 20
Word Co-Occurrence
Matrix
@NoemiDerzsy
PyData New York 2017
Top 50
Word Co-Occurrence
Matrix
@NoemiDerzsy
PyData New York 2017
seaborn.clustermap
Top 20
Word Co-Occurrence
Matrix
Discovering Structure in Heatmap Data
standardization
@NoemiDerzsy
PyData New York 2017
Are features pulled from text (such as title, description fields)
and/or human supplied-keywords
descriptive of the content?
Topic Modeling…
@NoemiDerzsy
PyData New York 2017
What is Topic Modeling?
An efficient way to make sense of large volume of texts.
Identify topics within text corpus.
Categorize documents into topics.
Associate words with topics.
Who uses it?
Search engines, for marketing purpose, etc.
@NoemiDerzsy
PyData New York 2017
Latent Dirichlet Allocation (LDA)
q several techniques, but LDA is the most common
q Bayesian inference model that associates each document with a probability distribution over topics
q topics are probability distributions over words (probability of the word being generated from that topic for that document)
q clusters words into topics
q clusters documents into mixture of topics
q scales well with growing corpus
q before running LDA algorithm,we have to specify the number of topics: how to choose beforehand the optimal number of topics?
@NoemiDerzsy
PyData New York 2017
Topic Model Evaluation: Topic Coherence
Q: How to select the top topics?
A: Calculate the UMass topic coherence for each topic. Algorithm from Mimno, Wallach, Talley, Leenders, McCallum: Optimizing
Semantic Coherence in Topic Models, CEMNLP 2011.
Coherence = ! score(𝑤),	𝑤,)
).,
pairwise scores on the words used to describe the topic.
s𝑐𝑜𝑟𝑒34566 78,79
=	log
𝐷 𝑤), 𝑤, + 1
𝐷(𝑤))
D(wi)D(wi) as the count of documents containing the word wiwi, D(wi,wj)D(wi,wj) the count of documents containing both
words wiwi and wjwj, and DD the total number or documents in the corpus.
@NoemiDerzsy
PyData New York 2017
openNASA Topics of Highest Coherence
@NoemiDerzsy
PyData New York 2017
Keywords for Topics
• selected keywords with their most frequently occurring terms
@NoemiDerzsy
PyData New York 2017
Other Clustering Method: K-Means
• using TF-IDF, the document vectors are put through a K-Means clustering algorithm which
computes the Euclidean distances amongst these documents and clusters nearby documents
together
• the algorithm generates cluster tags, known as cluster centers which represent the documents
within these clusters
• K-means distance:
• Euclidean
• Cosine
• Fuzzy
• Accuracy comparison:
• silhouette analysis can be used to study the separation distance between the resulting
clusters; can be used to determine the optimal number of clusters
@NoemiDerzsy
PyData New York 2017
K-Means Clustering
§ Top 10 terms per cluster:
Cluster 0
seawifs
local
collect
km
mission
data
orbview
seastar
broadcast
noon
§ Similar clusters with top words as found using LDA
Cluster 1
data
project
system
use
soil
high
contain
phase
set
gt
Cluster 2
modis
terra
aqua
earth
global
pass
south
north
equator
eos
Cluster 3
band
oct
color
adeos
czcs
nominal
sense
spacecraft
agency
thermal
Cluster 4
product
data
level
version
file
aquarius
set
daily
ml
standard
@NoemiDerzsy
PyData New York 2017
K-Means Clustering
§ cluster size distribution for k = 5
Cluster 2: 19031
Cluster 0: 5805
Cluster 1: 4481
Cluster 3: 1968
Cluster 4: 804
§ silhouette score improves by increasing the number of clusters, best performance for K > 100
§ analysis of cluster size distributions with varying K can reveal additional information
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0 50 100 150 200 250 300 350
SilhouetteScore
K Number of Clusters
Silhouette Score for K-Means Clustering openNASA Datasets
@NoemiDerzsy
PyData New York 2017
Text Classification
§ Naïve Bayes probabilistic model
• Multinomial model
• data follows multinomial distribution
• each feature value is a count (word co-occurrence, weight, tf-idf, etc.)
• Take into account word importance
• Bernoulli model
• data follows a multivariate Bernoulli distribution
• bag of words (count word occurrence)
• each feature is a binary feature (word in text? True/False)
• ignores word significance
§ KNN (K-nearest neighbor) classifier
§ Decision trees
§ Support Vector Machine (SVM)
@NoemiDerzsy
PyData New York 2017
Network Science: Bipartite Network
§ Term in Description – Keyword:
- connect 2 words in description if they appear under same Keyword
- connect 2 keywords if they share common words in Description
§ All bipartite network projection possibilities:
- description – keyword
- description – title
- title – keyword
§ Type of interaction:
- link direction: directed/undirected
- link weight: how strong the connection (co-occurrence matrix)
@NoemiDerzsy
PyData New York 2017
Structural Network Properties
§ degree distribution: reveals connectivity pattern
§ do we have hubs (nodes with significantly higher number of connections)?
§ average degree (how interconnected the elements are)
§ clusters, community detection (subgroups with elements more densely connected among each
other)
@NoemiDerzsy
PyData New York 2017
Terms that occur > 1% of the documents (in more than 320 data set descriptions)
• Network size: # of nodes (words) = 1015
• Average degree: 890.319 (densely connected terms)
• Components: 1 connected component
• Modularity analysis: 2 clusters (pink, violet)
@NoemiDerzsy
PyData New York 2017
Top 100
most frequent words in
Description
• size/color hue ~ occurrence frequency
• outer circle: top 10 most frequent words
Nodes with the highest
connectivity are not all the
same as most frequently
co-occurring
@NoemiDerzsy
PyData New York 2017
Network structures:
powerful tool for
capturing additional information about
interconnected systems!
@NoemiDerzsy
PyData New York 2017
What are the important connections between
NASA datasets and other important datasets outside of NASA
in the US government?
@NoemiDerzsy
PyData New York 2017
Other Open Government Dataset Collections
http://data.nasa.gov/data.json
http://www.epa.gov/data.json
http://data.gov
http://www.nsf.gov/data.json
http://usda.gov/data.json
http://data.noaa.gov/data.json
http://www.commerce.gov/data.json
http://nist.gov/data.json
http://www.defense.gov/data.json
http://www2.ed.gov/data.json
http://www.dol.gov/data.json
http://www.state.gov/data.json
http://www.dot.gov/data.json
http://www.energy.gov/data.json
http://nrel.gov/data.json
http://healthdata.gov/data.json
http://www.hud.gov/data.json
http://www.doi.gov/data.json
http://www.justice.gov/data.json
http://www.archives.gov/data.json
http://www.nrc.gov/data.json
http://www.nsf.gov/data.json
http://www.opm.gov/data.json
https://www.sba.gov/sites/default/files/data.json
http://www.ssa.gov/data.json
http://www.consumerfinance.gov/data.json
http://www.fhfa.gov/data.json
http://www.imls.gov/data.json
http://data.mcc.gov/raw/index.json
http://www.nitrd.gov/data.json
http://www.ntsb.gov/data.json
http://www.sec.gov/data.json
https://open.whitehouse.gov/data.json
http://treasury.gov/data.json
http://www.usaid.gov/data.json
http://www.gsa.gov/data.json
https://www.economist.com/news/international/21678833-open-data-revolution-has-not-lived-up-expectations-it-only-getting
Open Government Data: Out of the Box
The Economist
@NoemiDerzsy
PyData New York 2017
pyNASA and pyOpenGov Libraries
§ Python library that loads all the open NASA or other government metadata collection at once
pyNASA
https://github.com/bmtgoncalves/pyNASA
pyOpenGov
https://github.com/nderzsy/pyOpenGov
How to install:
>> pip install pyNASA
>> pip install pyOpenGov
@NoemiDerzsy
PyData New York 2017
Takeaways
§ NLP enables understanding of structured and unstructured text
§ Topic modeling useful tool for understanding topics in large text corpus, documents
§ Topic models efficient for evaluating the accuracy of human-supplied descriptions, keywords
§ Tedious preprocessing a must before modeling (stop words, lemmatization, special characters, etc.)
§ Network (graph) structure can reveal more information, term/topic associations
§ Network projections allow to answer additional questions
§ Open government data enables citizens in understanding topics, areas of focus
@NoemiDerzsy
Contact
GitHub: https://github.com/nderzsy/NASADatanauts
Twitter: @NoemiDerzsy
Website: http://www.noemiderzsy.com

More Related Content

PDF
Real-time Data De-duplication using Locality-sensitive Hashing powered by Sto...
PDF
Managing data in computational edge clouds
PDF
Privacy Preserving Multi-keyword Top-K Search based on Cosine Similarity Clus...
PPTX
Mining of massive datasets using locality sensitive hashing (LSH)
PPTX
Materials Data Facility: Streamlined and automated data sharing, discovery, ...
PPT
5 Pitfalls to Avoid with MongoDB
PDF
GaianDB
PDF
FDSE2015
Real-time Data De-duplication using Locality-sensitive Hashing powered by Sto...
Managing data in computational edge clouds
Privacy Preserving Multi-keyword Top-K Search based on Cosine Similarity Clus...
Mining of massive datasets using locality sensitive hashing (LSH)
Materials Data Facility: Streamlined and automated data sharing, discovery, ...
5 Pitfalls to Avoid with MongoDB
GaianDB
FDSE2015

What's hot (20)

PDF
A Survey on Efficient Privacy-Preserving Ranked Keyword Search Method
PPTX
About elasticsearch
PPTX
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
PPTX
Predicting the relevance of search results for e-commerce systems
PDF
An Empirical Evaluation of RDF Graph Partitioning Techniques
PPTX
MongoDB San Francisco 2013: MongoDB for Collaborative Science presented by D...
POTX
Webinar: MongoDB + Hadoop
PDF
Interpreting Relational Schema to Graphs
PPTX
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
PDF
Graph Libraries - Overview on Networkx
PDF
Approximate "Now" is Better Than Accurate "Later"
PDF
Knowledge Graph for Cybersecurity: An Introduction By Kabul Kurniawan
PDF
Virtual Knowledge Graphs for Federated Log Analysis
PPTX
Using MongoDB with Hadoop & Spark
PDF
DataXDay - Exploring graphs: looking for communities & leaders
PPTX
It Takes Two to Tango: an Exploration of Domain Pairs for Cross-Domain Collab...
PDF
Parikshit Ram – Senior Machine Learning Scientist, Skytree at MLconf ATL
PDF
Hpdw 2015-v10-paper
PDF
Query Distributed RDF Graphs: The Effects of Partitioning Paper
PPTX
Science Services and Science Platforms: Using the Cloud to Accelerate and Dem...
A Survey on Efficient Privacy-Preserving Ranked Keyword Search Method
About elasticsearch
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
Predicting the relevance of search results for e-commerce systems
An Empirical Evaluation of RDF Graph Partitioning Techniques
MongoDB San Francisco 2013: MongoDB for Collaborative Science presented by D...
Webinar: MongoDB + Hadoop
Interpreting Relational Schema to Graphs
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
Graph Libraries - Overview on Networkx
Approximate "Now" is Better Than Accurate "Later"
Knowledge Graph for Cybersecurity: An Introduction By Kabul Kurniawan
Virtual Knowledge Graphs for Federated Log Analysis
Using MongoDB with Hadoop & Spark
DataXDay - Exploring graphs: looking for communities & leaders
It Takes Two to Tango: an Exploration of Domain Pairs for Cross-Domain Collab...
Parikshit Ram – Senior Machine Learning Scientist, Skytree at MLconf ATL
Hpdw 2015-v10-paper
Query Distributed RDF Graphs: The Effects of Partitioning Paper
Science Services and Science Platforms: Using the Cloud to Accelerate and Dem...
Ad

Similar to Data Science Keys to Open Up OpenNASA Datasets (20)

PDF
PyGotham NY 2017: Natural Language Processing from Scratch
PPTX
Sharing a Startup’s Big Data Lessons
PDF
Probabilistic Topic models
PPTX
03 interlinking-dass
PDF
Slides: Concurrent Inference of Topic Models and Distributed Vector Represent...
PDF
Duplicate Detection on Hoaxy Dataset
PPTX
NLP & DBpedia
PDF
Relationships Matter: Using Connected Data for Better Machine Learning
PPTX
Case study of Rujhaan.com (A social news app )
PDF
How Graph Databases used in Police Department?
PPTX
Semantics-enhanced Cyberinfrastructure for ICMSE : Interoperability, Analyti...
PDF
Graph databases and the #panamapapers
PPT
6.1-Cassandra.ppt
PPT
6.1-Cassandra.ppt
PPT
Cassandra
PDF
What is a Data Commons and Why Should You Care?
PDF
ArXiv Literature Exploration using Social Network Analysis
PPTX
Graph Analytics: Graph Algorithms Inside Neo4j
PDF
Large-Scale Text Processing Pipeline with Spark ML and GraphFrames: Spark Sum...
PPTX
05 k-means clustering
PyGotham NY 2017: Natural Language Processing from Scratch
Sharing a Startup’s Big Data Lessons
Probabilistic Topic models
03 interlinking-dass
Slides: Concurrent Inference of Topic Models and Distributed Vector Represent...
Duplicate Detection on Hoaxy Dataset
NLP & DBpedia
Relationships Matter: Using Connected Data for Better Machine Learning
Case study of Rujhaan.com (A social news app )
How Graph Databases used in Police Department?
Semantics-enhanced Cyberinfrastructure for ICMSE : Interoperability, Analyti...
Graph databases and the #panamapapers
6.1-Cassandra.ppt
6.1-Cassandra.ppt
Cassandra
What is a Data Commons and Why Should You Care?
ArXiv Literature Exploration using Social Network Analysis
Graph Analytics: Graph Algorithms Inside Neo4j
Large-Scale Text Processing Pipeline with Spark ML and GraphFrames: Spark Sum...
05 k-means clustering
Ad

More from PyData (20)

PDF
Michal Mucha: Build and Deploy an End-to-end Streaming NLP Insight System | P...
PDF
Unit testing data with marbles - Jane Stewart Adams, Leif Walsh
PDF
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
PDF
Using Embeddings to Understand the Variance and Evolution of Data Science... ...
PDF
Deploying Data Science for Distribution of The New York Times - Anne Bauer
PPTX
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
PPTX
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...
PDF
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
PDF
Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...
PDF
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
PDF
Words in Space - Rebecca Bilbro
PDF
End-to-End Machine learning pipelines for Python driven organizations - Nick ...
PPTX
Pydata beautiful soup - Monica Puerto
PDF
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
PPTX
Extending Pandas with Custom Types - Will Ayd
PDF
Measuring Model Fairness - Stephen Hoover
PDF
What's the Science in Data Science? - Skipper Seabold
PDF
Applying Statistical Modeling and Machine Learning to Perform Time-Series For...
PDF
Solving very simple substitution ciphers algorithmically - Stephen Enright-Ward
PDF
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
Michal Mucha: Build and Deploy an End-to-end Streaming NLP Insight System | P...
Unit testing data with marbles - Jane Stewart Adams, Leif Walsh
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
Using Embeddings to Understand the Variance and Evolution of Data Science... ...
Deploying Data Science for Distribution of The New York Times - Anne Bauer
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Words in Space - Rebecca Bilbro
End-to-End Machine learning pipelines for Python driven organizations - Nick ...
Pydata beautiful soup - Monica Puerto
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
Extending Pandas with Custom Types - Will Ayd
Measuring Model Fairness - Stephen Hoover
What's the Science in Data Science? - Skipper Seabold
Applying Statistical Modeling and Machine Learning to Perform Time-Series For...
Solving very simple substitution ciphers algorithmically - Stephen Enright-Ward
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
August Patch Tuesday
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Modernising the Digital Integration Hub
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Hindi spoken digit analysis for native and non-native speakers
TLE Review Electricity (Electricity).pptx
Tartificialntelligence_presentation.pptx
Chapter 5: Probability Theory and Statistics
A novel scalable deep ensemble learning framework for big data classification...
August Patch Tuesday
DP Operators-handbook-extract for the Mautical Institute
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
NewMind AI Weekly Chronicles - August'25-Week II
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
OMC Textile Division Presentation 2021.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Enhancing emotion recognition model for a student engagement use case through...
Module 1.ppt Iot fundamentals and Architecture
Modernising the Digital Integration Hub

Data Science Keys to Open Up OpenNASA Datasets

  • 1. PyData New York 2017 Noemi Derzsy Data Science Keys to Open Up OpenNASA Datasets @NoemiDerzsy
  • 2. PyData New York 2017 Open NASA Platform • Data at NASA: 32 089 • Data at other government agencies: ~185 000 • NASA code repositories: 356 • NASA APIs: 51 Continuously growing… https://open.nasa.gov/explore/datanauts/ @NoemiDerzsy
  • 3. PyData New York 2017 @NoemiDerzsy
  • 4. PyData New York 2017 § Datasets: 32089 § Some of the data sets: - Mars Rover sound data - Hubble Telescope image collection - NASA patents - Picture of the Day of Earth - etc. http://data.nasa.gov/data.json Open NASA Metadata Metadata information: • id • type • accessLevel • accrualPeriodicity • bureauCode • contactPoint • title • description • distribution • identifier • Issued • keyword • language • modified • programCode • theme • license • location (HTML link) • Etc. Format:JSON @NoemiDerzsy
  • 5. PyData New York 2017 Which of these features is “best” to tie together the data? How do we label groupings in a meaningful manner? How many groups/how to arrange/visualize them? Are Descriptions, Keywords representative of the content? @NoemiDerzsy
  • 6. PyData New York 2017 Natural Language Processing (NLP) Python Libraries • NLTK • TextBlob • spaCy • gensim • Stanford CoreNLP Jupyter Notebooks: https://github.com/nderzsy/NASADatanauts @NoemiDerzsy
  • 7. PyData New York 2017 Word Clouds in Description Word clouds of the over 32,000 open NASA datasets and their descriptions @NoemiDerzsy
  • 8. PyData New York 2017 Word clouds of the over 32,000 open NASA datasets and their titles Word Clouds in Title @NoemiDerzsy
  • 9. PyData New York 2017 Word Clouds in Keywords Word clouds of the over 32,000 open NASA datasets and their keywords @NoemiDerzsy
  • 10. PyData New York 2017 How to Obtain Customized Word Clouds? o get stencil (shape of your choice) o get text o https://github.com/amueller/word_cloud @NoemiDerzsy
  • 11. PyData New York 2017 Text Preprocessing, Cleaning • treat “Data” and “data” as identical words: covert all words to lowercase lower() • remove special characters, codes, numbers: regular expressions • check for misspelling • stop words: this, and, for, where, etc. • “system” vs. “systems”: lemmatize • “compute”, “computer”, “computation” -> “comput”: stem • tokenize: break down text to smallest parts (words) • POS tagging • dimensionality reduction (PCA) @NoemiDerzsy
  • 12. PyData New York 2017 Stemming • from nltk.stem.api import StemmerI • from nltk.stem.regexp import RegexpStemmer • from nltk.stem.lancaster import LancasterStemmer • from nltk.stem.isri import ISRIStemmer • from nltk.stem.porter import PorterStemmer • from nltk.stem.snowball import SnowballStemmer • from nltk.stem.wordnet import WordNetLemmatizer • from nltk.stem.rslp import RSLPStemmer • Lemmatization: similar to stemming, but with stems being valid words • nltk.WordNetLemmatizer() Lemmatization @NoemiDerzsy
  • 13. PyData New York 2017 Term Frequency Keywords Description Title • the number of times a word occurs in text corpus @NoemiDerzsy
  • 14. PyData New York 2017 TF-IDF • term frequency – inverse document frequency • measures term frequency / document frequency Top 25 Highest TF-IDF Words in Description Top 25 Highest MeanTF-IDF Words in Description @NoemiDerzsy
  • 15. PyData New York 2017 Description TF-IDF and Keywords Top 10 keywords: 1. EARTH SCIENCE: 14387 2. OCEANS: 10034 3. PROJECT: 7464 4. OCEAN OPTICS: 7325 5. ATMOSPHERE: 7324 6. OCEAN COLOR: 7271 7. COMPLETED: 6453 8. ATMOSPHERIC WATER VAPOR: 3143 9. LAND SURFACE: 2721 10.BIOSPHERE: 2450 Top 25 Keywords @NoemiDerzsy
  • 16. PyData New York 2017 Word Co-Occurrence § Co-occurrence matrix of top most frequently co-occurring terms Top 10 Word Co-Occurrence Matrix @NoemiDerzsy
  • 17. PyData New York 2017 Word Co-Occurrence Top 20 Word Co-Occurrence Matrix @NoemiDerzsy
  • 18. PyData New York 2017 Top 50 Word Co-Occurrence Matrix @NoemiDerzsy
  • 19. PyData New York 2017 seaborn.clustermap Top 20 Word Co-Occurrence Matrix Discovering Structure in Heatmap Data standardization @NoemiDerzsy
  • 20. PyData New York 2017 Are features pulled from text (such as title, description fields) and/or human supplied-keywords descriptive of the content? Topic Modeling… @NoemiDerzsy
  • 21. PyData New York 2017 What is Topic Modeling? An efficient way to make sense of large volume of texts. Identify topics within text corpus. Categorize documents into topics. Associate words with topics. Who uses it? Search engines, for marketing purpose, etc. @NoemiDerzsy
  • 22. PyData New York 2017 Latent Dirichlet Allocation (LDA) q several techniques, but LDA is the most common q Bayesian inference model that associates each document with a probability distribution over topics q topics are probability distributions over words (probability of the word being generated from that topic for that document) q clusters words into topics q clusters documents into mixture of topics q scales well with growing corpus q before running LDA algorithm,we have to specify the number of topics: how to choose beforehand the optimal number of topics? @NoemiDerzsy
  • 23. PyData New York 2017 Topic Model Evaluation: Topic Coherence Q: How to select the top topics? A: Calculate the UMass topic coherence for each topic. Algorithm from Mimno, Wallach, Talley, Leenders, McCallum: Optimizing Semantic Coherence in Topic Models, CEMNLP 2011. Coherence = ! score(𝑤), 𝑤,) )., pairwise scores on the words used to describe the topic. s𝑐𝑜𝑟𝑒34566 78,79 = log 𝐷 𝑤), 𝑤, + 1 𝐷(𝑤)) D(wi)D(wi) as the count of documents containing the word wiwi, D(wi,wj)D(wi,wj) the count of documents containing both words wiwi and wjwj, and DD the total number or documents in the corpus. @NoemiDerzsy
  • 24. PyData New York 2017 openNASA Topics of Highest Coherence @NoemiDerzsy
  • 25. PyData New York 2017 Keywords for Topics • selected keywords with their most frequently occurring terms @NoemiDerzsy
  • 26. PyData New York 2017 Other Clustering Method: K-Means • using TF-IDF, the document vectors are put through a K-Means clustering algorithm which computes the Euclidean distances amongst these documents and clusters nearby documents together • the algorithm generates cluster tags, known as cluster centers which represent the documents within these clusters • K-means distance: • Euclidean • Cosine • Fuzzy • Accuracy comparison: • silhouette analysis can be used to study the separation distance between the resulting clusters; can be used to determine the optimal number of clusters @NoemiDerzsy
  • 27. PyData New York 2017 K-Means Clustering § Top 10 terms per cluster: Cluster 0 seawifs local collect km mission data orbview seastar broadcast noon § Similar clusters with top words as found using LDA Cluster 1 data project system use soil high contain phase set gt Cluster 2 modis terra aqua earth global pass south north equator eos Cluster 3 band oct color adeos czcs nominal sense spacecraft agency thermal Cluster 4 product data level version file aquarius set daily ml standard @NoemiDerzsy
  • 28. PyData New York 2017 K-Means Clustering § cluster size distribution for k = 5 Cluster 2: 19031 Cluster 0: 5805 Cluster 1: 4481 Cluster 3: 1968 Cluster 4: 804 § silhouette score improves by increasing the number of clusters, best performance for K > 100 § analysis of cluster size distributions with varying K can reveal additional information 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0 50 100 150 200 250 300 350 SilhouetteScore K Number of Clusters Silhouette Score for K-Means Clustering openNASA Datasets @NoemiDerzsy
  • 29. PyData New York 2017 Text Classification § Naïve Bayes probabilistic model • Multinomial model • data follows multinomial distribution • each feature value is a count (word co-occurrence, weight, tf-idf, etc.) • Take into account word importance • Bernoulli model • data follows a multivariate Bernoulli distribution • bag of words (count word occurrence) • each feature is a binary feature (word in text? True/False) • ignores word significance § KNN (K-nearest neighbor) classifier § Decision trees § Support Vector Machine (SVM) @NoemiDerzsy
  • 30. PyData New York 2017 Network Science: Bipartite Network § Term in Description – Keyword: - connect 2 words in description if they appear under same Keyword - connect 2 keywords if they share common words in Description § All bipartite network projection possibilities: - description – keyword - description – title - title – keyword § Type of interaction: - link direction: directed/undirected - link weight: how strong the connection (co-occurrence matrix) @NoemiDerzsy
  • 31. PyData New York 2017 Structural Network Properties § degree distribution: reveals connectivity pattern § do we have hubs (nodes with significantly higher number of connections)? § average degree (how interconnected the elements are) § clusters, community detection (subgroups with elements more densely connected among each other) @NoemiDerzsy
  • 32. PyData New York 2017 Terms that occur > 1% of the documents (in more than 320 data set descriptions) • Network size: # of nodes (words) = 1015 • Average degree: 890.319 (densely connected terms) • Components: 1 connected component • Modularity analysis: 2 clusters (pink, violet) @NoemiDerzsy
  • 33. PyData New York 2017 Top 100 most frequent words in Description • size/color hue ~ occurrence frequency • outer circle: top 10 most frequent words Nodes with the highest connectivity are not all the same as most frequently co-occurring @NoemiDerzsy
  • 34. PyData New York 2017 Network structures: powerful tool for capturing additional information about interconnected systems! @NoemiDerzsy
  • 35. PyData New York 2017 What are the important connections between NASA datasets and other important datasets outside of NASA in the US government? @NoemiDerzsy
  • 36. PyData New York 2017 Other Open Government Dataset Collections http://data.nasa.gov/data.json http://www.epa.gov/data.json http://data.gov http://www.nsf.gov/data.json http://usda.gov/data.json http://data.noaa.gov/data.json http://www.commerce.gov/data.json http://nist.gov/data.json http://www.defense.gov/data.json http://www2.ed.gov/data.json http://www.dol.gov/data.json http://www.state.gov/data.json http://www.dot.gov/data.json http://www.energy.gov/data.json http://nrel.gov/data.json http://healthdata.gov/data.json http://www.hud.gov/data.json http://www.doi.gov/data.json http://www.justice.gov/data.json http://www.archives.gov/data.json http://www.nrc.gov/data.json http://www.nsf.gov/data.json http://www.opm.gov/data.json https://www.sba.gov/sites/default/files/data.json http://www.ssa.gov/data.json http://www.consumerfinance.gov/data.json http://www.fhfa.gov/data.json http://www.imls.gov/data.json http://data.mcc.gov/raw/index.json http://www.nitrd.gov/data.json http://www.ntsb.gov/data.json http://www.sec.gov/data.json https://open.whitehouse.gov/data.json http://treasury.gov/data.json http://www.usaid.gov/data.json http://www.gsa.gov/data.json https://www.economist.com/news/international/21678833-open-data-revolution-has-not-lived-up-expectations-it-only-getting Open Government Data: Out of the Box The Economist @NoemiDerzsy
  • 37. PyData New York 2017 pyNASA and pyOpenGov Libraries § Python library that loads all the open NASA or other government metadata collection at once pyNASA https://github.com/bmtgoncalves/pyNASA pyOpenGov https://github.com/nderzsy/pyOpenGov How to install: >> pip install pyNASA >> pip install pyOpenGov @NoemiDerzsy
  • 38. PyData New York 2017 Takeaways § NLP enables understanding of structured and unstructured text § Topic modeling useful tool for understanding topics in large text corpus, documents § Topic models efficient for evaluating the accuracy of human-supplied descriptions, keywords § Tedious preprocessing a must before modeling (stop words, lemmatization, special characters, etc.) § Network (graph) structure can reveal more information, term/topic associations § Network projections allow to answer additional questions § Open government data enables citizens in understanding topics, areas of focus @NoemiDerzsy