Skip to content

Commit 0f82f3b

Browse files
thegoomanloganamcnicholsryuntalan
authored
0.7.2 (#273)
* Tests added. (#253) * Added test for removal. * Added data formatting test. * Added return types. * Boolean checker added to resetMetadata. (#259) * working on bool check. * Added a booly check function and check for boolyness in resetMetadata. * Got rid of the 1 and the 0 * Fixed move error. (#257) * csvviewer package updated + revised 'Column 1' label on launcher (#260) * Updated survey-data notebook (#262) * Packages reverted. (#264) * Updated binder dependencies and workspace (#265) * Code cleanup primarily in handler.ts (#266) * Added getters for the ghost row height and the ghost column width. * Set up the bounded drag to enforce that the whole figure be confined to the bounds. * Compute bounding region updated to handle the change to the bounded drag class. * Refactoring of _updateGrid. (#267) * Code cleanup in handler.ts (#269) * Removes unnecessary params. * Refactored getRowOrColumnRegion. * README updates (#268) * showcase gif * Added our extension showcase to README.md * Update README.md * Changed a few words to the README * Using 500,000 size instead of 1 million. * Revert back to tde-csvviewer * Removed large csv and added smaller one. * 10,000 * Right-click column header results in move shadow (#272) * Type converting to string. (#270) * Publish 0.7.2 * Added more demo files Co-authored-by: Logan McNichols <loganamcnichols@gmail.com> Co-authored-by: Ryan Untalan <untalan.ryan@gmail.com>
1 parent deba343 commit 0f82f3b

22 files changed

+10560
-246
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### EXPERIMENTAL: This extension is still in alpha. The API is subject to frequent changes.
88

9-
### Please contact [Kalen](https://github.com/kgoo124), [Logan](https://github.com/lmcnichols), or [Ryan](https://github.com/ryuntalan) if you would like to contribute!
9+
![](design/gifs/showcase.gif)
1010

1111
Try our extension [here](https://mybinder.org/v2/gh/jupytercalpoly/jupyterlab-tabular-data-editor/master?urlpath=lab)!
1212

@@ -18,6 +18,38 @@ Check out our [current progress and future plans](https://github.com/jupytercalp
1818

1919
See our progress as of 08/07/2020 from these [slides](https://docs.google.com/presentation/d/1ZGjFb3RkoR5Cc39DDdtU-AYAoYMNVMyUM9g80qgNzos/edit?usp=sharing)!
2020

21+
## Feature Showcase
22+
<details>
23+
<summary>View Extension Highlights</summary>
24+
<br>
25+
<h3>Launch new files and quickly add rows and columns</h3>
26+
<img src="design/gifs/csvlauncher.gif" alt="gif of launching a new csv file within JupyterLab">
27+
28+
<br>
29+
<br>
30+
31+
<h3>Seamlessly rearrange your data table</h3>
32+
<img src="design/gifs/moving.gif" alt="gif of moving rows and columns within JupyterLab">
33+
34+
<br>
35+
<br>
36+
37+
<h3>Insert and remove multiple rows and columns</h3>
38+
<img src="design/gifs/multiremoveandinsert.gif" alt="gif of removing and inserting multiple rows and columns within JupyterLab">
39+
40+
<br>
41+
<br>
42+
43+
<h3>Format your data with a click of a button</h3>
44+
<img src="design/gifs/auto-format.gif" alt="gif of toggling on a mode that formats data based on data types within JupyterLab">
45+
46+
<br>
47+
<br>
48+
49+
<h3>Search and replace with ease</h3>
50+
<img src="design/gifs/searchandreplace.gif" alt="gif of searching and replacing a word within a large file within JupyterLab">
51+
</details>
52+
2153
## Requirements
2254

2355
- JupyterLab >= 2.0

binder/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
jupyterlab>=2.0
22
numpy
33
pandas
4+
matplotlib

binder/workspace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":0,"widgets":["editablecsvviewer:demo/customer-recipes.csv","editablecsvviewer:demo/longrun-social-spending.csv"]},"mode":"multiple-document","current":"editablecsvviewer:demo/customer-recipes.csv"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"demo"},"editablecsvviewer:demo/customer-recipes.csv":{"data":{"path":"demo/customer-recipes.csv","factory":"Tabular Data Editor"}},"editablecsvviewer:demo/longrun-social-spending.csv":{"data":{"path":"demo/longrun-social-spending.csv","factory":"Tabular Data Editor"}}},"metadata":{"id":"/lab"}}
1+
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":1,"widgets":["editablecsvviewer:demo/datatypes.csv","editablecsvviewer:demo/customer-recipes.csv","notebook:demo/customer-recipes.ipynb","editablecsvviewer:demo/survey-data(cleaned).csv","notebook:demo/survey-data.ipynb"]},"mode":"multiple-document","current":"editablecsvviewer:demo/datatypes.csv"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"demo"},"editablecsvviewer:demo/customer-recipes.csv":{"data":{"path":"demo/customer-recipes.csv","factory":"Tabular Data Editor"}},"editablecsvviewer:demo/datatypes.csv":{"data":{"path":"demo/datatypes.csv","factory":"Tabular Data Editor"}},"notebook:demo/customer-recipes.ipynb":{"data":{"path":"demo/customer-recipes.ipynb","factory":"Notebook"}},"editablecsvviewer:demo/survey-data(cleaned).csv":{"data":{"path":"demo/survey-data(cleaned).csv","factory":"Tabular Data Editor"}},"notebook:demo/survey-data.ipynb":{"data":{"path":"demo/survey-data.ipynb","factory":"Notebook"}}},"metadata":{"id":"/lab"}}

demo/10000 Sales Records.csv

Lines changed: 10001 additions & 0 deletions
Large diffs are not rendered by default.

demo/HCI-Courses.csv

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Course Name,Course Number,Topic,Description,GE Area,Prerequisites
2+
Appropriate Technology for the World's People: Design,UNIV 392,"Product Design,Human Factors","Addresses the needs of international impoverished communities with technological solutions, which are inexpensive, ecologically sustainable, and socially appropriate. Group study of target communities, and design and construction of an appropriate technology prototype. Not open to students with credit in PSC/UNIV/HNRS 492. 3 lectures, 1 laboratory. Crosslisted as HNRS/PSC/UNIV 392. Fulfills GE Area B7 or GE Area F.","B7,F","Junior standing; completion of GE Area A with grades of C- or better; completion of GE Area B1 with a grade of C- or better in at least one of the courses; and completion of GE Areas B2, B3, and B4. Recommended: UNIV 391 and completion of GE Areas D2 and D3."
3+
Appropriate Technology for the World's People: Development,UNIV 391,"UX Research,Human Factors","A broad overview of international development and appropriate design for sustainability. Besides traditional classroom work, students work in teams to address problems with technical solutions. Collaboration with mentors from the university, private sector, and nonprofits serves to provide diverse background and project mentorship. 4 lectures. Crosslisted as HNRS/PSC/UNIV 391. Fulfills GE Area D5.",D5,Junior standing; completion of GE Area A with grades of C- or better; completion of one course in GE Area B1 with a grade of C- or better; and two lower-division courses in GE Area D.
4+
Cognition,PSY 357,HCI,"Principles and theories of cognition including models of perception, attention, memory, concept formation, language, intelligence, problem-solving/decision making, and creativity. Discusses applications to areas such as artificial intelligence, education, and implications for understanding related fields in arts, sciences, and technology. 4 lectures. Formerly PSY 457.",,PSY 201 or PSY 202.
5+
Human Factors and Technology,IME 320,"Human Factors,Product Design","Analysis of cognitive, sensory and physical limitations and capabilities of operators and users of technology, both hardware and software, in working and living environments. Analysis of pertinent databases for a proactive approach to designing user-centered industrial products /systems, consumer products, and work environment. 4 lectures.","B7,F","Junior standing; completion of GE Area A with grades of C- or better; completion of GE Area B1 with a grade of C- or better in at least one of the courses; and completion of GE Areas B2, B3, and B4."
6+
Human Factors Engineering,IME 319,Human Factors,"Analysis of factors influencing the efficiency of human work. Data on the physical and mental capacities of persons, the physical environment, work organization, and the problem of aging. Design of machines, operations, human computer interface and work environment to match human capacities and limitations, including the handicapped. Multidisciplinary team project. 3 lectures.",,"PSY 201 or PSY 202, and junior standing."
7+
Human-Computer Interaction Theory and Design,CSC 486,HCI,"Application of the theories of human-computer interaction to the task of user-centered design. Survey of techniques for studying and involving users in different aspects of the design process, and demonstration of where and when applicable. Combining of theoretical understanding with practical experience to design solutions to problems facing interactive systems designers. 3 lectures, 1 laboratory.",,
8+
Information Design and Production,ENGL 319,"Information Design,Branding","Mid-level presentation of the theory and practice involved with the production of technical documents. Focus on history, typography, information design principles, the effective integration of text and graphics, project management, and recent industry trends in software use. 4 lectures.",,Completion of GE Area A with grades of C- or better. Recommended: Junior standing.
9+
Interaction Design I,ART 288,Interaction Design,"An introduction to concepts, uses and design principles of interactive media. Exploration of methods for planning and implementing interaction design projects. Not open to students with credit in ART 380. 3 lectures, 1 laboratory.",,ART 237 and ART 238.
10+
Interaction Design II,ART 388,Interaction Design,"Design of original and innovative digital products of interaction design in different media, using user-centered design and usability analysis. Design research methods to engage potential users form the beginning to the end of the design process. 3 lectures, 1 laboratory.",,ART 288; or Computing for Interactive Arts minor and ART 182.
11+
Mobile User Experience,GRC 429,UX/UI Design,"Current technologies and production tools used for mobile user interface and experience design, and prototyping. Industry standards, digital rights management, file formats, and publishing options for digital media applications. Legal, ethical, and business issues surrounding digital media. 2 lectures, 1 laboratory.",,GRC 338; Graphic Communication majors only.
12+
Philosophy of Design,ME 234,Human Factors,"General approach to the meaning of engineering design. Conceptual blocks, creativity, design process, design considerations and elements. 3 lectures.",,Sophomore standing.
13+
Qualitative Research Methods,SOC 354,UX Research,"Qualitative data collection for social research. The relationship among theory research and hypothesis testing. Data collection techniques: content analysis, face to face interviews, and ethnographic methods. 3 lectures, 1 activity.",,STAT 217; and two Sociology courses. Recommended: Junior standing.
14+
Quantitative Research Methods,SOC 355,UX Research,"The basics of how to do quantitative social research. Includes topics on data collection techniques such as surveys, experiments, and the use of existing data. Also includes topics on univariate, bivariate, and multivariate analysis and the use of SPSS for data analysis. 3 lectures, 1 laboratory.",,STAT 217; and two Sociology courses. Recommended: Junior standing.
15+
Quantitative Research Methods for the Behavioral Sciences,PSY 333,UX Research,"Thorough introduction to the quantitative aspects of empirical research. Using SPSS statistical software, students will learn how to choose, conduct, and interpret analyses of research data from different behavioral science disciplines. 3 lectures, 1 activity.",,PSY 329; and STAT 217.
16+
Research Methods in Psychology,PSY 329,UX Research,"Introduction to research methods used in psychology and other behavioral sciences. Topics include the logic and ethics of research; experimental, correlational, and survey methodology; library search strategies; basic statistical procedures; and the format of the research report. 4 lectures.",,PSY 201 or PSY 202; and STAT 217.
17+
Solving Big World Challenges,COMS/BUS 458,"UX Research,Product Design","Apply human-centered design practices to address a social or an environmental challenge, specific to a local community. Achieve revenue-generating social impact through innovative business models. Practice team competencies including problem-solving, interviewing, brainstorming, prototyping, and written, visual, and oral communication. 4 lectures. Crosslisted as BUS/COMS 458.",,Completion of GE Area A with a grade of C- or better.
18+
User Experience Methods for Digital Innovation,GRC 433,"UX/UI Design,UX Research","Fundamental practices associated with user experience design including information architecture, scenario creation and usability testing as it relates to prototypes and interactive content. Structure and presentation of information will be analyzed to employ the principles garnered from the analysis and techniques learned. 2 lectures, 1 laboratory.",,Completion of GE Area A with grades of C- or better; completion of GE Area C; Junior standing; or consent of instructor.
19+
User-Centered Interface Design and Development,CSC 484,UX/UI Design,"Introduction to the importance of user-centered principles in the design of good interfaces and effective human-computer interaction. Topics include: study of human characteristics affected by interface design, effective requirements data collection and analysis, user-centered approaches to software engineering, and evaluation of interface and interaction quality. 3 lectures, 1 laboratory.",,CSC 307 or CSC 308; junior standing.
20+
Web Design and Production,GRC 339,UX/UI Design,"Advanced design and production techniques for web development. Current software applications and technologies for user interface design, site structure and information architecture. 3 lectures, 1 laboratory.",,GRC 338; Graphic Communication majors only.

demo/survey-data.csv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Date,Name,Likely to Recommend,Met Expectations,Customer Satisfaction,Age
2+
2020-08-14,Test1,10,true,Very satisfied,18-24 years old
3+
2020-08-14,Test2,1,false,Very dissatisfied,25-34 years old
4+
2020-08-14,Test3,5,true,Neither satisfied or dissatisfied,35-44 years old
5+
2020-08-17,Elliot King,8,true,Very satisfied,35-44 years old
6+
2020-08-17,Noel Hall,7,false,Somewhat satisfied,18-24 years old
7+
2020-07-17,My name is Robert Wright,8,true,Very satisfied,45-54 years old
8+
2020-08-18,Addison Lee,9,true,Very satisfied,35-44 years old
9+
2020-08-18,Abed Glover,7,true,Somewhat satisfied,25-34 years old
10+
2020-08-18,Avery Malone,6,false,Somewhat satisfied,18-24 years old
11+
2020-08-18,Taylor Zhou,8,true,Very satisfied,25-34 years old
12+
2020-08-18,Sydney Jones,9,true,Very satisfied,45-54 years old
13+
2020-08-18,Oakley Smith,8,true,Very satisfied,45-54 years old
14+
2020-08-19,Skylar Lennon,7,true,Somewhat satisfied,25-34 years old
15+
2020-08-19,Parker Holmes,7,false,Neither satisfied or dissatisfied,18-24 years old
16+
2020-08-19,Brooklyn Serrano,9,true,Very satisfied,35-44 years old
17+
2020-08-19,Kyler Flores,7,false,Neither satisfied or dissatisfied,18-24 years old
18+
2020-08-19,Denver Anderson,5,false,Somewhat dissatisfied,18-24 years old
19+
2020-08-19,Jules Young,7,true,Somewhat satisfied,35-44 years old
20+
2020-08-20,Blake Ochoa,9,true,Very satisfied,25-34 years old
21+
2020-08-20,Drew Donaldson,9,true,Very satisfied,45-54 years old
22+
2020-08-20,Robin Lee,8,true,Very satisfied,45-54 years old
23+
2020-08-20,Madison Posey,9,true,Very satisfied,35-44 years old

demo/survey-data.ipynb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"import pandas as pd\n",
10-
"import matplotlib.pyplot as plt"
9+
"import pandas as pd"
1110
]
1211
},
1312
{
@@ -39,13 +38,6 @@
3938
"source": [
4039
"df2.unstack('Age').plot.barh()"
4140
]
42-
},
43-
{
44-
"cell_type": "code",
45-
"execution_count": null,
46-
"metadata": {},
47-
"outputs": [],
48-
"source": []
4941
}
5042
],
5143
"metadata": {

design/gifs/auto-format.gif

6.55 MB
Loading

design/gifs/csvlauncher.gif

3.46 MB
Loading

design/gifs/moving.gif

8.8 MB
Loading

design/gifs/multiremoveandinsert.gif

8.48 MB
Loading

design/gifs/searchandreplace.gif

7.76 MB
Loading

design/gifs/showcase.gif

19.3 MB
Loading

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab-tabular-data-editor",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "EXPERIMENTAL: JupyterLab Tabular Data Editor for CSV files",
55
"keywords": [
66
"jupyter",
@@ -46,8 +46,6 @@
4646
"@jupyterlab/services": "^5.2.1",
4747
"@lumino/algorithm": "^1.2.3",
4848
"@lumino/coreutils": "^1.4.2",
49-
"@lumino/datagrid": "^0.11.1",
50-
"@lumino/datastore": "^0.10.3",
5149
"@lumino/default-theme": "^0.4.2",
5250
"@lumino/disposable": "^1.3.5",
5351
"@lumino/keyboard": "^1.2.2",

src/drag.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,16 @@ export class BoundedDrag extends Drag {
102102
rightBound
103103
} = this._boundingRegion;
104104

105-
// We always measure horizontal distance from the left,
106-
// so we need to ensure left <= x <= right.
107-
// Force left <= x.
108-
x = Math.max(leftBound, x);
109-
// Force x <= right.
110-
x = Math.min(x, rightBound);
111-
// We always measure vertical distance from the top,
112-
// so we need to ensure top <= y <= bottom.
113-
// Force top <= y.
114-
y = Math.max(topBound, y);
115-
// Force y <= bottom.
116-
y = Math.min(y, bottomBound);
105+
// Fetch the style.
106+
const style = this.dragImage.style;
107+
108+
// Fetch the image dimensions.
109+
const width = parseFloat(style.width);
110+
const height = parseFloat(style.height);
111+
112+
// Bound
113+
x = Math.max(leftBound, Math.min(x, rightBound - width));
114+
y = Math.max(topBound, Math.min(y, bottomBound - height));
117115
return [x, y];
118116
}
119117

src/grid.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ export class PaintedGrid extends DataGrid {
3232
this.repaintOverlay();
3333
}
3434

35+
/**
36+
* Get the ghost row height.
37+
*/
38+
get ghostRowHeight(): number {
39+
return this.defaultSizes.rowHeight;
40+
}
41+
/**
42+
* Get the ghost column width.
43+
*/
44+
get ghostColumnWidth(): number {
45+
return this.defaultSizes.columnWidth;
46+
}
47+
3548
/**
3649
* @override paints on the ghost row and column as well after painting the other regions.
3750
* Paint the grid content for the given dirty rect.

0 commit comments

Comments
 (0)