C2DH / jdh-notebook

A collection of Jupyter notebooks for the Journal of Digital History
https://journalofdigitalhistory.org
GNU Affero General Public License v3.0
4 stars 1 forks source link

Technical review: Edge Cases: The Making of Network Navigator and Critical Approaches to DH Tools #140

Closed jdh-observer closed 8 months ago

jdh-observer commented 9 months ago

PID: nAW4E5etkMR6

https://github.com/jdh-observer/nAW4E5etkMR6

inactinique commented 9 months ago

sent first remarks to author(s):

"jdh": { "object": { "source": [ "Early ancestor of Silene stenophylla, recovered after being frozen for about 31,800 years" ] } } }

inactinique commented 8 months ago

Answer of the authors:

Hopefully one of these versions works for the double-blind peer review and happy to answer any questions or make any additional adjustments.

Also thank you for sharing about the Altair charts, I was trying to get them to render in the Preview with no luck. We’re using Altair version 5 syntax throughout the article so hoping that doesn’t cause any issues on your end, though again please let us know and we’ll do our best to update the code.

inactinique commented 8 months ago

Analysing the fully anonimized version:

eliselavy commented 8 months ago

@inactinique i will look at the reproducibility part

inactinique commented 8 months ago

Note that running the notebook on mybinder worked perfectly.

eliselavy commented 8 months ago

Using the https://jdh-binder.curvenote.dev/ instance: ERROR: No matching distribution found for altair==5.1.0

inactinique commented 8 months ago

Authors told me they had used altair 5. Is that a problem?

eliselavy commented 8 months ago

@inactinique i am clarify the libraries used as it seems

pip freeze

as been made, see list of libraries here https://github.com/jdh-observer/nAW4E5etkMR6/blob/main/requirements.txt

to include only useful

eliselavy commented 8 months ago

altair==5.0.1 ok

need to include:

nltk.download('punkt')
nltk.download('stopwords')
eliselavy commented 8 months ago

Generated from mybinder

Altair visualization generated see here: https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZqZGgtb2JzZXJ2ZXIlMkZuQVc0RTVldGtNUjYlMkZyZXZpZXctMTQwJTJGYXJ0aWNsZS5pcHluYg==?idx=18&layer=narrative&lh=688&pidx=18&pl=hermeneutics&y=414

But problem table-1

=> need to download the notebook from mybinder and generate locally:

Table 1 Table of Example Six Degrees of Francis Bacon data Need to check one error bacon dataframe but only on my binder

see https://app.reviewnb.com/jdh-observer/nAW4E5etkMR6/pull/1/discussion/#comment-1900751151

Data on the Six Degrees of Francis Bacon Quakers Group:

Graph with 96 nodes and 162 edges
Density: 0.0355
Diameter: 8
Avg. Shortest Path Length: 3.3789
Transitivity 0.1695

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_35/2455966844.py in <module>
     31 # Convert node table to Pandas DataFrame for display
     32 nodes = pd.DataFrame.from_dict(G.nodes, orient='index')
---> 33 nodes.reset_index(level=0,names="name",inplace=True)
     34 nodes.sort_values("degree_centrality", ascending=False)

/srv/conda/envs/notebook/lib/python3.7/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
    309                     stacklevel=stacklevel,
    310                 )
--> 311             return func(*args, **kwargs)
    312 
    313         return wrapper

TypeError: reset_index() got an unexpected keyword argument 'names'

But problem locally - nbconvert
Figure-3 Popularity of Network Analysis Tools Over Time and Across Multiple Datasets network_tools_over_time_chart ValidationError: 'legend' is not of type 'object'

Figure-5 History of Network Navigator via GitHub nn_chart ValidationError: 'legend' is not of type 'object'

Figure-9 Popularity of the Term ‘Infrastructure’ Over Time and Across Multiple Datasets infrastructure_tool_chart ValidationError: 'legend' is not of type 'object'

Figure 10 Popularity of the Term ‘Network Analysis’ Over Time and Across Multiple Datasets network_analysis_chart ValidationError: 'legend' is not of type 'object'

Figure 11 Popularity of the Term ‘Algorithmic Criticism’ Over Time and Across Multiple Datasets tool_algo_criticism_chart ValidationError: 'legend' is not of type 'object'

Remarks: notebook provided , addition trusted notebook, output are not correct

Screenshot 2024-01-22 at 15 13 20

eliselavy commented 8 months ago

Perfect with data-table Screenshot 2024-01-22 at 15 04 07

eliselavy commented 8 months ago

Author's python version: 3.9.1 but runtime still set python-3.7

re-run code now with python version set as the author

  },
  "kernelspec": {
   "display_name": "edge-cases-venv",
   "language": "python",
   "name": "edge-cases-venv"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.1"
  },
eliselavy commented 8 months ago

Reproducibility fixed with good version of python Will be added in the technical, check see here: https://github.com/C2DH/journal-of-digital-history-ipynb-preflight-action/issues/2

remove reference to the author 's repo only this reference , but example dataset: https://github.com/melaniewalsh/sample-social-network-datasets

Support of the data-table deployed in production: https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZqZGgtb2JzZXJ2ZXIlMkZuQVc0RTVldGtNUjYlMkZtYWluJTJGYXJ0aWNsZS5pcHluYg==?idx=91

Sent to peer-review