Python Forum
Help batch converting .json chosen file to MySQL
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help batch converting .json chosen file to MySQL
#1
Hey there everyone! I am currently manually copying data fields from .json files on GitHUB for Supreme Court of The United States Opinions from 1700's to 2000's from the freelawproject.

GitHUB here: https://github.com/brianwc/bulk_scotus

Example .json file

(SCOTUS Opinion - 1700 - 1754 - 84581.json)
GitHUB Link: https://github.com/brianwc/bulk_scotus/b...84581.json

The fields I am currently manually entering into a MySQL database is the following:

case_name VARCHAR (250)
federal_cite (100)
date_filed (100)
judge_name (100)
citation_count (100)
precedential_status (100)
download_url (200)
html_with_citations (longtext)
html (longtext)
html_lawbox (longtext)
Knowing this will take me 3+ months to manually do and knowing the power of python and it's abilities to take every single one of my .json files and write the chosen fields to a CSV and then to a MYSQL database table schema OR directly to a MySQL database table schema and bypass the CSV conversion.

What would you do in my position?

Thank you in advance!

Best Regards,

Brandon Kastning
Big Grin
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)

“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)

#LetHISPeopleGo

Reply
#2
clone the entire site site (button on repository page)
or do a sparse clone see: https://gist.github.com/hofnerb/a5ebf4e0c89caffc40ee
Reply
#3
(Mar-14-2020, 04:07 PM)Larz60+ Wrote: clone the entire site site (button on repository page)
or do a sparse clone see: https://gist.github.com/hofnerb/a5ebf4e0c89caffc40ee

Larz60,

I have the entire github repository downloaded. There are 64,000+ .json files.
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)

“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)

#LetHISPeopleGo

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Miss-Classification problem with shuffled batch Faebs94 0 1,525 Sep-02-2021, 11:55 AM
Last Post: Faebs94
  Which network architecture should be chosen to predict disease severity? AlekseyPython 2 1,956 Aug-21-2021, 07:12 PM
Last Post: jefsummers
  HELP! Importing json file into csv into jupyter notebook vilsef 2 2,531 Jan-22-2021, 11:06 AM
Last Post: snippsat
  JSON file Loading issue punna111 4 8,488 Jun-29-2020, 08:07 AM
Last Post: buran
  Indirectlty convert string to float in JSON file WBPYTHON 6 5,830 May-06-2020, 12:09 PM
Last Post: WBPYTHON
  Handling escape charters while converting data frame to JSON RahulShukla 0 1,668 Nov-11-2019, 11:22 AM
Last Post: RahulShukla
  [split] Converting excel file to txt file unexceptionalhobby 2 4,309 Oct-16-2019, 06:34 PM
Last Post: unexceptionalhobby
  Matplolib graphic from batch achilledue 2 2,484 Sep-11-2019, 08:43 AM
Last Post: buran
  save my sensor data from the bme680 into a json or csv file Plastefuchs84 1 3,103 Aug-23-2019, 03:04 AM
Last Post: Plastefuchs84
  Merge JSON files prioritizing the updated values from most recent file nebulae 0 2,519 Apr-17-2019, 10:15 AM
Last Post: nebulae

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020