Export 2 rows to a notebook
You can export this data to a Jupyter or Observable notebook by copying and pasting the following:
Jupyter
Make sure you have Pandas. Import it in a cell like this:
import pandasIf this shows an error you can run
%pip install pandas
in a notebook cell to install it.
Now paste the following into a cell to load the 2 rows into a DataFrame called df
:
df = pandas.read_json( "https://covid-19.datasettes.com/la-times.json?p0=75&sql=select+rowid%2C+date%2C+confirmed_cases%2C+deaths%2C+travel%2C+person_to_person%2C+community_spread%2C+under_investigation%2C+other_causes%2C+self_monitoring%2C+age_0_to_17%2C+age_18_to_49%2C+age_50_to_64%2C+age_65_and_up%2C+age_18_to_64%2C+age_unknown%2C+gender_male%2C+gender_female%2C+gender_unknown%2C+total_tests%2C+received_tests%2C+pending_tests%2C+confirmed_hospitalizations%2C+confirmed_icu%2C+suspected_hospitalizations%2C+suspected_icu%2C+healthcare_worker_infections%2C+healthcare_worker_deaths%2C+vaccine_doses_administered%2C+vaccine_doses_distributed%2C+source_url+from+%5Bcdph-press-releases%5D+where+%22person_to_person%22+%3D+%3Ap0+order+by+rowid+desc+limit+101&_shape=array" )
Run df
in a new cell to see the table.
Observable
Import the data into a variable called rows
like this:
rows = d3.json( "https://covid-19.datasettes.com/la-times.json?p0=75&sql=select+rowid%2C+date%2C+confirmed_cases%2C+deaths%2C+travel%2C+person_to_person%2C+community_spread%2C+under_investigation%2C+other_causes%2C+self_monitoring%2C+age_0_to_17%2C+age_18_to_49%2C+age_50_to_64%2C+age_65_and_up%2C+age_18_to_64%2C+age_unknown%2C+gender_male%2C+gender_female%2C+gender_unknown%2C+total_tests%2C+received_tests%2C+pending_tests%2C+confirmed_hospitalizations%2C+confirmed_icu%2C+suspected_hospitalizations%2C+suspected_icu%2C+healthcare_worker_infections%2C+healthcare_worker_deaths%2C+vaccine_doses_administered%2C+vaccine_doses_distributed%2C+source_url+from+%5Bcdph-press-releases%5D+where+%22person_to_person%22+%3D+%3Ap0+order+by+rowid+desc+limit+101&_shape=array" )