idc9 / law-net Goto Github PK
View Code? Open in Web Editor NEWcode to analyze the legal citation network
License: MIT License
code to analyze the legal citation network
License: MIT License
compare citations from SCOTUS vs. other courts
The analysis also shows that measuring precedent using citation counts at the Supreme Court level (which are statistically indistinguishable from more sophisticated options like eigenvector centrality and authority scores)
Our analyses says differently i.e. while there is a lot of multicollinearity the different metrics do capture some different phenomena
Assume that igraph graph g has the name attribute. If the name attribute is an integer then I had problems using g.vs.find(name = n)
.
587 edges get removed when converting SCOTUS Network into undirected form--see:
"/explore/michael/missing_edges_SCOTUS_undirected.ipynb"
This is most likely because of many of the 587 edges (or possibly all of them) connect the two same cases with different court_id's.
Example: 1521208 -> 98215 and 98215 -> 1521208
https://www.courtlistener.com/opinion/98215/new-york-life-insurance-company-plff-in-err-v-richard-g-head-jr-by/
https://www.courtlistener.com/opinion/1521208/new-york-life-ins-co-v-head/
Remove these repeated cases after the conference
the to_csv() function in pandas doesn't seem to have "index_col" as its parameter. See the error message below.
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
----> 1 download_scdb(data_dir)
/home/bill10/Research/Law_Networks/law-net/code/pipeline/download_data.py in download_scdb(data_dir)
165 # download data from scdb
166 scdb_modern_url = 'http://scdb.wustl.edu/_brickFiles/2016_01/SCDB_2016_01_caseCentered_Citation.csv.zip'
--> 167 download_zip_to_csv(scdb_modern_url, data_dir + 'scdb/')
168 scdb_legacy_url = 'http://scdb.wustl.edu/_brickFiles/Legacy_03/SCDB_Legacy_03_caseCentered_Citation.csv.zip'
169 download_zip_to_csv(scdb_legacy_url, data_dir + 'scdb/')
/home/bill10/Research/Law_Networks/law-net/code/pipeline/download_data.py in download_zip_to_csv(url, path)
237
238 # save csv
--> 239 data.to_csv(zip_path.split('.zip')[0], index_col=0)
240
241 # kill the zip file
TypeError: to_csv() got an unexpected keyword argument 'index_col'`
Under 'scotus' folder:
For our "edgelist.csv" in the scotus folder (and thus probably for our 'edgelist_master.csv'), there are edges where one of the nodes does not exist in the 'case_metdata.csv' file.
Networkx can add edges between nodes where at least one does not exist in 'case_metadata.csv' without any problems.
However, according to errors observed 9/4/16, iGraph does not allow adding edges between nodes where at least one does not exist in 'casemetadata.csv'
Currently, we are using a network object in iGraph with edges containing only the nodes in 'case_metadata.csv'
Look at it Tuesday with Iain
Notes:
-G.add_edge() and G.add_edges() add the edges by the indices of the list of vertices, NOT by the vertex names --really dumb
-I tried replicating this: https://gist.github.com/rbnvrw/c2424fe3ff812da892a0
although this led to the correct number of edges, 3 million more nodes/cases were added somehow
-check if iGraph for python contains algorithms to do centrality measures
The following cases are missing opinion files when we do bulk download. The few I checked were from 2016. Pretty sure this is CL, not us (but not positive).
[3177214, 3177215, 3177216, 3177217, 3177218, 3177219, 3181041, 3181042, 3181043, 3181499, 3181500, 3183097, 3183098, 3183099, 3183100, 3187262, 3187263, 3187264, 3187550, 3187592, 3187593, 3187594, 3189478, 3189871, 3191204, 3191205, 3191206, 3191207, 3195198, 3195550, 3195551, 3195996, 3195997, 3195998, 3197473, 3197852, 3199607, 3199608, 3203729, 3203730, 3203761, 3203762, 3203763, 3203764, 3203765, 3205023, 3205024, 3205025, 3205842, 3205872, 3205873, 3205874, 3206520, 3207964, 3207965, 3207966, 3207967, 3209792, 3209793, 3211607, 3211608, 3211609, 3212620, 3212621, 3212622, 3213977, 3213978, 3213979, 3214880, 3214881, 3214882, 3214883, 3214884, 3214885, 3214886, 3216493, 3216494, 3216495, 3216496, 3216497, 3217332, 3217333, 3217334, 3217528, 3217529, 3217582, 3217583, 4236644, 4238690, 4238691, 4244429, 4245502, 4246370, 4246378, 4311283, 4312721, 4316744, 4325538]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.