Skip to content

Commit

Permalink
Minor edits to preprocessing code and UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Saad-Falcon committed Jun 8, 2020
1 parent 164c617 commit e05776f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8,381 deletions.
Binary file removed Preprocessing/__pycache__/scholarly.cpython-37.pyc
Binary file not shown.
1 change: 0 additions & 1 deletion Preprocessing/citedClusters.js

This file was deleted.

1 change: 0 additions & 1 deletion Preprocessing/citedCoordinates.js.js

This file was deleted.

4,274 changes: 0 additions & 4,274 deletions Preprocessing/citedScholarDataset.csv

This file was deleted.

4,081 changes: 0 additions & 4,081 deletions Preprocessing/recentScholarDataset.csv

This file was deleted.

36 changes: 16 additions & 20 deletions src/components/PeopleMapView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function renderGraph() {
.append("g");
// Rectangle for registering clicks on the graph
// Rectangle for registering clicks on the map
svg.append('rect')
.attr("width", width)
.attr("height", height)
Expand Down Expand Up @@ -269,11 +269,7 @@ function renderGraph() {
for (var i = 0; i < dataFilter.length; i++) {
totalAuthors[dataFilter[i].Author] = true
}
// hacky for now...
// window.totalAuthors = {}
// for (var i = 0; i < dataFilter.length; i++) {
// window.totalAuthors[dataFilter[i].Author] = true;
// }
// Currently click author
Expand Down Expand Up @@ -692,7 +688,7 @@ function renderGraph() {
// Upon change of keywords emphasis, updates the graph visualization
// Upon change of keywords emphasis, updates the map visualization
function updateKeywords(selectedGroup, clustersNumber) {
Expand Down Expand Up @@ -737,7 +733,7 @@ function renderGraph() {
}
// A function that update the chart with a new cluster coloring
// A function that updates the map with a new cluster coloring
function updateClusters(selectedGroup, keywordsEmphasis) {
Expand All @@ -761,7 +757,7 @@ function renderGraph() {
}
// A function that update the chart with a new ranking coloring
// A function that update the map with a new ranking coloring
function updateRanking(phrase, emphasis) {
Expand Down Expand Up @@ -816,7 +812,7 @@ function renderGraph() {
// A function that update the chart with the researcher names, either displayed or undisplayed
// A function that updates the map with the researcher names, either displayed or undisplayed
function updateNames(selectedOption) {
// Filter out data with the selection
Expand Down Expand Up @@ -848,7 +844,7 @@ function renderGraph() {
// A function that updates the chart with a new Gaussian distribution set
// A function that updates the map with a new Gaussian distribution set
function updateDistributions(selectedOption, keywordsEmphasis, clustersNumber) {
Expand Down Expand Up @@ -910,7 +906,7 @@ function renderGraph() {
// A function that updates the graph with the new dataset
// A function that updates the map with the new dataset
function updateDataset(selectedKeywords, selectedClusters) {
Expand Down Expand Up @@ -1051,9 +1047,9 @@ function renderGraph() {
// When the button is changed, run the updateKeywords function and update the graph
// When the button is changed, run the updateKeywords function and update the map
visKeywordEmphasis.subscribe((selectedOption) => {
// run the updateChart function with this selected option
updateKeywords(selectedOption, $visNumClusters)
updateDistributions($displayDistributions, selectedOption, $visNumClusters)
Expand All @@ -1076,9 +1072,9 @@ function renderGraph() {
})
// When the button is changed, run the updateClusters function and update the graph
// When the button is changed, run the updateClusters function and update the map
visNumClusters.subscribe((selectedOption) => {
// run the updateChart function with this selected option
updateClusters(selectedOption, $visKeywordEmphasis)
updateDistributions($displayDistributions, $visKeywordEmphasis, selectedOption)
Expand All @@ -1102,14 +1098,14 @@ function renderGraph() {
// When the button is changed, run the updateNames function and update the graph
// When the button is changed, run the updateNames function and update the map
displayNames.subscribe((selectedOption) => {
// run the updateNames function with this selected option
updateNames(selectedOption)
})
// When the button is changed, run the updateDistributions function and update the graph
// When the button is changed, run the updateDistributions function and update the map
displayDistributions.subscribe((selectedOption) => {
updateDistributions(selectedOption, $visKeywordEmphasis, $visNumClusters)
Expand All @@ -1136,7 +1132,7 @@ function renderGraph() {
// When a new research query is inputted, update the graph with the new ranking
// When a new research query is inputted, update the map with the new ranking
selectedResearchInterest.subscribe((value) => {
Expand Down Expand Up @@ -1183,7 +1179,7 @@ function renderGraph() {
})
// When a new dataset is selected, update the graph with the new dataset
// When a new dataset is selected, update the map with the new dataset
datasetChoice.subscribe((value) => {
if (value == "Most Cited Publications") {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResearcherDetailView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

{#each $selectedResearcherInfo.scholarKeywords as scholarKeyword }
{ #if scholarKeyword.length != 0 }
<!-- clean this up!!!!!!!!! break it out into seperate functions, etc.-->

<p style="cursor: pointer; color: #8B72BE; text-align: left; margin-bottom: 0px; {lockedInterest == scholarKeyword ? "font-weight: bold;" : "font-weight: normal;"} margin-left: 20%" on:click={() =>{
if (lockedInterest.length == 0)
lockedInterest = scholarKeyword
Expand Down
5 changes: 2 additions & 3 deletions src/components/StatsView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
var authors = {}
// TODO: add this to app store.
citedCoordinates.forEach((curr) => {
authors[curr["Author"]] = true;
Expand Down Expand Up @@ -65,9 +64,9 @@
var handleKeydown = () => {
var key = event.key;
var keyCode = event.keyCode;
// debugger;
if (keyCode == 13) {
// debugger;
selectedResearchInterest.set(choices[0]["name"])
}
}
Expand Down

0 comments on commit e05776f

Please sign in to comment.