For my project I used a React frontend with a Flask backend and a sqlite database. I used React as you requested. I used Flask and sqlite because I was a bit familiar with them already, and they are very easy to use given the time constraint. I used a template to start with for my React frontend which is located in the “WebFrontEnd” folder which contains a readme about where it came from. Other than that template I just used documentation from the various libraries and frameworks.
I would also ask that you view my 1 closed PR on this repo to see how I document my pull requests.
See the below information for descriptions on the data processing I did on the csv.
Thank you for your consideration,
Will
import pandas as pd
import sqlite3
import uuid
I used pandas for most of my data processing and to ingest the csv as you requested.
con = sqlite3.connect("movieData.sqlite")
cur = con.cursor()
moviesDf = pd.read_csv("movie_plots.csv")
moviesDf
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Release Year | Title | Origin/Ethnicity | Director | Cast | Genre | Wiki Page | Plot | |
---|---|---|---|---|---|---|---|---|
0 | 1901 | Kansas Saloon Smashers | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Kansas_Saloon_Sm... | A bartender is working at a saloon, serving dr... |
1 | 1901 | Love by the Light of the Moon | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Love_by_the_Ligh... | The moon, painted with a smiling face hangs ov... |
2 | 1901 | The Martyred Presidents | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/The_Martyred_Pre... | The film, just over a minute long, is composed... |
3 | 1901 | Terrible Teddy, the Grizzly King | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Terrible_Teddy,_... | Lasting just 61 seconds and consisting of two ... |
4 | 1902 | Jack and the Beanstalk | American | George S. Fleming, Edwin S. Porter | NaN | unknown | https://en.wikipedia.org/wiki/Jack_and_the_Bea... | The earliest known adaptation of the classic f... |
... | ... | ... | ... | ... | ... | ... | ... | ... |
34881 | 2014 | The Water Diviner | Turkish | Director: Russell Crowe | Director: Russell Crowe\r\nCast: Russell Crowe... | unknown | https://en.wikipedia.org/wiki/The_Water_Diviner | The film begins in 1919, just after World War ... |
34882 | 2017 | Çalgı Çengi İkimiz | Turkish | Selçuk Aydemir | Ahmet Kural, Murat Cemcir | comedy | https://en.wikipedia.org/wiki/%C3%87alg%C4%B1_... | Two musicians, Salih and Gürkan, described the... |
34883 | 2017 | Olanlar Oldu | Turkish | Hakan Algül | Ata Demirer, Tuvana Türkay, Ülkü Duru | comedy | https://en.wikipedia.org/wiki/Olanlar_Oldu | Zafer, a sailor living with his mother Döndü i... |
34884 | 2017 | Non-Transferable | Turkish | Brendan Bradley | YouTubers Shanna Malcolm, Shira Lazar, Sara Fl... | romantic comedy | https://en.wikipedia.org/wiki/Non-Transferable... | The film centres around a young woman named Am... |
34885 | 2017 | İstanbul Kırmızısı | Turkish | Ferzan Özpetek | Halit Ergenç, Tuba Büyüküstün, Mehmet Günsür, ... | romantic | https://en.wikipedia.org/wiki/%C4%B0stanbul_K%... | The writer Orhan Şahin returns to İstanbul aft... |
34886 rows × 8 columns
I did some light data processing. I changed the column names to be a bit more friendly to coding and I added a UID.
mRename = moviesDf.rename(columns={"Release Year": "ReleaseYear", "Origin/Ethnicity": "Origin", "Wiki Page": "WikiPage"})
mRename['id'] = [uuid.uuid4() for _ in range(len(mRename.index))]
mRename['id']= mRename['id'].astype('str')
mRename
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
ReleaseYear | Title | Origin | Director | Cast | Genre | WikiPage | Plot | id | |
---|---|---|---|---|---|---|---|---|---|
0 | 1901 | Kansas Saloon Smashers | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Kansas_Saloon_Sm... | A bartender is working at a saloon, serving dr... | ac8044ff-7093-4935-aff9-678d3ddfa075 |
1 | 1901 | Love by the Light of the Moon | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Love_by_the_Ligh... | The moon, painted with a smiling face hangs ov... | 92420e92-a871-4948-936c-eff0ce18a55d |
2 | 1901 | The Martyred Presidents | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/The_Martyred_Pre... | The film, just over a minute long, is composed... | 005118ac-2b80-4d1f-8dd8-57618e561fc3 |
3 | 1901 | Terrible Teddy, the Grizzly King | American | Unknown | NaN | unknown | https://en.wikipedia.org/wiki/Terrible_Teddy,_... | Lasting just 61 seconds and consisting of two ... | 3d1a42ef-ca75-4e11-aa53-b1b04068d8ff |
4 | 1902 | Jack and the Beanstalk | American | George S. Fleming, Edwin S. Porter | NaN | unknown | https://en.wikipedia.org/wiki/Jack_and_the_Bea... | The earliest known adaptation of the classic f... | 653e1500-a8a5-41b1-bb50-f15bf7961fa5 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
34881 | 2014 | The Water Diviner | Turkish | Director: Russell Crowe | Director: Russell Crowe\r\nCast: Russell Crowe... | unknown | https://en.wikipedia.org/wiki/The_Water_Diviner | The film begins in 1919, just after World War ... | 793ba238-5f6e-488d-a728-8c8b113a7985 |
34882 | 2017 | Çalgı Çengi İkimiz | Turkish | Selçuk Aydemir | Ahmet Kural, Murat Cemcir | comedy | https://en.wikipedia.org/wiki/%C3%87alg%C4%B1_... | Two musicians, Salih and Gürkan, described the... | b84af0ac-f74d-435d-b56b-16f90ff8dedc |
34883 | 2017 | Olanlar Oldu | Turkish | Hakan Algül | Ata Demirer, Tuvana Türkay, Ülkü Duru | comedy | https://en.wikipedia.org/wiki/Olanlar_Oldu | Zafer, a sailor living with his mother Döndü i... | 69e80286-227f-444f-abc3-4dc747fd2c46 |
34884 | 2017 | Non-Transferable | Turkish | Brendan Bradley | YouTubers Shanna Malcolm, Shira Lazar, Sara Fl... | romantic comedy | https://en.wikipedia.org/wiki/Non-Transferable... | The film centres around a young woman named Am... | e9a8d50c-99b6-4336-b67c-c395b352c98b |
34885 | 2017 | İstanbul Kırmızısı | Turkish | Ferzan Özpetek | Halit Ergenç, Tuba Büyüküstün, Mehmet Günsür, ... | romantic | https://en.wikipedia.org/wiki/%C4%B0stanbul_K%... | The writer Orhan Şahin returns to İstanbul aft... | 907d4bcb-fd6c-4ba7-be84-b80e870d137f |
34886 rows × 9 columns
mRename.to_sql("movie", con, index=False)
movieData = pd.read_sql_query("SELECT * from movie", con)
movieData
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
ReleaseYear | Title | Origin | Director | Cast | Genre | WikiPage | Plot | id | |
---|---|---|---|---|---|---|---|---|---|
0 | 1901 | Kansas Saloon Smashers | American | Unknown | None | unknown | https://en.wikipedia.org/wiki/Kansas_Saloon_Sm... | A bartender is working at a saloon, serving dr... | ac8044ff-7093-4935-aff9-678d3ddfa075 |
1 | 1901 | Love by the Light of the Moon | American | Unknown | None | unknown | https://en.wikipedia.org/wiki/Love_by_the_Ligh... | The moon, painted with a smiling face hangs ov... | 92420e92-a871-4948-936c-eff0ce18a55d |
2 | 1901 | The Martyred Presidents | American | Unknown | None | unknown | https://en.wikipedia.org/wiki/The_Martyred_Pre... | The film, just over a minute long, is composed... | 005118ac-2b80-4d1f-8dd8-57618e561fc3 |
3 | 1901 | Terrible Teddy, the Grizzly King | American | Unknown | None | unknown | https://en.wikipedia.org/wiki/Terrible_Teddy,_... | Lasting just 61 seconds and consisting of two ... | 3d1a42ef-ca75-4e11-aa53-b1b04068d8ff |
4 | 1902 | Jack and the Beanstalk | American | George S. Fleming, Edwin S. Porter | None | unknown | https://en.wikipedia.org/wiki/Jack_and_the_Bea... | The earliest known adaptation of the classic f... | 653e1500-a8a5-41b1-bb50-f15bf7961fa5 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
34881 | 2014 | The Water Diviner | Turkish | Director: Russell Crowe | Director: Russell Crowe\r\nCast: Russell Crowe... | unknown | https://en.wikipedia.org/wiki/The_Water_Diviner | The film begins in 1919, just after World War ... | 793ba238-5f6e-488d-a728-8c8b113a7985 |
34882 | 2017 | Çalgı Çengi İkimiz | Turkish | Selçuk Aydemir | Ahmet Kural, Murat Cemcir | comedy | https://en.wikipedia.org/wiki/%C3%87alg%C4%B1_... | Two musicians, Salih and Gürkan, described the... | b84af0ac-f74d-435d-b56b-16f90ff8dedc |
34883 | 2017 | Olanlar Oldu | Turkish | Hakan Algül | Ata Demirer, Tuvana Türkay, Ülkü Duru | comedy | https://en.wikipedia.org/wiki/Olanlar_Oldu | Zafer, a sailor living with his mother Döndü i... | 69e80286-227f-444f-abc3-4dc747fd2c46 |
34884 | 2017 | Non-Transferable | Turkish | Brendan Bradley | YouTubers Shanna Malcolm, Shira Lazar, Sara Fl... | romantic comedy | https://en.wikipedia.org/wiki/Non-Transferable... | The film centres around a young woman named Am... | e9a8d50c-99b6-4336-b67c-c395b352c98b |
34885 | 2017 | İstanbul Kırmızısı | Turkish | Ferzan Özpetek | Halit Ergenç, Tuba Büyüküstün, Mehmet Günsür, ... | romantic | https://en.wikipedia.org/wiki/%C4%B0stanbul_K%... | The writer Orhan Şahin returns to İstanbul aft... | 907d4bcb-fd6c-4ba7-be84-b80e870d137f |
34886 rows × 9 columns
con.close()