This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation tables #71
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
77ee33d
chore: add all the files, including dta core
hetd54 770f2bf
feat: add codebooks and appendix files to docs
hetd54 66e3c81
feat: get file extension of file, remove category col
hetd54 d598f1b
feat: only core files in data page
hetd54 a9df8a7
style: add padding below headings
hetd54 4694c0a
Merge branch 'main' into documentation-tables
hetd54 263e00e
feat: separate core from other files
hetd54 d9391f6
feat: add switch for toggling language
hetd54 800546f
feat: spanish and english files
hetd54 64087f6
feat: documentation page tables
hetd54 71a0711
feat: switch updates parent returned option
hetd54 3c02241
feat: update file link based on selected language
hetd54 a304023
Merge branch 'main' into documentation-tables
hetd54 86018b7
feat: en/es versions of files
hetd54 bd4b6b0
style: match table from activity in other pr
hetd54 abbd02b
Merge branch 'main' into documentation-tables
hetd54 e2fbde0
chore: checked as bool
hetd54 d83189d
chore: copy documentation text from old site
hetd54 6092dc2
feat: add sub categories for codebooks, spanish files
hetd54 7809f45
refactor: remove DataTable and Switch, unused
hetd54 c3411dd
feat: codebooks subheadings
hetd54 a13af94
style: gap to download links
hetd54 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React from "react" | ||
import Button from "./Button.tsx" | ||
|
||
interface DocumentationTableProps { | ||
allFiles: { | ||
data: { | ||
title: string | ||
cat: string | ||
file?: string | ||
archivo?: string | ||
description?: string | ||
version?: string | ||
codebookType?: string | ||
} | ||
}[] | ||
version?: boolean | ||
showHeader?: boolean | ||
} | ||
|
||
const DocumentationTable: React.FC<DocumentationTableProps> = ({ | ||
allFiles, | ||
version, | ||
showHeader, | ||
}) => { | ||
const files = allFiles.map((file) => { | ||
return { ...file.data } | ||
}) | ||
return ( | ||
<div className="w-full overflow-x-scroll no-scrollbar"> | ||
<table className="table-fixed border-spacing-4 w-full"> | ||
<thead className={showHeader ? "" : "collapse"}> | ||
<tr className="text-xl bg-neutral-100 text-left text-neutral-900"> | ||
<th className="w-1/4">File</th> | ||
<th>Description</th> | ||
{version && <th className="w-1/5">Field Season</th>} | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{files.map(({ title, file, description, version, archivo }, i) => { | ||
return ( | ||
<tr key={i}> | ||
<td className="flex justify-between gap-2"> | ||
<p className="font-bold">{title}</p> | ||
<div className="flex gap-1"> | ||
( | ||
{file && ( | ||
<a | ||
className="text-secondary-blue-700 hover:text-secondary-blue-500" | ||
target="_blank" | ||
href={file} | ||
> | ||
en | ||
</a> | ||
)} | ||
{file && archivo && <p>/</p>} | ||
{archivo && ( | ||
<a | ||
className="text-secondary-blue-700 hover:text-secondary-blue-500" | ||
target="_blank" | ||
href={archivo} | ||
> | ||
es | ||
</a> | ||
)} | ||
) | ||
</div> | ||
</td> | ||
<td>{description}</td> | ||
{version && <td>{version}</td>} | ||
</tr> | ||
) | ||
})} | ||
</tbody> | ||
</table> | ||
</div> | ||
) | ||
} | ||
export default DocumentationTable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix A | ||
description: Community Survey Year Codes | ||
file: src/content/data/files/appendix-a-sample-information-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix B | ||
description: Place Codes in Mexico and the United States | ||
file: src/content/data/files/appendix-b-places-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix C | ||
description: State Codes in Mexico and the United States | ||
file: src/content/data/files/appendix-c-states-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix D | ||
description: Occupation Codes (English) | ||
file: src/content/data/files/appendix-d-occupations-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix E | ||
description: Computation of Total U.S. Experience (English) | ||
file: src/content/data/files/appendix-e-computation-of-us-experience-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix F | ||
description: Farm Codes in Canada | ||
file: src/content/data/files/appendix-f-canadian-farms-mmp174-.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix G | ||
description: Community Data Inventory (English) | ||
file: src/content/data/files/comquest1999_eng.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Appendix H | ||
description: MMP Weights | ||
file: src/content/data/files/mmp-and-lamp-weights-2012.pdf | ||
cat: Appendices | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: CNMIG | ||
description: cross-sectional file containing information of the household-head - | ||
or another migrant when the household-head was not a migrant - who has | ||
migration experience to Canada. | ||
file: src/content/data/files/cnmig-codebook-mmp174-.pdf | ||
cat: Codebook | ||
codebookType: MMP Core | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Commun 174 | ||
description: DTA file | ||
file: src/content/data/files/commun174.dta | ||
cat: Core | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: ENVIRONS | ||
description: Variable list and specifications | ||
file: src/content/data/files/environs-codebook-mmp134-.pdf | ||
cat: Codebook | ||
codebookType: State Level Supplementary | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Ethnosurvey I | ||
description: Survey applied to communities interviewed from 1987 to 1997, and in 1982 | ||
version: 1987 - 1997 | ||
archivo: src/content/data/files/mmp-etnoencuesta-versión-1-aplicada-de-1987-a-1997.pdf | ||
cat: Questionnaire | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Ethnosurvey II | ||
description: Survey applied to communities interviewed on 1998 and 1999 | ||
version: 1998 - 1999 | ||
file: src/content/data/files/mmp-ethnosurvey-version-ii-applied-in-1998-and-1999.pdf | ||
archivo: src/content/data/files/mmp-etnoencuesta-versión-2-aplicada-de-1998-a-1999.pdf | ||
cat: Questionnaire | ||
--- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great